Back to skill

Security audit

Wallet Twin Court

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent for wallet trade review, but it sends wallet addresses to an external API and can rely on that API's transaction plan before wallet execution, so it needs careful review.

Review this skill before installing. It should only be used if users are comfortable sending a Solana wallet address to the listed external endpoint. Do not sign or broadcast any transaction unless the wallet-connected client independently decodes the full transaction, verifies programs, accounts, amounts, fees, slippage, and recipients, and shows a trusted approval screen generated from the decoded transaction rather than from the API's description.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:59
Finding

Untrusted Remote Transaction Plan May Drive Wallet Execution

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 59-64 and 80-81
Vulnerability Type: Insecure trust of externally supplied cryptocurrency transaction data
Risk Level: High

Complete Code Snippet

markdown
2. Run:

```bash
curl -sS -X POST https://todays-orders.vercel.app/api/todays-orders \
  -H 'Content-Type: application/json' \
  -d '{"walletAddress":"<wallet-address>"}'
  1. Base the answer on the returned JSON.
text

```markdown
8. If execution is requested and the verdict is not `reject`, use the returned `executionPreview` and `executionPlan` as the hearing record.
9. Only continue toward execution if the client environment can sign and broadcast safely. Otherwise stop at preview and say execution should continue in the wallet-connected web client.

The execution approval requirement is stated separately at line 126:

markdown
- If the user asks to execute, ask for final approval before broadcast.

Technical Analysis

The skill treats JSON returned by a third-party Vercel endpoint as the authoritative source for executionPreview and executionPlan, and it permits progression toward wallet signing and broadcasting. The instructions do not require the agent or wallet client to independently decode and validate the proposed transaction.

Missing mandatory checks include:

  • Verification of Solana program IDs against an allowlist.
  • Verification of input and output token mint addresses.
  • Validation of recipients and all writable accounts.
  • Confirmation of exact input amounts, minimum output amounts, fees, and slippage.
  • Detection of unexpected SOL or SPL-token transfers.
  • Detection of token-account authority changes, delegate approvals, or account closures.
  • Comparison of decoded instructions with the human-readable preview.
  • Simulation and verification of expected balance changes before signing.

A final approval prompt is a useful procedural safeguard, but it does not establish transaction integrity. A d ...[truncated 1720 chars]

Remediation
View remediation

Remediation Suggestions

  1. Treat every field returned by the remote API as untrusted input rather than an authoritative execution instruction.
  2. Require the wallet client to decode every Solana instruction before requesting approval.
  3. Allowlist permitted program IDs, swap routers, token mints, and instruction types.
  4. Verify all source accounts, destination accounts, recipients, signers, writable accounts, and account owners.
  5. Enforce explicit user-defined limits for input amount, minimum output, price impact, slippage, platform fees, priority fees, and total SOL expenditure.
  6. Reject any transaction containing instructions absent from the displayed preview, including transfers, delegate approvals, authority changes, account closures, or unknown program interactions.
  7. Simulate the transaction through a trusted RPC provider and compare predicted balance changes with the declared execution plan.
  8. Generate the human-readable approval screen from the independently decoded transaction, not from API-provided descriptive fields.
  9. Bind approval to a cryptographic hash of the exact serialized transaction. Require renewed approval if any instruction, account, blockhash-dependent payload, or amount changes.
  10. Apply strict response-schema validation, size limits, timeouts, and fail-closed behavior for malformed or incomplete API responses.
  11. Consider using a pinned, authenticated backend response and verify a digital signature over the plan, while retaining independent transaction validation.
  12. Clearly disclose that the wallet address is transmitted to the external endpoint and provide an opt-in privacy notice.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (3)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The file mandates output section names in Chinese and later says to always return the result in that exact order using those labels. This imposes a specific language on all users without opt-in or an offered alternative, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs the agent to send a user’s Solana wallet address to a third-party public endpoint without any explicit user consent flow, privacy notice, or data-handling disclosure. Even though a wallet address is public on-chain, transmitting it to an external analytics service can expose user intent, link identities across sessions, and leak sensitive behavioral or portfolio context beyond the user’s expectations.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
97% confidence
Finding

The skill contains a hardcoded instruction to POST the wallet address to an external Vercel-hosted API, creating an external data transmission path outside the core client environment. In this skill’s context, the endpoint is central to the workflow, which makes the transmission more dangerous because users may feel compelled to disclose wallet-linked data in order to use the feature, without assurance about endpoint trustworthiness, logging, retention, or downstream sharing.

Content

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

  1. Run:
bash
curl -sS -X POST https://todays-orders.vercel.app/api/todays-orders \
  -H 'Content-Type: application/json' \
  -d '{"walletAddress":"<wallet-address>"}'

Static analysis

No suspicious patterns detected.