T08 · Insecure Dependencies
Warning
- Location
- clawhub.json:2
- Finding
- Unpinned Third-Party Dependency Receives Trading Credentials and Controls Trade Execution<![CDATA[ ## Vulnerability Details **File Location**: `clawhub.json:2-9`; credential handoff occurs at `trader.py:9, 51-55` **Vulnerability Type**: Unpinned security-sensitive dependency **Risk Level**: Medium ### Complete Code Snippet ```json { "emoji": "🎵", "requires": { "env": [ "SIMMER_API_KEY" ], "pip": [ "simmer-sdk" ] }, ``` The dependency is imported and given the credential as follows: ```python from simmer_sdk import SimmerClient _client = SimmerClient( api_key=os.environ["SIMMER_API_KEY"], venue=venue, ) ``` ### Technical Analysis The project declares `simmer-sdk` without an exact version constraint, lockfile, or package integrity hash. Consequently, installation may retrieve a different package release from the one that was originally reviewed. This dependency is security-sensitive: imported package code executes inside the process, receives `SIMMER_API_KEY`, performs market queries, applies remotely managed configuration, and controls trade submission. A compromised publisher account, malicious future release, or upstream package compromise could therefore affect both credential confidentiality and transaction integrity. The repository itself does not contain evidence that the current dependency is malicious. The vulnerability is the absence of reproducible and integrity-verified dependency resolution around a component entrusted with live trading authority. ### Attack Path 1. An attacker compromises the dependency's distribution account or causes a malicious release of `simmer-sdk` to become available. 2. The Skill is installed or rebuilt after that release. 3. Because no version or hash is pinned, the package installer resolves the attacker-controlled release. 4. `trader.py` imports the installed package, executing its module-level code. 5. `get_client()` passes `SIMMER_API_KEY` to the attacker-controlled `SimmerClient`. 6. The malicious package can transmit the key externally, alter market da ...[truncated 658 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `simmer-sdk` to an exact, audited version rather than accepting any available release. 2. Use a lockfile or hash-verified installation mechanism so package artifacts are reproducible and tampering causes installation to fail. 3. Review the pinned package source and its transitive dependencies before enabling live trading. 4. Run the dependency with a narrowly scoped, revocable API key that cannot withdraw funds and has strict server-side transaction limits. 5. Separate paper-trading and live-trading credentials. 6. Monitor dependency advisories and require an explicit security review before upgrading the pinned version. 7. Where supported, validate trade parameters independently before handing them to the SDK and reconcile submitted orders against server-side account activity. ]]>
