subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
pip = os.path.join(MLX_VENV_DIR, "bin", "pip") subprocess.run([pip, "install", "--upgrade", "pip"], check=True, capture_output=True) print(" Installing mlx-audio + numpy (this may take a few minutes)...") subprocess.run([pip, "install", "mlx-audio", "numpy"], check=True) print_ok(f"Installed mlx-audio at: {MLX_VENV_DIR}") return MLX_VENV_DIR- Confidence
- 91% confidence
- Finding
- The script installs unpinned third-party packages from the network at setup time, which exposes users to supply-chain compromise, malicious package updates, or unexpected dependency resolution. In a setup script, this is more dangerous because users expect one-time installation but may not realize arbitrary code from package installs will execute during install/build steps.
