subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
req = Path(__file__).resolve().parent / "requirements.txt" if not req.exists(): raise RuntimeError(f"未找到依赖文件: {req}") subprocess.check_call([sys.executable, "-m", "pip", "install", "-r", str(req)]) def slugify(text: str) -> str:- Confidence
- 90% confidence
- Finding
- The script can invoke pip at runtime via `subprocess.check_call(...)` when `--install` is used. While arguments are passed safely as a list and there is no shell injection, allowing a skill to install dependencies on demand expands its execution scope and can fetch and execute arbitrary package installation code from external sources, which is risky in agent environments.
