subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
except ImportError: print("[提示] paddleocr 未安装。正在尝试安装...", file=sys.stderr) import subprocess subprocess.check_call( [sys.executable, "-m", "pip", "install", "paddleocr>=2.7", "paddlepaddle>=2.6", "-i", "https://pypi.tuna.tsinghua.edu.cn/simple/",- Confidence
- 96% confidence
- Finding
- The script automatically invokes pip to download and install OCR packages from a third-party mirror at runtime when imports fail. This expands a local OCR helper into network-enabled code execution and supply-chain risk: a compromised mirror, dependency, or package resolution could result in arbitrary code running in the user's environment.
