subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
# Auto-install and retry print("→ 正在安装 qrcode 库...", flush=True) try: subprocess.run( [sys.executable, "-m", "pip", "install", "qrcode", "-q"], check=True, capture_output=True )- Confidence
- 95% confidence
- Finding
- The script automatically runs pip to install a package at runtime without explicit consent or pinning. This introduces supply-chain risk and unexpected software modification during setup, especially on hosts where package installation may affect other workloads or pull compromised dependencies from package indexes.
