T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:20
- Finding
- Third-Party Python Dependencies Installed Without Integrity Verification<![CDATA[ ## Vulnerability Details **File Locations**: - `SKILL.md`, lines 20-24 - `README.md`, lines 45-49 **Vulnerability Type**: Supply-chain integrity weakness **Risk Level**: Medium ### Vulnerable Code From `SKILL.md`, lines 20-24: ```bash pip install \ pillow==12.1.0 \ numpy==2.3.5 \ opencv-python-headless==4.13.0.92 \ pytesseract==0.3.13 ``` From `README.md`, lines 45-49: ```bash pip install \ pillow==12.1.0 \ numpy==2.3.5 \ opencv-python-headless==4.13.0.92 \ pytesseract==0.3.13 ``` ### Technical Analysis The installation instructions pin dependency versions, which reduces exposure to unexpected upgrades, but they do not verify the cryptographic hashes of downloaded distributions. No reviewed lock file or hash-enforced requirements file is supplied. Consequently, package identity and integrity depend entirely on the configured Python package index, transport security, index account security, and the integrity of the selected releases. Python package installation may execute package-controlled build or installation logic. A compromised package release, package-index account, repository mirror, or local index configuration could therefore introduce attacker-controlled code during installation. No evidence indicates that the named packages or pinned versions are currently malicious. This finding concerns the absence of dependency integrity enforcement rather than a confirmed compromise of any dependency. ### Attack Path 1. A user follows the documented environment-setup instructions. 2. The user runs the provided `pip install` command against their configured package index or mirror. 3. An attacker compromises a referenced package release, its maintainer account, the configured mirror, or another component of package resolution. 4. Because the command does not require known cryptographic hashes, `pip` accepts the attacker-controlled distribution if its name and version satisfy the request. 5. Malicious build or ins ...[truncated 896 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Create and commit a reviewed requirements or lock file containing exact versions and SHA-256 hashes for every accepted distribution, including transitive dependencies. 2. Install dependencies using hash enforcement, for example: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 3. Generate hashes separately for each supported Python version, operating system, and architecture when wheel files differ across platforms. 4. Document the intended trusted package index and prevent silent fallback to untrusted extra indexes or mirrors. 5. Perform installation in a dedicated, non-privileged virtual environment. 6. Review dependency provenance and vulnerability advisories before updating pinned versions. 7. Use automated dependency scanning and lock-file verification in continuous integration. 8. If reproducibility across platforms cannot be maintained with pip hashes, distribute a reviewed container image or another reproducible environment with pinned artifact digests. ]]>
