fix: use subprocess instead of os.system in local_backend.py (#2494)

* fix: use subprocess instead of os.system in local_backend.py

The sandbox backend and skill evaluation scripts use subprocess

* fixing the failing test

---------

Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
This commit is contained in:
orbisai0security
2026-04-25 06:29:31 +05:30
committed by GitHub
parent 2bb1a2dfa2
commit 950821cb9b
2 changed files with 6 additions and 4 deletions
@@ -288,10 +288,10 @@ class LocalSandbox(Sandbox):
timeout=600,
)
else:
args = [shell, "-c", resolved_command]
result = subprocess.run(
resolved_command,
executable=shell,
shell=True,
args,
shell=False,
capture_output=True,
text=True,
timeout=600,