subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
except ImportError: print("正在安装python-pptx...") import subprocess subprocess.check_call([sys.executable, "-m", "pip", "install", "python-pptx", "-q"]) from pptx import Presentation from pptx.util import Inches, Pt, Emu from pptx.dml.color import RGBColor- Confidence
- 94% confidence
- Finding
- The script invokes pip via subprocess at runtime to install a missing dependency. This introduces package-management and potential network execution behavior during normal use, which can modify the host environment and expose users to supply-chain risk if package indexes, mirrors, or dependency resolution are compromised.
