subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
with stdout_path.open("a", encoding="utf-8") as stdout_handle, stderr_path.open( "a", encoding="utf-8" ) as stderr_handle: process = subprocess.Popen( job["argv"], cwd=job["workspace_path"], stdout=stdout_handle,- Confidence
- 82% confidence
- Finding
- This background-job runner executes job['argv'] and job['workspace_path'] loaded from a JSON job file on disk, and the job file contents are not authenticated or integrity-protected. If an attacker can modify files in the workspace or job directory, they can replace the stored argv or cwd and cause arbitrary command execution under the agent's privileges.
