T08 · Insecure Dependencies
Warning
- Location
- clawhub.json:3
- Finding
- Unpinned Third-Party Dependencies Handle Trading Credentials and Operations<![CDATA[ ## Vulnerability Details **File Location**: `clawhub.json`, lines 3-6 **Vulnerability Type**: Supply-chain exposure through unpinned dependencies **Risk Level**: Medium ### Vulnerable Code ```json "requires": { "pip": ["simmer-sdk", "python-dotenv"], "env": ["SIMMER_API_KEY"] }, ``` ### Technical Analysis The Skill declares `simmer-sdk` and `python-dotenv` without exact versions or package integrity hashes. Consequently, installation may resolve to any version accepted by the package manager at that time. This is particularly security-sensitive for `simmer-sdk`. The Skill imports `SimmerClient` from that dependency and gives it the `SIMMER_API_KEY`: ```python from simmer_sdk import SimmerClient def get_client(): """Initialize Simmer client from environment.""" api_key = os.environ.get("SIMMER_API_KEY") if not api_key: raise RuntimeError("SIMMER_API_KEY not set. Get one at https://simmer.markets/dashboard") venue = os.environ.get("TRADING_VENUE", "polymarket") return SimmerClient(api_key=api_key, venue=venue) ``` The dependency therefore executes inside the Skill's process with access to its environment and authenticated trading operations. The dependency source is not included in the audited project, so its network destinations, credential handling, and order implementation could not be independently verified. Unpinned versions are not proof that the current packages are malicious. They nevertheless create a supply-chain weakness because a compromised publisher account, malicious future release, dependency takeover, or unexpected breaking update could alter the code executed after this Skill has been reviewed. ### Attack Path 1. An attacker compromises the publication process or maintainer account for a declared package, or publishes a malicious version through another package-supply-chain attack. 2. The environment installs dependencies from `clawhub.json` without enforcing a reviewed version or expected pac ...[truncated 963 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin every dependency to a specific, reviewed version, for example: ```text simmer-sdk==<reviewed-version> python-dotenv==<reviewed-version> ``` 2. Generate a lockfile containing cryptographic hashes and require hash verification during installation. 3. Install only from an explicitly configured trusted package index. 4. Review the source and transitive dependency tree of `simmer-sdk`, especially its initialization, authentication, telemetry, and trade-submission code. 5. Use a narrowly scoped, revocable API key with the lowest available trading and account permissions. 6. Run the Skill in a sandbox that restricts filesystem access, environment-variable exposure, and outbound network destinations. 7. Add automated dependency provenance, vulnerability, and unexpected-update checks to the release process. ]]>
