subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
"""Attempt to install agent-audit via pip.""" print("📦 agent-audit not found. Installing...") try: result = subprocess.run( [sys.executable, "-m", "pip", "install", "agent-audit", "--quiet"], capture_output=True, text=True, timeout=120 )- Confidence
- 97% confidence
- Finding
- The script automatically performs a pip install of agent-audit when the tool is missing, causing networked code acquisition and package installation without explicit user approval. In a security scanner, this expands the trust boundary significantly and can introduce supply-chain risk, especially if package indexes, mirrors, or the local Python environment are compromised.
