subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
if missing: print(f"Installing missing dependencies: {', '.join(missing)}...") try: subprocess.check_call( [sys.executable, "-m", "pip", "install", "--quiet"] + missing ) print("Dependencies installed.\n")- Confidence
- 94% confidence
- Finding
- This script automatically invokes pip to install packages at runtime, which expands the trust boundary from the local script to the Python package index and the executing environment. In an auth helper that handles authentication state and credentials, implicit package installation is risky because it can execute unreviewed dependency code, produce non-reproducible behavior, and expose users to dependency confusion or compromised package supply-chain events.
