Back to skill

Security audit

Thetanuts Openclaw

Security checks for vulnerabilities and agentic risk

Overview

This crypto trading skill is mostly coherent, but it handles wallet seeds and updates security-critical code in ways users should review carefully before installing.

Review this skill before installing. Use only a dedicated low-value wallet, assume the local .env seed is highly sensitive, avoid running the updater unless you trust and verify the source, and check token approvals carefully because one order-fill path can approve more than the immediate trade requires.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (4)

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/update.sh:100
Finding

Unverified Remote Update Script Is Downloaded and Executed

Content
View full analysis
/dev/null; then if curl -s -f --connect-timeout 10 "$url" -o "$tmp_file" 2>/dev/null; then echo "$tmp_file" return 0 fi elif command -v wget &> /dev/null; then if wget -q --timeout=10 "$url" -O "$tmp_file" 2>/dev/null; then echo "$tmp_file" return 0 fi fi rm -f "$tmp_file" return 1 } ``` ```bash if version_gt "$REMOTE_VERSION" "$LOCAL_VERSION"; then echo -e "${GREEN}New version available!${NC}" echo "" # Get update URL from manifest UPDATE_SCRIPT_URL=$(grep -o '"updateUrl"[[:space:]]*:[[:space:]]*"[^"]*"' "$MANIFEST_FILE" | head -1 | cut -d'"' -f4) if [ -n "$UPDATE_SCRIPT_URL" ]; then echo "Fetching update script..." UPDATE_SCRIPT=$(mktemp) if curl -s -f "$UPDATE_SCRIPT_URL" -o "$UPDATE_SCRIPT" 2>/dev/null || \ wget -q "$UPDATE_SCRIPT_URL" -O "$UPDATE_SCRIPT" 2>/dev/null; then echo "Running update..." echo "" # CRITICAL: Never modify .env export PROTECT_ENV=1 export BASE_DIR="$BASE_DIR" bash "$UPDATE_SCRIPT" rm -f "$UPDATE_SCRIPT" echo -e "${GREEN}✅ Update complete!${NC}" else echo -e "${RED}❌ Failed to fetch update script${NC}" rm -f "$UPDATE_SCRIPT" fi else echo -e "${YELLOW}⚠ No updateUrl i ...[truncated 2786 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/update.sh:100
Finding

Documented Update Confirmation Is Not Enforced by the Updater

Content
View full analysis
/dev/null || \ wget -q "$UPDATE_SCRIPT_URL" -O "$UPDATE_SCRIPT" 2>/dev/null; then echo "Running update..." echo "" # CRITICAL: Never modify .env export PROTECT_ENV=1 export BASE_DIR="$BASE_DIR" bash "$UPDATE_SCRIPT" rm -f "$UPDATE_SCRIPT" echo -e "${GREEN}✅ Update complete!${NC}" else echo -e "${RED}❌ Failed to fetch update script${NC}" rm -f "$UPDATE_SCRIPT" fi else echo -e "${YELLOW}⚠ No updateUrl in manifest - manual update required${NC}" fi fi ``` ### Technical Analysis The documented command is described as being usable either to check for an update or to apply one. Howeve ...[truncated 1878 chars]
Remediation
View remediation
` authorization rather than relying on prose instructions. 6. Never treat checking and applying as the same command path. 7. Update `SKILL.md` and `README.md` so their consent flow precisely matches the implemented behavior. 8. Combine these changes with cryptographic update verification; confirmation alone does not make an unauthenticated payload safe. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/wallet-create.js:55
Finding

Plaintext Wallet Seed Is Stored Without Enforced Restrictive Permissions

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/fill-order.ts:275
Finding

Order Filling Silently Approves Ten Times the Required Token Amount

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (249)

Missing User Warnings

Critical
Category
Not specified by scanner
Confidence
100% confidence
Finding

The script includes the full seed phrase in the returned result and prints it to stdout as JSON, which can be captured by terminal history, logs, parent processes, orchestration layers, or other monitoring systems. Exposure of the mnemonic grants total control over the wallet and all current and future funds derived from it.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The code chunk only implements RFQ request construction/encoding for vanilla and multi-strike options. It validates inputs, determines structure type, chooses collateral, builds an RFQ request via ThetanutsClient, and outputs unsigned transaction calldata. It does not execute trades, fill orderbook orders, manage wallets, maintain WebSocket connections, handle early settlement, process referrer fees, or implement the broader RFQ lifecycle such as receiving/responding to maker quotes. The declared description is therefore materially broader than the actual behavior shown in this code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents a full-featured Thetanuts Finance crypto options trading skill. However, the supplied code only computes option payout math locally from user-provided inputs and prints JSON results. Although it imports ThetanutsClient and JsonRpcProvider, they are not used for any network or protocol interaction. The code’s primary purpose is payout calculation, not trading or lifecycle management, so the description materially overstates and misrepresents the actual behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

There is a clear description-behavior mismatch. While the declared purpose centers on Thetanuts Finance crypto options trading features, this code chunk only creates wallets for EVM or Solana using a generated mnemonic. Wallet management is mentioned in the description, but this specific implementation is limited to wallet creation and key derivation, and it omits the core advertised trading-related capabilities entirely. Because the actual primary purpose of this chunk is wallet generation rather than options trading operations, it should be flagged as a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The description claims a broad trading and lifecycle management capability set, but the code chunk only fetches and displays orderbook data. It does not place, fill, modify, or settle orders; does not manage wallets; does not use WebSockets; and does not implement RFQ or fee/referral features. While 'orderbook' is mentioned in the description, the actual code is much narrower than the declared purpose, making the description materially inaccurate for this code chunk. Additionally, the script accepts an --underlying argument but never applies that filter, reinforcing that behavior is limited to simple fetch-and-format order retrieval.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The code’s primary purpose is balance retrieval for wallet accounts on Base/EVM or Solana using a seed phrase. While the declared description includes a broad wallet management aspect, the dominant described functionality is Thetanuts Finance options trading and related workflows, none of which appear in this code chunk. This is therefore a material description-to-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The declared description presents a full-featured crypto options trading skill, but the actual code only retrieves market maker pricing data via client.mmPricing.getAllPricing, applies optional filters for option type and expiry, and outputs formatted pricing information. This is a materially narrower and different behavior than trading or lifecycle management. While pricing retrieval is related to options activity on Thetanuts Finance, the main claimed capabilities are not implemented in this code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description presents a broad trading skill with many active options-trading capabilities. In contrast, this code chunk is narrowly focused on a single read-only task: retrieving and displaying a user's positions from Thetanuts Finance. It does not place trades, manage orders, handle RFQs, use WebSockets, manage wallets, settle positions early, or process referrer fees. The code's primary purpose is materially different from the declared purpose, so this is a clear mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The description presents a broad transactional trading skill for Thetanuts Finance, but the code chunk only performs read-only retrieval of current market prices and protocol statistics. Its primary purpose is market/protocol data fetching, not options trading or lifecycle management. This is a material description-behavior mismatch because the declared core capabilities are absent from the provided implementation.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared purpose centers on Thetanuts Finance crypto options trading workflows and related exchange features. However, the supplied code only performs wallet import/address derivation from a mnemonic seed for EVM or Solana. While 'wallet management' is mentioned in the description, this specific code chunk is narrowly focused on importing a wallet and does not support or connect to the broader declared trading functionality. The primary purpose of the code is materially different from the declared skill behavior, so this is a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This code chunk does not perform crypto options trading, order management, RFQ lifecycle handling, WebSocket communication, settlement, or referrer fee logic. Its primary purpose is credential/secret handling for a wallet seed, which is only a narrow supporting piece of wallet access and not an implementation of the declared trading functionality. It also accesses resources not implied by the description, namely environment variables and local filesystem seed files. Therefore the supplied code behavior is materially different from the declared purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description focuses on end-user trading capabilities on Thetanuts Finance: orderbook fills, RFQ lifecycle, multi-strike options structures, real-time WebSocket support, wallet management, early settlement, and referrer fees. However, this code chunk does not implement those trading behaviors. Instead, it is purely an onboarding/setup script that prepares a local WDK MCP runtime, creates configuration files, installs dependencies, and prints next steps for wallet scripts. While some installed dependencies relate to Thetanuts and wallet tooling, the actual behavior in this chunk is operational bootstrapping, not the declared product functionality. This is a materially different primary purpose, so it should be flagged as a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The declared description suggests a specialized Thetanuts Finance options trading skill with domain-specific features such as orderbook fills, RFQ handling, multi-strike structures, WebSocket updates, early settlement, and referrer fees. This code does not implement any of those trading-specific behaviors. Instead, it provides a generic wallet-backed transaction sender that can broadcast arbitrary calldata to any EVM address on Base. While wallet management is loosely related to the description, the primary purpose and effective capability here are much broader and materially different: unrestricted transaction execution rather than Thetanuts options operations. That is a significant description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This code chunk does not implement or support the declared Thetanuts Finance crypto options trading functionality. Its primary purpose is message signing using a wallet derived from seed material, which is a distinct and sensitive capability not reflected in the description. While 'wallet management' is mentioned in the declared purpose, that does not reasonably cover a dedicated arbitrary message-signing utility as the main behavior of the code. The code also lacks any trading-specific logic such as order placement/fills, RFQ lifecycle handling, multi-strike structures, real-time WebSocket operations, early settlement, or referrer fee handling. Therefore, the description materially misrepresents what this code actually does.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description says the skill performs crypto options trading-related actions on Thetanuts Finance. The actual code chunk does not implement any trading, RFQ lifecycle, market data/WebSocket, wallet management, settlement, or referrer-fee behavior. Instead, it is an operational maintenance script for self-updating the skill/runtime: it reads local version data, fetches a remote manifest, potentially downloads and executes an update script, manipulates local dependencies, and restarts a runtime process. These are materially different capabilities and resources from the declared purpose. While update scripts can be supporting infrastructure for a skill, this code chunk itself is not representative of the declared trading functionality, so this is a clear description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description centers on executing and managing crypto options trades on Thetanuts Finance. The actual code does not interact with Thetanuts, exchanges, orderbooks, RFQs, settlement systems, or referral logic. Instead, its primary purpose is wallet inspection: reading a mnemonic from a local .env file, deriving accounts, and querying native/token balances on several chains through RPC. While 'wallet management' appears in the description, this specific code chunk is not implementing the broader declared trading workflow and instead performs a materially different, undeclared balance-checking capability. Therefore this is a clear description/behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This is a clear description/behavior mismatch. While the declared purpose focuses on Thetanuts Finance crypto options trading workflows, the code chunk only handles wallet initialization and configuration. Wallet management is mentioned in the description, but this code specifically creates a fresh mnemonic, stores it in a local env file, derives addresses on Base and Solana, and outputs the sensitive seed phrase. None of the core declared trading capabilities—orderbook fills, RFQ lifecycle, multi-strike structures, real-time WebSocket handling, early settlement, or referrer fees—appear in this code. The actual primary purpose is wallet provisioning, not options trading integration.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The supplied code does not implement crypto options trading or any Thetanuts Finance-specific functionality. Instead, it performs wallet configuration discovery: reading a local environment file, validating a mnemonic seed, deriving EVM and Solana addresses, and returning wallet metadata. While 'wallet management' is mentioned in the declared description, this code only covers a narrow wallet-discovery/derivation function and lacks the core declared capabilities. The primary purpose is therefore materially different from the declared trading-oriented description.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This code does not implement crypto options trading behavior. Its primary purpose is wallet seed import and local environment configuration. While 'wallet management' is mentioned in the description, that is only one broad sub-area and does not adequately represent the actual behavior here, especially because the code handles highly sensitive seed ingestion and storage to disk. There is no evidence of Thetanuts Finance integration, orderbook fills, RFQ lifecycle, multi-strike options structures, WebSocket streaming, early settlement, or referrer fee functionality. Therefore the description materially misrepresents the supplied code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This is a clear mismatch. The declared description centers on trading crypto options on Thetanuts Finance and related market/protocol features. The supplied code does not interact with Thetanuts, any exchange, or any options/RFQ/orderbook system. Instead, it performs local wallet configuration: reading and writing ~/.openclaw/wdk-mcp/.env, validating WDK_SEED, selecting active chain/family/index, and deriving an address using wallet libraries. While the description mentions wallet management, that is only one small part of the declaration, and this code chunk’s actual primary purpose is wallet selection/configuration rather than options trading functionality. Therefore the description does not accurately represent this code chunk.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 26)May include surrounding context.

md
The agent must NEVER run `update.sh` automatically. Updates change code that signs

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 30)May include surrounding context.

md
The agent must NEVER run `update.sh` automatically. Updates change code that signs

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 1819)May include surrounding context.

md
The agent must NEVER run `update.sh` automatically. Updates change code that signs

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 1826)May include surrounding context.

md
The agent must NEVER run `update.sh` automatically. Updates change code that signs

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 86)May include surrounding context.

md
1. Show wallet address and balances (run `wallet-discover.js` + `wallet-balance.js`)

Static analysis

Detected: suspicious.secret_argv_exposure

Instructions pass high-value credentials through process argv.

Critical
Code
suspicious.secret_argv_exposure
Location
SKILL.md:1724