T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:37
- Finding
- Unpinned Third-Party Dependencies Allow Supply-Chain Compromise## Vulnerability Details **File Location**: `SKILL.md`, lines 37–48 **Vulnerability Type**: Unpinned and integrity-unverified third-party dependencies **Risk Level**: Medium ### Vulnerable Code ```bash # Core libraries pip install pdfplumber pandas openpyxl # For scanned PDFs (OCR) pip install pytesseract pdf2image # Also install Tesseract OCR: https://github.com/tesseract-ocr/tesseract # For advanced PDF operations pip install pypdf ``` ### Technical Analysis The installation instructions retrieve third-party Python packages without fixed versions, cryptographic hashes, a lockfile, or an explicitly trusted package index. Consequently, installation resolves whichever package versions and transitive dependencies are available from the configured index at execution time. Python packages may execute installation hooks or run code when imported. If a package release, maintainer account, package index, or transitive dependency is compromised, following these instructions could introduce attacker-controlled code. The absence of version and hash verification also makes installations non-reproducible and prevents users from confirming that installed artifacts match versions reviewed by the project. ### Attack Path 1. An attacker compromises a listed dependency, one of its transitive dependencies, or the package repository from which it is resolved. 2. The attacker publishes a malicious package version or replaces an expected distribution artifact. 3. A user or agent follows the documented unpinned `pip install` commands. 4. `pip` resolves and downloads the attacker-controlled release because no approved version or artifact hash is required. 5. Malicious code executes during installation or when the dependency is imported by a PDF-processing example. 6. The payload operates with the privileges and environmental access of the user running Python. ### Impact Assessment Successful exploitation could permit arbitra ...[truncated 474 chars]
- Remediation
- ## Remediation Suggestions 1. Pin every direct dependency to a reviewed version rather than allowing unconstrained resolution. 2. Generate and distribute a lockfile that also fixes transitive dependency versions. 3. Record cryptographic hashes for all approved distributions and install with `pip install --require-hashes`. 4. Configure an explicit trusted package index or an internally controlled dependency mirror. 5. Install dependencies in an isolated virtual environment with least privilege; do not run installation commands as an administrator or root user. 6. Add automated dependency vulnerability and provenance scanning to the release process. 7. Review and update pinned versions through a controlled process that tests the complete PDF and OCR workflow before publication.
