T08 · Insecure Dependencies
Warning
- Location
- scripts/requirements.txt:1
- Finding
- Unpinned Third-Party Dependencies Create a Supply-Chain Risk## Vulnerability Details **File Location**: `scripts/requirements.txt:1-7`; installation command at `SKILL.md:18` **Vulnerability Type**: Unpinned and unverifiable third-party dependencies **Risk Level**: Medium ### Vulnerable Code ```text cnocr langchain-openai langchain-core pandas openpyxl pillow pydantic ``` The documented installation process resolves these dependencies directly from the configured Python package repository: ```bash pip install -r requirements.txt ``` ### Technical Analysis None of the dependencies has an exact version constraint or an integrity hash. Consequently, the installed code can change between installations without any modification to this Skill. If a dependency account, package release, package index, or dependency-resolution path is compromised, a user may install attacker-controlled code. Python packages can execute code during installation, import, or normal runtime. The affected packages are imported by the Skill and therefore execute with the same operating-system privileges as the user running it. The finding does not establish that any currently named package is malicious. It identifies the absence of controls needed to make dependency installation reproducible and resistant to supply-chain substitution. ### Attack Path 1. An attacker compromises a dependency publisher, a package-index account, or another component in the dependency distribution chain. 2. The attacker publishes a malicious or backdoored release under one of the accepted package names. 3. A user follows the documented `pip install -r requirements.txt` procedure. 4. Because no exact version or hash is required, the package resolver accepts the malicious release. 5. Attacker-controlled code executes during installation, import, OCR processing, report conversion, or LLM interaction. ### Impact Assessment Malicious dependency code would run with the privileges of the user installing or invokin ...[truncated 521 chars]
- Remediation
- ## Remediation Suggestions 1. Pin every direct dependency to an exact reviewed version using `==`. 2. Generate a lock file that also records resolved transitive dependencies. 3. Record package hashes and install with hash verification, for example: ```bash pip install --require-hashes -r requirements.lock ``` 4. Build dependencies in a controlled environment and test updates before publication. 5. Use automated dependency vulnerability and provenance scanning. 6. Install and run the Skill in an isolated virtual environment or container with access only to required images and output directories. 7. Periodically update pinned versions through an explicit security-review process rather than allowing automatic resolution to the latest release.
