subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
return warn(f"Installing missing packages: {', '.join(missing)}...") try: subprocess.check_call( [sys.executable, "-m", "pip", "install", *missing, "--break-system-packages"] ) except subprocess.CalledProcessError:- Confidence
- 96% confidence
- Finding
- This subprocess call invokes pip to install packages at runtime, which mutates the host environment and executes code from externally retrieved packages. Although the command is not shell-injected, automatic installation of dependencies without explicit user approval creates supply-chain and environment-integrity risk, especially in agent or automation contexts.
