subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
def run_smoke(cmd, cwd, timeout=60): try: r = subprocess.run(["bash", "-c", cmd], cwd=cwd, timeout=timeout, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) return r.returncode == 0 except Exception:- Confidence
- 97% confidence
- Finding
- `run_smoke` executes manifest-supplied `smoke` commands via `bash -c`. Although the tool tries to gate smoke execution behind manifest trust checks, a trusted or explicitly approved manifest can still contain arbitrary shell code, so this is a deliberate code-execution surface that can run attacker-controlled commands in the workspace context.
