subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
except ImportError: print("缺少 requests 库,正在安装...") import subprocess subprocess.check_call([sys.executable, "-m", "pip", "install", "requests", "-q"]) import requests- Confidence
- 94% confidence
- Finding
- The script automatically executes `pip install requests` when `requests` is missing, which causes unreviewed code execution and a network dependency fetch at runtime. In an agent skill context, silently installing packages expands the trust boundary and can be abused through compromised package indexes, dependency confusion, or unexpected environment mutation.
