T08 · Insecure Dependencies
Warning
- Location
- clawhub.json:6
- Finding
- Unpinned Trading SDK Creates a Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `clawhub.json:6-10` **Vulnerability Type**: Unpinned third-party dependency **Risk Level**: Medium ### Vulnerable Code ```json "requires": { "env": [ "SIMMER_API_KEY" ], "pip": [ "simmer-sdk" ] } ``` The dependency is also documented without an exact version in `SKILL.md:119-122`: ```markdown ## Dependency `simmer-sdk` by Simmer Markets (SpartanLabsXyz) - PyPI: https://pypi.org/project/simmer-sdk/ - GitHub: https://github.com/SpartanLabsXyz/simmer-sdk ``` ### Technical Analysis The project declares `simmer-sdk` without an exact version or package integrity hash. Consequently, installation can resolve to a different package release over time without any change to the audited project. This dependency operates in a particularly sensitive trust boundary. `trader.py` imports `SimmerClient`, gives it `SIMMER_API_KEY`, and uses it for market discovery, context retrieval, and real-money trade execution. A compromised, malicious, or unexpectedly incompatible future release would execute in the same Python process and inherit access to the process environment and the trading credential. This finding does not establish that the current `simmer-sdk` package is malicious. It identifies the absence of controls that bind installations to a reviewed artifact. ### Attack Path 1. An attacker compromises the dependency's publishing account, distribution channel, or a future release process. 2. The attacker publishes a malicious release under the legitimate `simmer-sdk` package name. 3. A deployment installs the project and resolves the unpinned requirement to that release. 4. Python imports the malicious package when `trader.py` starts. 5. The package executes with the application's privileges and receives or can read `SIMMER_API_KEY`. 6. It can exfiltrate the credential, alter market information, or manipulate calls intended to submit live trades. ### Impact Assessment Successful exploitation would ...[truncated 336 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Pin `simmer-sdk` to an exact, reviewed version rather than allowing unconstrained resolution. - Use a lock file with cryptographic hashes, or an installation mechanism equivalent to `pip --require-hashes`. - Verify that packages are downloaded only from the intended official registry. - Review release provenance, maintainer ownership, and source changes before upgrading. - Test upgrades in an isolated environment before permitting access to production credentials. - Restrict the API key to the minimum account and trading privileges supported by the service. - Rotate the credential if dependency compromise is suspected. ]]>
