subprocess module call
- Category
- Dangerous Code Execution
- Confidence
- 70% confidence
- Finding
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
- Content
python 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():
