subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
if not py.exists(): _VENV.parent.mkdir(parents=True, exist_ok=True) subprocess.run([uv, "venv", str(_VENV)], check=True, stdout=sys.stderr) subprocess.run( [uv, "pip", "install", "--python", str(py), *REQUIREMENTS], check=True, stdout=sys.stderr,- Confidence
- 91% confidence
- Finding
- This code installs Python packages at runtime by invoking `uv pip install`, which creates a supply-chain execution path during normal skill operation. Although `subprocess.run` is used safely without a shell, the behavior is still dangerous because it pulls and installs executable dependencies from the environment at run time, trusting PATH resolution for `uv` and network/package sources; a compromised PATH, package index, or dependency chain could lead to arbitrary code execution.
