Back to skill

Security audit

Goodwallet Trading

Security checks for vulnerabilities and agentic risk

Overview

This is a real GoodWallet trading skill, but it needs Review because it can sign broad on-chain actions with weak safeguards that could expose credentials or cause irreversible wallet mistakes.

Review carefully before installing. Use only testnet funds unless you have independently audited the package, avoid contract-call unless you can decode the calldata yourself, always specify exact approval amounts, do not rely on the documented slippage option for price protection, and do not set SIGN_URL or RPC_URL from untrusted shell profiles, wrappers, or CI environments.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
index.js:110
Finding

Wallet API Credential Exfiltration Through an Unvalidated Signing Endpoint

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
index.js:400
Finding

DEX Swaps Disable Minimum-Output and Slippage Protection

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
index.js:328
Finding

Unlimited ERC20 Allowance Is Granted by Default

Content
View full analysis
', 'ERC20 token contract address') .requiredOption('--spender ', 'Spender address (e.g. DEX router)') .option('-a, --amount ', 'Amount to approve (default: unlimited)') .option('--rpc ', 'RPC URL', HOODI_RPC) .action(async (options) => { const config = await loadConfig(); requireConfig(config); const client = createPublicClient({ chain: hoodi, transport: http(options.rpc) }); let amount; if (options.amount) { const decimals = await client.readContract({ address: options.token, abi: ERC20_ABI, functionName: 'decimals' }); amount = parseUnits(options.amount, decimals); } else { amount = 2n ** 256n - 1n; // max uint256 } const symbol = await client.readContract({ address: options.token, abi: ERC20_ABI, functionName: 'symbol' }).catch(() => 'TOKEN'); const data = encodeFunctionData({ abi: ERC20_ABI, functionName: 'approve', args: [options.spender, amount] }); console.log(`Approving ${options.amount || 'unlimited'} ${symbol} for ${options.spender}...`); ``` ### Technical Analysis If `--amount` is omitted, the command grants the spender the maximum possible ERC20 allowance. This makes unlimited authorization the default rather than an exceptional, explicit choice. ERC20 allowance permits the spender contract or account to call `transferFrom()` without another wallet signature. An unlimited allowance therefore remains dangerous after the immediate operation completes and may apply to tokens acquired in the future. The behavior is documented, but documentation does not make it least-privileged. Agent-generated commands are espe ...[truncated 1202 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
index.js:24
Finding

Wallet Operations Depend on Runtime-Loaded Third-Party Native Code

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The documented behavior understates important security-relevant facts: external signing/relay communication, fixed testnet assumptions, and materially unsafe swap semantics where slippage is accepted but apparently not enforced and amountOutMin is zero. For a trading skill, these mismatches can cause users or agents to approve and sign transactions under false assumptions, leading to sandwiching, severe price loss, or execution on the wrong network/path.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill documents token transfers and swaps without clear warnings that blockchain transactions are irreversible, may incur gas costs, and can send assets to unrecoverable addresses. In a wallet-integrated context, missing warnings materially increase the chance of user error leading to permanent asset loss.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Documenting unlimited approvals as the default when no amount is provided, without a strong safety warning, encourages a dangerous permission pattern. If the spender contract is malicious, compromised, upgraded unexpectedly, or later exploited, it can drain all approved tokens without further consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill exposes arbitrary contract-call capability with signing and optional value transfer, but does not present it as a high-risk primitive. This effectively allows any calldata to be sent to any contract, enabling approvals, asset transfers, proxy execution, malicious interactions, or irreversible loss if invoked incorrectly or through prompt manipulation.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The approve command defaults to 2^256 - 1 unlimited allowance when no amount is provided, without a strong warning or confirmation step. Unlimited approvals are a common precursor to wallet drains if the spender is compromised, malicious, upgraded, or incorrectly specified, because they grant ongoing transfer rights over the token balance.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

General-purpose smart contract execution is unjustified by the skill's stated purpose and gives the agent authority to perform arbitrary onchain actions with MPC-signed transactions. Because the same signing path is used for normal wallet operations, a user invoking a seemingly trading-related skill could be exposed to full-wallet transaction execution beyond expected boundaries.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The raw contract-call path signs arbitrary calldata with no decoding, no semantic validation, and no explicit safety interstitial beyond a generic log line. In the context of an MPC wallet skill, this enables opaque asset-draining actions such as approvals, arbitrary token transfers, permit flows, or malicious contract interactions that the user may not understand.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: ws==8.18.3 — 2 advisory(ies): CVE-2026-45736 (ws: Uninitialized memory disclosure); CVE-2026-48779 (ws: Memory exhaustion DoS from tiny fragments and data chunks)

High
Category
Supply Chain
Confidence
97% confidence
Finding

The lockfile pins ws to 8.18.3, and the finding cites known vulnerabilities affecting that exact version: uninitialized memory disclosure and memory-exhaustion denial of service. In this skill’s context, WebSocket handling may be reachable through blockchain RPC or streaming interactions via viem, so a vulnerable transitive dependency can expose the agent process to remote attacks or instability during DeFi/trading operations.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill invokes external CLI commands that inherently use network access and environment-based configuration, but it does not declare an explicit tool scope or permission boundary. In an agent setting, this can cause the skill to be invoked with broader execution privileges than users or orchestrators expect, increasing the chance of unintended network calls or secret-bearing environment use.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases are broad enough to activate high-risk blockchain transaction tooling for generic mentions of trading, DEX use, token balance, or contract calls. In an autonomous or assistive agent, overbroad activation can route benign user requests into a skill capable of signing irreversible on-chain actions.

Content

No source excerpt is available for this finding.

Dynamic Request Target

Medium
Category
Server-Side Request Forgery
Confidence
60% confidence
Finding

Request target host is built from a dynamic or untrusted value. If the host is attacker-influenced, this enables SSRF to arbitrary internal or metadata endpoints.

Content

Scanner excerpt · index.js (reported line 137)May include surrounding context.

js
const hash = keccak256(unsignedSerializedTx);
  const hashBytes = Buffer.from(hash.slice(2), 'hex');

  const resp = await fetch(`https://${SIGN_URL}/agent/sign/ecdsa`, {
    method: 'POST',
    headers: { 'X-API-KEY': config.apiKey },
    body: JSON.stringify({ hash: Buffer.from(hashBytes).toString('hex') }),

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The contract-call command allows signing and broadcasting arbitrary calldata to any address, which materially exceeds the advertised trading-focused scope. In a wallet-signing skill, this effectively exposes a general-purpose transaction executor that can approve malicious spenders, transfer assets, interact with unsafe contracts, or alter protocol positions under the wallet's authority.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The swap command accepts a --slippage option but computes slippageBps without ever using it; all swaps pass amountOutMin as 0n. This means transactions have no effective price protection and can execute at any output amount, exposing users to severe MEV, sandwich attacks, and unexpectedly bad execution.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
87% confidence
Finding

The dependency uses a caret range, which allows new upstream releases within the same major version to be installed without explicit review. In a wallet/trading skill that can sign blockchain transactions, a compromised or malicious dependency update could directly affect transaction construction, approvals, or private signing workflows, making supply-chain risk more consequential than in ordinary apps.

Content

Scanner excerpt · package.json (reported line 12)May include surrounding context.

json
},
  "files": ["index.js"],
  "dependencies": {
    "goodwallet": "^0.2.0",
    "viem": "^2.28.0",
    "commander": "^13.1.0"
  },

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
84% confidence
Finding

Using an unpinned viem version permits automatic uptake of future compatible releases that may introduce malicious code, regressions, or unsafe transaction/ABI handling. Because this skill performs DeFi and contract interactions, any supply-chain compromise in a core blockchain library could alter destinations, calldata, balances, or swap behavior with direct financial impact.

Content

Scanner excerpt · package.json (reported line 13)May include surrounding context.

json
"files": ["index.js"],
  "dependencies": {
    "goodwallet": "^0.2.0",
    "viem": "^2.28.0",
    "commander": "^13.1.0"
  },
  "keywords": ["mpc", "wallet", "trading", "erc20", "defi", "agentic"],

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
80% confidence
Finding

The commander dependency is also unpinned, so upstream changes can be pulled in unexpectedly. While a CLI framework is less security-critical than wallet or blockchain libraries, it still expands the attack surface for supply-chain attacks, especially in tooling that may be used to trigger sensitive wallet actions.

Content

Scanner excerpt · package.json (reported line 14)May include surrounding context.

json
"dependencies": {
    "goodwallet": "^0.2.0",
    "viem": "^2.28.0",
    "commander": "^13.1.0"
  },
  "keywords": ["mpc", "wallet", "trading", "erc20", "defi", "agentic"],
  "license": "UNLICENSED"