T08 · Insecure Dependencies
Error
- Location
- clawhub.json:3
- Finding
- Unpinned Trading SDK Creates a Supply-Chain Execution Risk<![CDATA[ ## Vulnerability Details **File Location**: `clawhub.json:3-9`, `trader.py:21`, `trader.py:62-67` **Vulnerability Type**: Unpinned privileged third-party dependency **Risk Level**: High ### Vulnerable Code ```json "requires": { "env": [ "SIMMER_API_KEY" ], "pip": [ "simmer-sdk" ] } ``` ```python from simmer_sdk import SimmerClient ``` ```python _client = SimmerClient( api_key=os.environ["SIMMER_API_KEY"], venue=venue, ) ``` ### Technical Analysis The project declares `simmer-sdk` without an exact version or an integrity hash. Consequently, installation may resolve to any release accepted by the package manager at installation time. The package is imported directly into the Python process. Python package initialization code executes during import, before the Skill's trading safeguards are applied. The dependency is also explicitly given `SIMMER_API_KEY` when the client is constructed and controls all market-context, market-discovery, and trade API interactions. No evidence was found that the current package is malicious. The vulnerability is the absence of dependency pinning and integrity verification around a dependency operating in a privileged financial context. ### Attack Path 1. An attacker compromises the upstream package account, release pipeline, distribution artifact, or a dependency in its transitive dependency tree. 2. The attacker publishes a new malicious or compromised release under the same package name. 3. A deployment installs `simmer-sdk` without an exact version or required artifact hash. 4. Malicious initialization code executes when `trader.py` imports `simmer_sdk`. 5. The code can read the process environment, including `SIMMER_API_KEY`, or alter the behavior of `SimmerClient`. 6. The compromised client can disclose the credential, falsify market data, or submit unauthorized trades using the application's trading authority. ### Impact Assessment Successful exploitation would execute code with the ...[truncated 512 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `simmer-sdk` to an exact, reviewed version rather than accepting the latest available release. 2. Use a lockfile or requirements file containing cryptographic hashes, and install with hash verification enabled. 3. Review and pin transitive dependencies as well as the direct SDK dependency. 4. Retrieve packages only from an explicitly configured, trusted package index. 5. Run the Skill under a dedicated, least-privileged operating-system identity. 6. Scope `SIMMER_API_KEY` to the minimum required venue, account, order size, and trading permissions. 7. Rotate the key if package integrity is ever in doubt. 8. Consider isolating the SDK in a restricted environment with outbound network access limited to required Simmer or Polymarket endpoints. ]]>
