T08 · Insecure Dependencies
Warning
- Location
- requirements.txt:1
- Finding
- Unpinned Third-Party Dependencies Create a Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `requirements.txt:1-3`; installation instruction at `SKILL.md:14` **Vulnerability Type**: Unpinned and unhashed third-party dependencies **Risk Level**: Medium ### Vulnerable Code `requirements.txt:1-3`: ```text Pillow colorgram.py matplotlib ``` `SKILL.md:14`: ```markdown **Setup:** OpenClaw does not install Python packages automatically. After installing this skill, run once: `pip install -r requirements.txt` (from the skill folder or pass the path). If a script fails with `ModuleNotFoundError`, install the missing package. ``` ### Technical Analysis The dependency file specifies package names without exact versions or cryptographic hashes. Consequently, the documented `pip install -r requirements.txt` command resolves whichever compatible releases are available from the configured Python package index at installation time. This makes installations non-reproducible and prevents verification that the downloaded distributions are the versions reviewed by the project maintainer. If an upstream package, maintainer account, package-index entry, or release artifact is compromised, users may install attacker-controlled package code. Python packages can execute code during installation through supported build mechanisms and later when imported by `scripts/extract_palette.py`. The package names match the libraries described by the project, and the reviewed files do not specify an untrusted package index or directly retrieve remote code. Therefore, this finding represents a supply-chain hardening weakness rather than evidence that the currently named packages are malicious. ### Attack Path 1. An attacker compromises one of the referenced upstream packages, its maintainer account, or a future release artifact. 2. The attacker publishes a malicious release under the expected package name. 3. A user follows the instruction in `SKILL.md` and executes: ```bash pip install -r requirements.txt ``` 4. Bec ...[truncated 841 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin every direct dependency to an explicitly reviewed version: ```text Pillow==<reviewed-version> colorgram.py==<reviewed-version> matplotlib==<reviewed-version> ``` 2. Generate and verify cryptographic hashes for all direct and transitive dependencies, then install with: ```bash pip install --require-hashes -r requirements.txt ``` 3. Use a lock-file workflow such as `pip-tools` to resolve and pin the complete transitive dependency graph. 4. Review release notes and vulnerability advisories before updating dependency pins. 5. Perform upgrades through a controlled process with automated tests and dependency scanning. 6. Install dependencies inside an isolated virtual environment under a non-privileged account. 7. Configure pip to use only an approved package index and avoid ad hoc fallback indexes. ]]>
