T08 · Insecure Dependencies
Warning
- Location
- clawhub.json:7
- Finding
- Unpinned Privileged Trading Dependency Creates a Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `clawhub.json:7-9` **Vulnerability Type**: Unpinned third-party dependency with access to financial credentials and trading operations **Risk Level**: Medium ### Vulnerable Code Snippet ```json "pip": [ "simmer-sdk" ] ``` The dependency is imported and given the trading API key in `trader.py:48` and `trader.py:186-194`: ```python from simmer_sdk.skill import load_config, update_config, get_config_path ``` ```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", "kalshi") _client = SimmerClient(api_key=api_key, venue=venue, live=live) ``` ### Technical Analysis The project requests `simmer-sdk` without an exact version, artifact hash, or lock-file constraint. Package resolution can therefore select a newer release than the one reviewed when this Skill was published. The package executes in the same Python process as the Skill and is explicitly given `SIMMER_API_KEY`. Like any imported Python module, it can also inspect all environment variables available to the process, including `SOLANA_PRIVATE_KEY` when users follow the manifest requirements. The SDK controls authenticated network requests and trade execution, making it part of the trusted financial execution boundary. The project documentation identifies a package publisher and source repository, but this does not cryptographically bind the package installed from PyPI to a reviewed source ...[truncated 1584 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `simmer-sdk` to an exact, audited version rather than accepting any available version. 2. Use a lock file and verify package artifacts with cryptographic hashes, such as pip's `--require-hashes`. 3. Re-audit the SDK before upgrading the pinned version. 4. Generate a software bill of materials and continuously monitor the dependency and its transitive dependencies for compromise or known vulnerabilities. 5. Run the trading process in a restricted environment with access only to credentials required for the selected execution mode. 6. Keep wallet signing outside the general Python process where possible, using a narrowly scoped signer or wallet service. 7. Apply API-side transaction, venue, and spending limits so a compromised client cannot exercise unrestricted financial authority. ]]>
