subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
if not os.path.isdir(node_modules): print_status("首次启动,正在安装网页依赖...", "wait") try: subprocess.run( ["npm", "install", "--no-audit", "--no-fund"], cwd=TS_DIR, check=True, timeout=120, )- Confidence
- 77% confidence
- Finding
- Automatically running npm install on startup executes package lifecycle scripts from the local web project and pulls code from the package ecosystem. If the project dependencies or lockfile are tampered with, or a malicious package is introduced, this becomes a supply-chain execution path on the user's machine.
