subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
subprocess.run(["python3", "-m", "venv", str(venv_dir)], check=True) pip = venv_dir / "bin" / "pip" req = Path(__file__).resolve().parents[1] / "requirements.txt" subprocess.run([str(pip), "install", "--quiet", "-r", str(req)], check=True) return str(py)- Confidence
- 77% confidence
- Finding
- The script installs dependencies at runtime into a shared /tmp virtualenv using pip install -r requirements.txt. This creates a supply-chain and local tampering risk: if requirements.txt or the shared venv path is modified by another local actor, arbitrary code could be installed and later executed by the skill.
