T08 · Insecure Dependencies
Error
- Location
- clawhub.json:3
- Finding
- Unpinned Trading SDK Creates a Supply-Chain Execution Risk<![CDATA[ ## Vulnerability Details **File Location**: `clawhub.json:3-10` **Vulnerability Type**: Unpinned third-party dependency **Risk Level**: High ### Vulnerable Code ```json "requires": { "env": [ "SIMMER_API_KEY" ], "pip": [ "simmer-sdk" ] }, ``` ### Technical Analysis The project declares `simmer-sdk` without an exact version constraint or an integrity hash. Consequently, separate installations can retrieve different package versions even when the reviewed project files remain unchanged. This dependency is security-sensitive because `trader.py` imports `SimmerClient`, passes it the `SIMMER_API_KEY`, uses it to discover markets, and invokes its `trade()` method. Any code executed by the package during installation, import, client initialization, or method calls runs with the same operating-system privileges and environment access as the skill. The audit did not establish that the current package is malicious. The vulnerability is that the effective executable dependency can change after review without any corresponding change to this repository. ### Attack Path 1. An attacker compromises the package publisher account, package registry, source repository, or build pipeline used for `simmer-sdk`. 2. The attacker publishes a modified release under the same package name. 3. A user or automated runtime installs the skill's dependencies without a lockfile, exact version, or hash verification. 4. The package manager selects the attacker-controlled release. 5. Malicious package code executes during installation or when `simmer_sdk` is imported. 6. The package can read `SIMMER_API_KEY`, alter market data, modify order parameters, submit unauthorized trades through the user's authorized account, or access other resources available to the process. ### Impact Assessment A compromised dependency would execute with the privileges of the skill process. Its scope may include: - Access to `SIMMER_API_KEY` and other environment variables visible ...[truncated 456 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `simmer-sdk` to a specific, audited version rather than accepting any available release. 2. Generate and commit a dependency lockfile containing hashes for the complete transitive dependency graph. 3. Require hash verification during installation, such as pip's `--require-hashes`. 4. Install dependencies only from an approved package index or a controlled internal mirror. 5. Review the dependency's source, release provenance, publisher identity, and build process before upgrades. 6. Use automated dependency monitoring while requiring manual approval for security-sensitive SDK updates. 7. Restrict `SIMMER_API_KEY` to the minimum trading permissions and financial limits required by this skill. 8. Run the skill in a sandbox with restricted filesystem, environment-variable, and outbound-network access. ]]>
