T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:4
- Finding
- Unpinned Third-Party Python Dependency<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 4 **Vulnerability Type**: Unpinned third-party dependency and supply-chain risk **Risk Level**: Medium ### Vulnerable Code ```json metadata: {"openclaw":{"requires":{"bins":["curl","python3"]},"install":[{"id":"python","kind":"pip","package":"requests","bins":[],"label":"Install requests (pip)"}]}} ``` ### Technical Analysis The installation metadata requests the `requests` package by name without specifying an exact version, locking its transitive dependencies, or providing integrity hashes. Consequently, the installed code is selected by the package resolver at installation time rather than being identical to a dependency version reviewed with this Skill. This creates a supply-chain exposure: a compromised package release, compromised transitive dependency, unsafe package-index configuration, dependency substitution, or future incompatible release could introduce attacker-controlled code or unexpected behavior. The project contains no evidence that `requests` is currently malicious; the vulnerability is the absence of controls ensuring that the installed dependency is the reviewed dependency. ### Attack Path 1. A user or automated Skill installer processes the installation metadata in `SKILL.md`. 2. The installer invokes pip to resolve `requests` without a version or hash constraint. 3. Pip consults its configured package index and dynamically selects a release of `requests` and its transitive dependencies. 4. If the index, selected release, dependency, or local pip configuration has been compromised, attacker-controlled package content is downloaded. 5. Malicious package behavior can execute during installation or when the Skill imports and uses the package. 6. The code runs with the permissions of the user or service account performing the installation or invoking the Skill. ### Impact Assessment Successful exploitation could execute arbitrary code within the Python installatio ...[truncated 505 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Prefer eliminating the external dependency by using Python's standard-library HTTP client where practical. 2. If `requests` is retained, pin it to an explicitly reviewed version, such as an exact `==` constraint. 3. Lock every transitive dependency rather than relying on installation-time resolution. 4. Require cryptographic hashes for all locked packages, for example through a hash-locked requirements file and pip's `--require-hashes` option. 5. Install packages only from an approved HTTPS package index; disable untrusted supplemental indexes. 6. Periodically review and deliberately update the lock file after vulnerability and compatibility testing. 7. Install the dependency inside an isolated, least-privileged virtual environment or container rather than a system-wide Python environment. ]]>
