subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
except ImportError: print("Installing dependencies...") import subprocess subprocess.check_call([sys.executable, "-m", "pip", "install", "-r", "requirements.txt"]) import requests import feedparser- Confidence
- 95% confidence
- Finding
- The script automatically installs dependencies at runtime by invoking pip if imports fail. In an agent or automation context, this creates a supply-chain and environment-modification risk: execution may pull and install whatever versions are resolved from requirements.txt or package indexes without prior review, changing the host state and potentially introducing malicious or compromised packages.
