subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
print(f"[INFO] 开始安装缺失依赖: {missing}") try: subprocess.run( [sys.executable, "-m", "pip", "install"] + missing, check=True, )- Confidence
- 87% confidence
- Finding
- The script executes pip as a subprocess to install packages at runtime. While the package list is hardcoded and not directly user-controlled, this still performs network-retrieved code installation and execution on the host, which is a meaningful supply-chain and environment-modification risk for an initialization script.
