subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
if not script_path.exists(): continue log_kv("运行", script_name) result = subprocess.run( [python, str(script_path)], cwd=str(project_root), capture_output=True, text=True,- Confidence
- 78% confidence
- Finding
- The script automatically executes other Python files from the repository directory if they exist, creating a trust boundary issue: any modified or newly introduced helper script in that location will be run with the monitor's privileges. In a skill or automation context, this increases the blast radius of repository compromise or malicious file placement into arbitrary code execution during routine runs.
