T08 · Insecure Dependencies
- Location
requirements.txt:1- Finding
Unpinned Automatically Installed Dependency Creates Supply-Chain Risk
- Content
View full analysis
=1.0 ``` The Skill documentation states that this dependency may be installed automatically: ```text Requires the `gtfs-realtime-bindings` pip package (auto-installed via ClawHub; otherwise `pip install -r requirements.txt`). ``` ### Technical Analysis The version constraint accepts every current or future `gtfs-realtime-bindings` release at or above version 1.0. No lock file, exact version, package hash, or controlled package index is specified. As a result, installation is not reproducible. A package version published after the Skill was reviewed can be selected automatically without the Skill source changing. Python packages may execute code during installation and whenever their modules are imported. This project imports the dependency through: ```python from google.transit import gtfs_realtime_pb2 ``` This finding does not establish that the current package is malicious. It establishes that the dependency policy permits an unreviewed future package release to enter the execution environment. ### Attack Path 1. An attacker compromises the dependency publisher account, upstream repository, release process, or package-distribution infrastructure. 2. The attacker publishes a malicious version satisfying `>=1.0`. 3. ClawHub or a user installs the Skill without a previously locked dependency environment. 4. The package resolver selects the attacker-controlled release. 5. Malicious package code executes during installation or when the imported module is loaded. 6. The code operates with the privileges of the user or Agent process that performed the installation or invoked the Skill. ### Impact Assessment Successful exploitation could provide arbitrary code execution under the Agent's operating-system account. The resulting scop ...[truncated 333 chars]- Remediation
View remediation
``` 2. Generate and verify cryptographic package hashes, such as through a hash-pinned requirements file: ```text gtfs-realtime-bindings== --hash=sha256: ``` 3. Maintain a lock file generated through a controlled dependency-resolution process. 4. Configure installation to use a trusted package index and disable unexpected fallback indexes. 5. Review dependency release notes and package contents before updating the pinned version. 6. Run installation and Skill execution under a minimally privileged account or isolated environment. ]]>
