T08 · Insecure Dependencies
- Location
requirements.txt:1- Finding
Unpinned and Unverified Third-Party Dependencies
- Content
View full analysis
=10.0.0 imageio>=2.31.0 imageio-ffmpeg>=0.4.9 numpy>=1.24.0 ``` Related installation guidance: ```bash pip install pillow imageio numpy ``` ### Technical Analysis Every dependency in `requirements.txt` uses a lower-bound constraint rather than an exact, reviewed version. Consequently, each installation can resolve to a different future package release. The project also provides no lockfile or cryptographic hashes with which to verify downloaded distributions. The installation command in `SKILL.md` independently asks package installers to retrieve the latest compatible versions and omits the declared `imageio-ffmpeg` dependency. This discrepancy reduces reproducibility and may cause users to install an incomplete or differently resolved environment. No evidence was found that any currently named package is malicious. The vulnerability is the absence of dependency integrity and reproducibility controls, which increases exposure to compromised upstream releases, registry-account compromise, and unexpected incompatible changes. ### Attack Path 1. An attacker compromises the publishing account, build infrastructure, or distribution process of one of the declared packages. 2. The attacker publishes a malicious version satisfying the broad lower-bound constraint. 3. A user installs the project dependencies using `pip install -r requirements.txt` or follows the command in `SKILL.md`. 4. The package installer resolves and downloads the malicious release because no exact version or artifact hash is enforced. 5. Attacker-controlled package code can execute during installation, import, or normal library use with the privileges of the user running the project. This path requires compromise of an ...[truncated 792 chars]- Remediation
View remediation
imageio== imageio-ffmpeg== numpy== ``` 2. Generate and commit a dependency lockfile appropriate for the supported Python environments. 3. Record SHA-256 hashes for every permitted distribution and install with hash verification, such as: ```bash python -m pip install --require-hashes -r requirements.lock ``` 4. Ensure the installation command in `SKILL.md` uses the same locked manifest and includes `imageio-ffmpeg`. 5. Use an automated dependency update process that runs tests and requires review before changing locked versions or hashes. 6. Install dependencies in an isolated virtual environment as a non-privileged user. 7. Consider using a controlled package mirror and dependency vulnerability scanning in CI. ]]>
