T08 · Insecure Dependencies
- Location
clawhub.json:8- Finding
Unbounded Third-Party SDK Version Exposes API Credentials to Supply-Chain Risk
- Content
View full analysis
Vulnerability Details
File Location:
clawhub.json:8-10(dependency declaration); related privileged use atpreflight.py:64-101
Vulnerability Type: Unpinned third-party dependency with access to sensitive credentials
Risk Level: MediumVulnerable Code
clawhub.json:8-10:json "pip": [ "simmer-sdk>=0.17.13" ]The dependency is imported and given the API credential in
preflight.py:64-101:python api_key = os.environ.get("SIMMER_API_KEY") if not api_key: print("ERROR: SIMMER_API_KEY not set", file=sys.stderr) return 2 try: import simmer_sdk as _sdk_mod from simmer_sdk import SimmerClient except ImportError: print( f"ERROR: simmer-sdk not installed — run: pip install 'simmer-sdk>={_SDK_MIN_VERSION}'", file=sys.stderr, ) return 2 _installed_ver = getattr(_sdk_mod, "__version__", "") if not _sdk_meets_floor(_installed_ver): print( f"ERROR: simmer-sdk {_installed_ver or '?'} is below the required >={_SDK_MIN_VERSION} " f"— run: pip install 'simmer-sdk>={_SDK_MIN_VERSION}'", file=sys.stderr, ) return 2 try: client = SimmerClient.readonly(api_key=api_key, venue=_venue) except ValueError as e: print(f"ERROR: {e}", file=sys.stderr) return 2 pf = client.preflight( venue=_venue, planned_amount=planned_amount, exposure_cap_usd=_cap, )Technical Analysis
The version constraint accepts version
0.17.13and every later release. Consequently, installation at different times can resolve to different package code without any corresponding change to the reviewed Skill.Python executes package-level code as soon as
simmer_sdkis imported. The SDK then receivesSIMMER_API_KEYdirectly throughSimmerClient.readonly(). It operates in the same process as the Skill and is not sandboxed, so package code can access the pr ...[truncated 2362 chars]- Remediation
View remediation
Remediation Suggestions
-
Replace the open-ended requirement with an exact, reviewed version:
json "pip": [ "simmer-sdk==0.17.13" ] -
Install from a hash-locked requirements file or equivalent lock mechanism, for example:
text simmer-sdk==0.17.13 \ --hash=sha256:REVIEWED_DISTRIBUTION_HASHInclude hashes for all transitive dependencies as well.
-
Configure installation to use an explicitly trusted package index and disallow unexpected extra indexes. Preserve TLS certificate verification.
-
Review package source and release changes before updating the pinned version. Perform updates through a controlled pull request that refreshes both the version and verified hashes.
-
Run the Skill under a dedicated, minimally privileged operating-system account or container. Restrict readable files, inherited environment variables, and outbound destinations to those required by the Simmer API.
-
Provision the API key with the minimum server-side permissions required for read-only preflight operations, rotate it periodically, and revoke it immediately if dependency compromise is suspected.
-
Avoid writing full
--jsonresults to broadly accessible logs because they can include account identity, wallet addresses, balances, exposure, and risk alerts. Apply log access controls and retention limits.
-
