T08 · Insecure Dependencies
Error
- Location
- clawhub.json:6
- Finding
- Unpinned privileged third-party trading dependency<![CDATA[ ## Vulnerability Details **File Location**: `clawhub.json:6-10`; related credential use at `trader.py:14, 57-60` **Vulnerability Type**: Supply-chain risk from an unpinned privileged dependency **Risk Level**: High ### Vulnerable Code ```json "requires": { "env": [ "SIMMER_API_KEY" ], "pip": [ "simmer-sdk" ] } ``` The dependency is subsequently imported and given the API credential: ```python from simmer_sdk import SimmerClient ``` ```python _client = SimmerClient( api_key=os.environ["SIMMER_API_KEY"], venue=venue, ) ``` ### Technical Analysis The project installs `simmer-sdk` without an exact version constraint or integrity hash. This package is imported into the application's process and receives a high-value API key used for trading operations. Because dependency installation is not reproducible or integrity-verified, a compromised, malicious, or unexpectedly changed package release could execute arbitrary code at import time, read environment variables, alter market information, or modify trade requests. The audited project does not itself exfiltrate the credential; the risk arises from granting an unpinned dependency privileged access. ### Attack Path 1. An attacker compromises the package distribution account, package repository, or an accepted future release of `simmer-sdk`. 2. The Skill environment installs the dependency without enforcing a reviewed version or hash. 3. Malicious package code executes when `simmer_sdk` is imported. 4. The package reads `SIMMER_API_KEY` from process memory or the environment. 5. The package can exfiltrate the key, falsify SDK responses, or modify real orders when live mode is active. ### Impact Assessment A compromised dependency executes with the same privileges as the Skill process. It could access the trading API key, inspect other process-accessible environment variables, communicate over available network channels, and manipulate simulated or live trading operations. In l ...[truncated 87 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Pin `simmer-sdk` to a specifically audited version rather than accepting arbitrary releases. - Use a lockfile and require cryptographic hashes during dependency installation. - Verify the package publisher and source repository before upgrades. - Review changelogs and source changes before updating the pinned version. - Use a narrowly scoped, revocable trading credential with transaction and balance limits. - Isolate the dependency in a restricted runtime with minimal filesystem, environment-variable, and network access. - Add dependency scanning and provenance verification to the release process. ]]>
