T08 · Insecure Dependencies
- Location
clawhub.json:3- Finding
Unpinned Third-Party SDK Executes with Access to High-Value Trading Credentials
- Content
View full analysis
Vulnerability Details
File Location:
clawhub.json:3-11; related runtime usage intrader.py:45andtrader.py:220-231
Vulnerability Type: Unpinned privileged dependency / software supply-chain risk
Risk Level: MediumComplete Code Snippet:
json "requires": { "env": [ "SIMMER_API_KEY", "SOLANA_PRIVATE_KEY" ], "pip": [ "simmer-sdk" ] },Related runtime initialization:
python from simmer_sdk.skill import load_config, update_config, get_config_pathpython 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) return _clientTechnical Analysis
The Skill declares
simmer-sdkwithout an exact version, lock file, or integrity hash. Package installation can therefore resolve to a later release whose code differs from the version originally reviewed. The dependency is imported and executed in the same Python process as the Skill.That process is configured to receive
SIMMER_API_KEYandSOLANA_PRIVATE_KEY. The code explicitly reads the API key and passes it toSimmerClient, which is necessary for authenticated market operations. The project code does not directly read or transmitSOLANA_PRIVATE_KEY; however, the key remains available in the process environment and can be read by imp ...[truncated 1809 chars]- Remediation
View remediation
Remediation Suggestions
- Pin
simmer-sdkto a specifically audited version rather than accepting arbitrary future releases. - Install dependencies from a lock file containing cryptographic hashes, such as a hash-locked requirements file generated through a controlled build process.
- Verify the package publisher, source repository, release signatures, and artifact hashes before upgrades.
- Run dependency vulnerability and provenance checks in CI, and require review whenever the pinned version or hash changes.
- Remove
SOLANA_PRIVATE_KEYfrom the Skill's unconditional environment requirements unless the selected execution path demonstrably requires it. - Provision wallet credentials only for explicit
--liveexecution. Dry-run, configuration, discovery, and position-display modes should run without access to the private key. - Use a restricted trading wallet with minimal funds and narrowly scoped API credentials. Apply server-side spending, venue, and withdrawal restrictions where supported.
- Isolate the trading process using a dedicated environment or container with a minimal filesystem, restricted outbound network access, and no unrelated credentials.
- Rotate and revoke credentials immediately if an untrusted dependency version has already executed in the credential-bearing environment.
- Pin
