subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
# 安装Pyinstaller及主程序依赖 # 必须在import项目中的模块之前执行,否则会出现找不到模块的错误 print("Installing dependencies...") subprocess.run("pip install -r requirements.txt", shell=True) subprocess.run("pip install pyinstaller", shell=True) from mod.args import args- Confidence
- 92% confidence
- Finding
- The script invokes `pip install -r requirements.txt` through the shell at runtime, causing arbitrary code from package installation hooks or a tampered dependency set to execute on the host. Because this happens automatically before the main program imports, anyone running the build script is exposed to unreviewed code execution with no confirmation or integrity checks.
