T08 · Insecure Dependencies
Warning
- Location
- clawhub.json:3
- Finding
- Unpinned Trading SDK Creates a Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `clawhub.json:3-9` **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 a version constraint at `SKILL.md:115-117`: ```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 installs `simmer-sdk` without pinning a version or verifying a package hash. This SDK is imported directly by `trader.py` and receives the high-value `SIMMER_API_KEY`. It is also responsible for market discovery, configuration retrieval, and trade submission. Because no audited version is fixed, a future compromised or malicious package release could be installed automatically. Python modules execute top-level code when imported, so a compromised release would not need to exploit any additional defect in the project. The audit found no evidence that the currently referenced package is malicious. The vulnerability is the absence of controls that ensure the installed dependency remains the reviewed dependency. ### Attack Path 1. An attacker compromises the upstream package publishing account, build pipeline, or distribution artifact. 2. The attacker publishes a malicious version of `simmer-sdk`. 3. The Skill is installed or rebuilt, and the unconstrained dependency resolves to the malicious version. 4. `trader.py` imports `SimmerClient` from the package. 5. Malicious import-time or runtime code executes with the same operating-system privileges as the Skill. 6. The package can access `SIMMER_API_KEY`, observe market and order data, and alter or redirect trading operations. ### Impact Assessment A compromised dependency could obtain all privileges available to the Python process. Within the de ...[truncated 276 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `simmer-sdk` to a specifically reviewed version rather than accepting any available release. 2. Use a lockfile containing hashes for all direct and transitive dependencies. 3. Install dependencies with hash verification, such as `pip install --require-hashes`. 4. Verify the package publisher, source repository, release signatures, and build provenance. 5. Run the trading process with a dedicated low-privilege operating-system account. 6. Restrict the process's filesystem and network access to only what is required. 7. Use a narrowly scoped API credential and rotate it after any suspected dependency compromise. 8. Review and retest dependency updates before changing the pinned version. ]]>
