T08 · Insecure Dependencies
- Location
fastloop_improved.py:169- Finding
Unpinned Third-Party Dependency Receives the Wallet Private Key
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill largely matches its trading purpose, but it can automate real-money Polymarket trades using a wallet key and has weak scoping, dependency, secret, and budget controls that require review before installation.
Review this before installing as a live trading skill. Use only a dedicated low-balance wallet, avoid setting WALLET_PRIVATE_KEY unless you intend real-money trading, pin and audit simmer-sdk, rotate/remove the embedded NOFX credential, and require stronger live-trade confirmation plus atomic budget enforcement before relying on the daily limit.
fastloop_improved.py:169Unpinned Third-Party Dependency Receives the Wallet Private Key
fastloop_improved.py:359Hardcoded NOFX API Credential Exposed in Source and URL Query Strings
fastloop_improved.py:603Non-Atomic Daily Budget Enforcement Allows Concurrent Overspending
The documented behavior does not fully match the described scope: the skill reportedly supports additional time windows, extra market discovery sources, and undeclared persistent local ledgers/state beyond the advertised strategy. For a trading skill handling API credentials and an optional wallet private key, hidden or underdocumented behaviors materially increase operational risk because reviewers may approve it under false assumptions about where data is sent, what gets stored, and when trades can occur.
The script enables real-money trading solely through a --live flag and immediately executes strategy logic without an interactive confirmation, explicit risk acknowledgment, or final pre-trade guard. In the context of an automated trading skill that can also pick up a wallet private key from the environment, this increases the chance of accidental live execution and financial loss from operator mistake, automation misconfiguration, or malicious invocation by another component.
The skill declares access to sensitive capabilities through behavior implied in the documentation—environment secrets, local file read/write, and network access—but does not scope or declare those permissions explicitly. In an agent ecosystem, this weakens least-privilege controls and informed review, increasing the chance that API keys, wallet material, or local state files are exposed or misused by an overprivileged runtime.
The script reads WALLET_PRIVATE_KEY from the environment to enable live trading, but the file does not include a docstring, comment, or warning explaining the sensitivity of this credential or the consequences of providing it. Accessing private keys is safety-critical because it changes the execution mode and can authorize real financial actions.
The code embeds a hard-coded NOFX API credential directly in outbound requests, which exposes secret material to anyone with file access and makes unauthorized reuse trivial. In a trading skill, this also creates operational risk because the credential can be harvested, abused, revoked, or tied back to the operator, disrupting service and potentially incurring account-level consequences.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def fetch_binance_orderbook(asset="BTC", limit=100):
url = f"https://api.binance.com/api/v3/depth?symbol={ASSET_SYMBOLS.get(asset, 'BTCUSDT')}&limit={limit}"
res = _api_request(url)
if not res or "bids" not in res: return None
bids, asks = [[float(i[0]), float(i[1])] for i in res["bids"]], [[float(i[0]), float(i[1])] for i in res["asks"]]
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def fetch_binance_orderbook(asset="BTC", limit=100):
url = f"https://api.binance.com/api/v3/depth?symbol={ASSET_SYMBOLS.get(asset, 'BTCUSDT')}&limit={limit}"
res = _api_request(url)
if not res or "bids" not in res: return None
bids, asks = [[float(i[0]), float(i[1])] for i in res["bids"]], [[float(i[0]), float(i[1])] for i in res["asks"]]
When no wallet key is present, the code logs SIMULATION (Dry Run: {live}), but live is passed directly from get_client(live=not dry_run), so a dry run corresponds to live=False, not live=True. This comment/logging intent is actively misleading about whether execution is a dry run versus live client mode.