subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
set_execute_cases(script_path, case_ids) # 执行测试 result = subprocess.run( ['python', 'run_tests.py'], cwd=interface_dir, capture_output=True,- Confidence
- 95% confidence
- Finding
- The code executes a discovered `run_tests.py` from a user-configured project path after scanning the filesystem, so the skill will run arbitrary Python code located in whatever project directory the user points it at. Although `subprocess.run` is used without a shell, reducing classic shell-injection risk, this is still dangerous because the trust boundary is the external project content, and the skill also selects the working directory from that untrusted path.
