subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
for cmd in pip_commands: try: result = subprocess.run(cmd, capture_output=True, text=True, timeout=120) if result.returncode == 0: print(f"[OK] 依赖安装成功: {', '.join(pip_packages)}", file=sys.stderr) return True- Confidence
- 95% confidence
- Finding
- This code automatically invokes pip to install packages at runtime, which modifies the execution environment and executes package installation logic from external repositories. In a skill whose purpose is book recommendation, this is unnecessary privilege expansion and creates supply-chain and policy-bypass risk if package indexes, mirrors, or resolution are tampered with.
