T08 · Insecure Dependencies
Error
- Location
- clawhub.json:6
- Finding
- Unpinned Third-Party Trading Dependency<![CDATA[ ## Vulnerability Details **File Location**: `clawhub.json:6-9`, `trader.py:42`, `SKILL.md:135-139` **Vulnerability Type**: Supply-chain exposure through an unpinned privileged dependency **Risk Level**: High ### Vulnerable Code ```json "requires": { "env": [ "SIMMER_API_KEY" ], "pip": [ "simmer-sdk" ] } ``` The dependency is imported directly by the trading application: ```python from simmer_sdk import SimmerClient ``` ### Technical Analysis The project installs `simmer-sdk` without an exact version constraint, lock file, or integrity hash. Package resolution can consequently select a different release on future installations. This dependency operates in a security-sensitive context: it is imported into the main process, receives `SIMMER_API_KEY`, communicates with market services, and submits simulated or live orders. Python package initialization code also executes during import. A compromised package release, compromised publisher account, or unsafe package-index configuration could therefore introduce arbitrary code with the same operating-system privileges as the trader. This finding does not establish that the current `simmer-sdk` release is malicious. The vulnerability is the absence of controls that guarantee future installations use the reviewed dependency artifact. ### Attack Path 1. An attacker compromises the package publisher, distribution account, package index, or release pipeline for `simmer-sdk`. 2. The attacker publishes a modified release containing malicious initialization or client code. 3. A new skill installation resolves the unconstrained dependency to the compromised release. 4. `trader.py` imports the package, executing its code inside the trader process. 5. The malicious dependency reads the API key passed to `SimmerClient`, accesses other process-readable data, or modifies trading requests. 6. The attacker may exfiltrate credentials or submit unauthorized orders under the victim's trading authority ...[truncated 384 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `simmer-sdk` to an exact, reviewed version rather than using an unconstrained package name. 2. Generate a lock file and require cryptographic hashes for all direct and transitive dependencies, such as with `pip-compile --generate-hashes`. 3. Install packages with hash verification enabled and from an explicitly trusted index. 4. Verify the package publisher, source repository, release signatures, and correspondence between source and distributed artifacts. 5. Run the trader in a restricted environment with minimal filesystem and network permissions. 6. Use a trading credential with the least authority possible, including venue, order-size, and account-level restrictions where supported. 7. Establish dependency update review and vulnerability scanning before accepting newer SDK releases. ]]>
