T08 · Insecure Dependencies
- Location
requirements.txt:1- Finding
Unpinned Third-Party Dependencies Without Integrity Verification
- Content
View full analysis
=4.0.0 Pillow>=9.0.0 ``` The documented installation workflow executes package installation using these requirements: ```bash pip install -r skills/premium-pdf/requirements.txt ``` The documentation also recommends installing another package globally without a version or integrity constraint: ```bash npm install -g clawhub ``` ### Technical Analysis The Python dependencies use open-ended `>=` constraints rather than exact, reviewed versions. No lockfile or cryptographic hashes are supplied. Consequently, separate installations can resolve to different dependency versions, including releases published after this project was audited. Python package installation may execute package build logic with the privileges of the user running `pip`. The globally installed npm package can likewise execute package lifecycle scripts and is not constrained to a reviewed version. Although the dependency names are consistent with the skill's PDF-generation functionality and there is no evidence that the current packages are malicious, the installation process lacks controls that would make dependency resolution reproducible and integrity-verifiable. This creates a supply-chain exposure if a direct or transitive dependency is compromised, a future release is malicious, or an upstream account or distribution channel is taken over. ### Attack Path 1. An attacker compromises an upstream package publisher, distribution account, package repository, or a dependency used by one of the declared packages. 2. The attacker publishes a malicious release that satisfies `reportlab>=4.0.0` or `Pillow>=9.0.0`, or affects a dependency selected during resolution. 3. A user follows the do ...[truncated 1177 chars]- Remediation
View remediation
Pillow== ``` 2. Generate and commit a reproducible dependency lockfile that includes all transitive dependencies. 3. Record cryptographic hashes for every resolved Python distribution and require verification during installation: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 4. Regenerate pinned dependencies through a controlled update process that includes vulnerability scanning, release-note review, and functional testing. 5. Install dependencies inside an isolated virtual environment rather than into the system Python environment. 6. Avoid running `pip` or npm installation commands with administrative privileges. 7. Pin the documented `clawhub` version and use npm lockfile or integrity controls where applicable. Prefer a project-local or otherwise isolated installation over an unrestricted global installation. 8. Configure package managers to use approved registries and consider an internal package mirror containing reviewed artifacts. ]]>
