T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:20
- Finding
- Unpinned Third-Party Dependencies Create Supply-Chain Exposure## Vulnerability Details **File Location**: `SKILL.md`, lines 20-25 **Vulnerability Type**: Unpinned third-party dependency installation **Risk Level**: Medium ### Vulnerable Code ```bash pip3 install qrcode[pil] # or on Ubuntu/Debian: sudo apt-get install python3-qrcode ``` ### Technical Analysis The installation instructions retrieve `qrcode`, its Pillow dependency, or the distribution package without specifying reviewed versions or integrity hashes. Consequently, the code installed by users can change independently of the reviewed Skill. The package names do not appear to be typographical imitations, and the project does not intentionally retrieve a remote executable payload. The risk instead arises from unconstrained dependency resolution: a compromised package-index account, malicious dependency release, compromised repository, or incompatible future release could introduce unexpected code during installation or import. Because Python packages can execute code during installation and later when imported, dependency compromise could affect both the installation process and every execution of the QR generator. ### Attack Path 1. An attacker compromises an upstream package, maintainer account, package repository, or dependency release. 2. The attacker publishes a malicious version that still satisfies the unconstrained installation command. 3. A user follows the documented `pip3 install qrcode[pil]` instruction. 4. The package manager resolves and installs the attacker-controlled release. 5. Malicious code executes during installation or when `qrcode` or `PIL` is imported by `scripts/qr-code.py`. This path requires compromise or malicious modification of an upstream dependency or package source; the audited project itself does not contain such a payload. ### Impact Assessment Malicious dependency code could operate with the permissions of the user running `pip3` or the QR generator. Potential impact includ ...[truncated 488 chars]
- Remediation
- ## Remediation Suggestions 1. Add a reviewed dependency manifest with exact versions for `qrcode`, Pillow, and all transitive dependencies. 2. Generate and verify cryptographic hashes, for example with a locked requirements file and: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 3. Periodically update pinned versions through a controlled review process that includes vulnerability and provenance checks. 4. Recommend installation in a dedicated virtual environment rather than a global or privileged Python environment. 5. Avoid running `pip` as root and document trusted operating-system repositories when suggesting distribution packages. 6. Consider publishing a reproducible lock file generated by a dependency-management tool such as `pip-tools`.
