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 code performs package installation at import/runtime and modifies the Python environment automatically. Even though the package name is hardcoded here, invoking pip from the skill changes the host environment and introduces supply-chain risk if package indexes, dependency resolution, or execution context are compromised.
