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 items = [] try: # policy 输出检查 r = subprocess.run([PYTHON, TOOL, "policy", "--company", "测试公司", "--sector", "金融"], capture_output=True, text=True, timeout=60) out = r.stdout or "" items.append({"name": "policy 命令执行成功", "pass": r.returncode == 0})
