subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
"""专门为老项目(使用 pkg_resources 的 setup.py)修复 setuptools 版本""" try: # 先强制修复损坏的 packaging 包(关键!解决无RECORD文件报错) subprocess.check_call([ sys.executable, "-m", "pip", "install", "--verbose", "--ignore-installed", "--no-deps", "packaging==26.1" ])- Confidence
- 94% confidence
- Finding
- This subprocess call automatically invokes pip at import time to reinstall the packaging library, modifying the Python environment without user consent. Even though the command itself is fixed rather than shell-injected, it enables network/package-supply-chain risk and breaks the skill's stated offline/local trust model.
