subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
# 3) 依赖缺失 → 仅此时安装 pip = venv / bin_dir(venv) / ('pip.exe' if sys.platform == 'win32' else 'pip') print(f'[mddoc] 安装缺失依赖: {PIP_PACKAGES}(镜像: {PIP_INDEX})', file=sys.stderr) subprocess.run([str(pip), 'install', '--disable-pip-version-check', '-i', PIP_INDEX] + PIP_PACKAGES.split(), check=True) except subprocess.CalledProcessError as exc:- Confidence
- 94% confidence
- Finding
- This code performs a network package installation at runtime using pip into a persistent virtual environment. Although the subprocess invocation itself is not shell-injected, it expands the skill's capability from document conversion to fetching and executing third-party code from the network, creating a supply-chain and host-modification risk if the mirror, package resolution, or environment is compromised.
