T08 · Insecure Dependencies
- Location
clawhub.json:4- Finding
Unpinned Third-Party Dependency Executes with Access to Trading Credentials
- Content
View full analysis
Vulnerability Details
File Location:
clawhub.json:4-11; related imports and credential use attrader.py:45andtrader.py:206-220
Vulnerability Type: Supply-chain exposure through an unpinned privileged dependency
Risk Level: HighThe Skill installs
simmer-sdkwithout a version constraint or integrity hash while injecting high-value trading credentials into the same process.json "requires": { "env": [ "SIMMER_API_KEY", "SOLANA_PRIVATE_KEY" ], "pip": [ "simmer-sdk" ] },The dependency is imported and entrusted with the API credential:
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
An unconstrained package requirement allows different dependency versions to be installed over time without a corresponding change to the audited Skill. Python modules execute code during import, and imported code runs with the permissions and environment of the hosting process.
In this case, the process environment is declared to contain
SIMMER_API_KEYandSOLANA_PRIVATE_KEY. The SDK also receives the API key directly whenSimmerClientis instantiated. Consequently, compr ...[truncated 1881 chars]- Remediation
View remediation
Remediation Suggestions
- Pin
simmer-sdkto an exact, reviewed version rather than accepting any available release. - Use a lockfile and enforce package hashes, such as pip hash checking with
--require-hashes. - Review the precise SDK source corresponding to the pinned artifact, including import-time behavior, network destinations, credential handling, and trade execution.
- Verify package provenance and publisher signatures where supported by the distribution channel.
- Run the SDK in an isolated process that receives only the minimum credential required for the selected operation.
- Do not expose the Solana private key to paper-mode, configuration-only, market-discovery, or position-display processes.
- Prefer a narrowly scoped external signing service or wallet adapter over placing a raw wallet private key in the general process environment.
- Apply outbound network restrictions so the process can communicate only with explicitly approved trading endpoints.
- Pin
