subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
"""自动安装Python包(中英双语提示)""" print_step(f"正在自动安装依赖库: {package_name}") try: subprocess.check_call([sys.executable, "-m", "pip", "install", package_name], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) print(f"✅ 成功安装 {package_name} / Successfully installed {package_name}")- Confidence
- 95% confidence
- Finding
- The code invokes pip at runtime through subprocess, which allows the skill to modify the local Python environment during normal document processing. Even though the package name is selected from hardcoded values rather than direct user input, this still expands the attack surface by executing an external package installer, potentially pulling untrusted code from package indexes and changing system state unexpectedly.
