subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
print(f"== {name} == $ {cmd['run']}") import shlex argv = shlex.split(cmd["run"]) proc = subprocess.run(argv, capture_output=True, text=True) ok = proc.returncode == 0 overall = overall and ok if proc.stdout.strip():- Confidence
- 70% confidence
- Finding
- subprocess module calls execute external commands. Without careful input validation, this enables command injection.
