T08 · Insecure Dependencies
Error
- Location
- SKILL.md:2
- Finding
- Unpinned Third-Party SDK Operates in a Credential-Bearing Trading Process## Vulnerability Details **File Location**: `SKILL.md:2`, with credential-handling context at `SKILL.md:50-58` and SDK initialization at `fastloop_trader.py:235-248` **Vulnerability Type**: Unpinned third-party dependency with access to financial credentials **Risk Level**: High ### Vulnerable Code `SKILL.md:2`: ```yaml metadata: {"clawdbot":{"emoji":"⚡","requires":{"env":["SIMMER_API_KEY"],"pip":["simmer-sdk"]},"cron":null,"autostart":false,"automaton":{"managed":true,"entrypoint":"fastloop_trader.py"}}} ``` Credential setup documented at `SKILL.md:50-58`: ```markdown 1. **Ask for Simmer API key** - Get from simmer.markets/dashboard → SDK tab - Store in environment as `SIMMER_API_KEY` 2. **Ask for wallet private key** (required for live trading) - This is the private key for their Polymarket wallet (the wallet that holds USDC) - Store in environment as `WALLET_PRIVATE_KEY` - The SDK uses this to sign orders client-side automatically — no manual signing needed ``` SDK loading and API-key delivery at `fastloop_trader.py:235-248`: ```python def get_client(live=True): """Lazy-init SimmerClient singleton.""" global _client if _client is None: try: from simmer_sdk import SimmerClient except ImportError: print("Error: simmer-sdk not installed. Run: pip install simmer-sdk") sys.exit(1) api_key = os.environ.get("SIMMER_API_KEY") if not api_key: print("Error: SIMMER_API_KEY environment variable not set") print("Get your API key from: simmer.markets/dashboard → SDK tab") sys.exit(1) venue = os.environ.get("TRADING_VENUE", "polymarket") _client = SimmerClient(api_key=api_key, venue=venue, live=live) return _client ``` ### Technical Analysis The Skill declares `simmer-sdk` without an exact version, integrity hash, lock file, or verified ...[truncated 2722 chars]
- Remediation
- ## Remediation Suggestions 1. Pin `simmer-sdk` to a reviewed exact version rather than accepting the latest available release. 2. Use a lock file with cryptographic hashes, such as a hash-locked requirements file generated by `pip-tools`. 3. Install only from an explicitly trusted package index and verify package provenance, publisher identity, and release signatures where available. 4. Review SDK updates before changing the pinned version, including dependency-tree and source-diff analysis. 5. Separate wallet signing from the market-analysis process. Prefer a restricted signing service, hardware-backed signer, or wallet interface that does not expose the raw private key to Python dependencies. 6. Apply wallet and API restrictions where supported, including limited allowances, withdrawal restrictions, per-order limits, and short-lived or narrowly scoped credentials. 7. Run the trading process under a dedicated, unprivileged operating-system account with minimal filesystem and network access. 8. Restrict outbound network destinations to the documented Binance, Polymarket, and Simmer endpoints so unexpected credential-exfiltration destinations are blocked. 9. Avoid storing `WALLET_PRIVATE_KEY` directly in a broadly inherited process environment when a safer secret-delivery or signing mechanism is available. 10. Add dependency scanning and provenance verification to release and installation workflows.
