subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
except ImportError: install_name = pip_name or package print(f"[*] Installing {install_name}...") subprocess.check_call( [sys.executable, "-m", "pip", "install", "-U", install_name], stdout=subprocess.DEVNULL, )- Confidence
- 94% confidence
- Finding
- The script executes pip install at runtime, which causes code from external package indexes to be fetched and installed during normal operation. Even though subprocess is invoked without shell=True and the package names are currently hardcoded, this still expands the script's trust boundary and can execute unreviewed installer/package code in the user's environment, making compromise possible via dependency-chain or package-source issues.
