subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
_append_cli_arg(cmd, key, val) print(f"[INFO] 执行测试: {' '.join(cmd)}") result = subprocess.run(cmd, capture_output=True, text=True, encoding="utf-8") print(result.stdout) if result.stderr: print(result.stderr)- Confidence
- 92% confidence
- Finding
- The runner executes a Python file specified by --test-script using the configured interpreter, with no validation that the target script is trusted or generated by this tool. In a skill that is explicitly designed to generate and execute diagnostic test scripts, this creates a direct arbitrary code execution path if an attacker can influence the script path or place a malicious script where the operator will run it.
