subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
else: cmd = [resolved] try: proc = subprocess.run(cmd, cwd=target_dir, capture_output=True, timeout=120) return True, proc.returncode, "ran" except Exception as e: return False, None, f"error running harness: {e}"- Confidence
- 95% confidence
- Finding
- The validator re-executes a harness path taken from dossier content or the target directory, so analyzing an untrusted report can trigger arbitrary local code execution. Although subprocess.run is invoked without shell=True, that only prevents shell metacharacter injection; it does not mitigate execution of attacker-controlled executables or scripts.
