subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
t = entry.get("type", "command") if t == "command": cmd = entry["cmd"].format(**args) r = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=30) return r.returncode == 0, (r.stdout or r.stderr).strip() if t == "python": mod = __import__(entry["module"])- Confidence
- 70% confidence
- Finding
- subprocess module calls execute external commands. Without careful input validation, this enables command injection.
