T08 · Insecure Dependencies
Warning
- Location
- PUBLISH.md:55
- Finding
- Unpinned Third-Party Dependencies Create a Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `PUBLISH.md:55-57` **Vulnerability Type**: Unpinned third-party package installation **Risk Level**: Medium ### Technical Analysis The installation instructions direct users to install externally resolved packages without version constraints, integrity hashes, or a lock file: ```bash clawhub install chinese-workdays ``` ```bash pip install pyyaml ``` The application subsequently imports and executes the installed `yaml` package: ```python import yaml ``` Because no reviewed version or artifact hash is specified, the installed code depends on the package repository's state at installation time. A compromised package release, package-index compromise, dependency substitution, or future malicious release could result in unreviewed code running during installation or when the Skill imports the dependency. No evidence indicates that the current `PyYAML` package is malicious. The issue is the absence of controls that make dependency resolution reproducible and resistant to supply-chain compromise. ### Attack Path 1. An attacker compromises a dependency release, its publisher account, or the package distribution channel. 2. A user follows the documented `pip install pyyaml` instruction. 3. The package manager resolves and installs the attacker-controlled or compromised release because no version or hash restriction is present. 4. Malicious package installation logic may execute during installation. 5. The Skill imports `yaml`, allowing malicious module initialization code to execute in the Skill process. 6. The payload operates with the permissions of the user or service account that installed or launched the Skill. ### Impact Assessment Successful exploitation could permit arbitrary code execution with the privileges of the installing user or the account running the Skill. Depending on that account's permissions, the compromised dependency could read or modify accessible files, access environment vari ...[truncated 313 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin each dependency to a reviewed version, for example through a version-controlled requirements file. 2. Generate and verify cryptographic hashes for every resolved package: ```text PyYAML==<reviewed-version> --hash=sha256:<verified-hash> ``` 3. Install with hash enforcement: ```bash python -m pip install --require-hashes -r requirements.txt ``` 4. Use a lock file that records transitive dependencies and artifact hashes. 5. Explicitly document the trusted package index and disable unintended extra indexes where practical. 6. Regularly scan pinned dependencies for disclosed vulnerabilities before updating them. 7. Perform dependency installation in an isolated virtual environment under a non-privileged account. 8. Apply equivalent version and integrity controls to the documented `clawhub` package installation process where supported. ]]>
