T08 · Insecure Dependencies
- Location
SKILL.md:420- Finding
Unpinned Third-Party Dependencies Installed from Mutable Package Sources
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 420–433
Vulnerability Type: Supply-chain risk from unpinned dependencies
Risk Level: MediumVulnerable Code
markdown ## Dependencies | 依赖 | 用途 | 安装命令 | |------|------|----------| | `python-docx` | DOCX 文件生成 + DOCX 参考材料读取 | `pip install python-docx` | | `pdfplumber` | PDF 参考材料文本提取(首选) | `pip install pdfplumber` | | `PyMuPDF` | PDF 参考材料文本提取(备选) | `pip install PyMuPDF` | | `pytesseract` | 图片格式参考材料 OCR 识别 | `pip install pytesseract`(需安装 Tesseract 引擎) | | `Pillow` | 图片预处理(缩放、去噪) | `pip install Pillow` |Technical Analysis
The Skill instructs the runtime or operator to install third-party Python packages by name without exact version constraints, cryptographic hashes, a lockfile, or package-source restrictions. Consequently, the installed artifacts may change between executions even though the reviewed Skill remains unchanged.
An attacker who compromises an upstream package, its maintainer account, the configured package index, or the dependency-resolution path could cause a malicious distribution to be selected. Python packages may execute package-controlled build or installation logic during installation. Malicious package code could also execute later when the document-processing workflow imports the dependency.
The finding does not establish that any named package is currently malicious. The vulnerability is the mutable and unverified dependency acquisition process.
Attack Path
- A user invokes functionality that requires DOCX, PDF, or image processing.
- The required dependency is absent, causing the documented installation instruction to be followed.
pipresolves an unpinned package through the environment's configured package index and dependency graph.- An attacker-controlled or compromised release is selected, or a transitive dependency resolves to a malicious artifact.
- Malicious code executes during package installation, package build, or subsequent ...[truncated 942 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace direct unversioned installation commands with a reviewed requirements or lock file containing exact versions.
- Generate and enforce cryptographic hashes, for example by installing with
pip install --require-hashes -r requirements.txt. - Pin direct and transitive dependencies after reviewing the complete resolved dependency graph.
- Configure
pipto use an approved package index and explicitly disable untrusted supplemental indexes. - Download and scan dependency artifacts in a controlled build pipeline, then install from an internal immutable artifact repository.
- Run document parsers in an isolated, least-privilege environment without credentials or unnecessary filesystem and network access.
- Enable automated dependency and vulnerability monitoring, but require review and lockfile regeneration before accepting upgrades.
- Avoid installing packages dynamically during Skill execution; provision reviewed dependencies before the Agent handles untrusted documents.
