subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
if not component.stats_script.is_file(): return {"status": "error", "summary": {"error": "missing scripts/stats.py"}, "rows": []} try: out = subprocess.check_output( [sys.executable, str(component.stats_script)], cwd=REPO_ROOT, env={**os.environ, "PYTHONPATH": str(REPO_ROOT)},- Confidence
- 95% confidence
- Finding
- This code executes each discovered component's `scripts/stats.py` as a subprocess with the full inherited environment and repository-controlled `PYTHONPATH`. Because components are dynamically discovered from the skills directory, any untrusted or newly added skill can achieve arbitrary code execution simply by providing a `stats.py`, making dashboard generation an execution sink rather than a read-only aggregation step.
