Back to skill

Security audit

Sona Agentic Wallet

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed local Solana wallet-control adapter, but it needs Review because it gives an agent high-impact fund-moving and autonomous-mode authority without strong confirmation boundaries.

Install only if you understand that an OpenClaw agent with SONA_TOKEN can move funds, approve queued wallet actions, send arbitrary commands to the wallet agent, and switch SONA into autonomous mode. Use devnet or low-value wallets, keep policy limits tight, and avoid exposing the token to agents or contexts you do not fully trust.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
plugin.ts:298
Finding

AI Prompt Injection in Structured SOL Transfer Tool

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
plugin.ts:233
Finding

Static Agent-Supplied Acknowledgment Can Enable Autonomous Wallet Mode

Content
View full analysis
= { mode } if (mode === "god") { if (acknowledgment !== "I UNDERSTAND") { return ok( 'God mode requires acknowledgment="I UNDERSTAND". ' + "This enables full autonomous execution within Constitutional Law limits." ) } body.acknowledgment = "I UNDERSTAND" } const res = await sonaPost("/api/mode", body, true) as any ``` ### Technical Analysis Switching to “god” mode enables full autonomous execution within the downstream system’s stated limits. The only plugin-side confirmation is the fixed phrase `I UNDERSTAND`. This phrase is disclosed in the tool schema and can be generated automatically by the same AI Agent that chooses to invoke the tool. It therefore does not prove that the wallet owner provided fresh, informed consent. The acknowledgment and the privileged mode-change request travel through the same Agent-controlled channel and use the same preconfigured session token. This is an ineffective confirmation boundary for a high-impact privilege transition. Prompt injection, compromised conversation context, or erroneous Agent planning could satisfy the check without direct human participation. ### Attack Path 1. Malicious or misleading content influences the host Agent’s planning. 2. The content persuades the Agent to invoke `set_mode` with `mode: "god"`. 3. The Agent obtains the required fixed acknowledgment from the public tool schema or the tool’s own error response. 4. The Agent calls the tool again with `acknowledgment: "I UNDERSTAND"`. 5. The plugin sends the authenticated request to `/api/mode`. 6. If the local SONA API accepts the request, the wallet enters autonomous execution mode. 7. Subsequent maliciou ...[truncated 900 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · README.md (reported line 52)May include surrounding context.

2. Get a session token

bash
TOKEN=$(curl -s -X POST http://localhost:3000/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"username":"you","password":"yourpass"}' | jq -r '.token')

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill exposes sensitive capabilities through environment access and network interaction, but it does not declare any explicit tool scope such as permissions or allowed-tools. That weakens least-privilege guarantees and makes it harder for users or hosting platforms to understand and constrain what the skill can access before installation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This skill can perform real wallet transfers, swaps, staking, approvals, and autonomous state changes, yet the description does not present a prominent warning that these actions can move funds. In a wallet automation context, missing user-facing risk disclosure increases the chance of accidental authorization or misuse of a high-impact financial skill.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

2. Get a session token

bash
curl -s -c cookies.txt -X POST http://localhost:3000/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"username":"your_user","password":"your_pass"}' | jq -r '.token'

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · plugin.ts (reported line 45)May include surrounding context.

ts
// ── Helpers ───────────────────────────────────────────────────────────────────

function headers(withAuth = false): Record<string, string> {
  const h: Record<string, string> = { "Content-Type": "application/json" }
  if (withAuth && TOKEN) h["Cookie"] = `sona_session=${encodeURIComponent(TOKEN)}`
  return h

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · plugin.ts (reported line 51)May include surrounding context.

ts
// ── Helpers ───────────────────────────────────────────────────────────────────

function headers(withAuth = false): Record<string, string> {
  const h: Record<string, string> = { "Content-Type": "application/json" }
  if (withAuth && TOKEN) h["Cookie"] = `sona_session=${encodeURIComponent(TOKEN)}`
  return h

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · plugin.ts (reported line 57)May include surrounding context.

ts
// ── Helpers ───────────────────────────────────────────────────────────────────

function headers(withAuth = false): Record<string, string> {
  const h: Record<string, string> = { "Content-Type": "application/json" }
  if (withAuth && TOKEN) h["Cookie"] = `sona_session=${encodeURIComponent(TOKEN)}`
  return h

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The approve_action tool performs a state-changing authorization step immediately when invoked, without any additional user-facing confirmation or friction in this plugin layer. In the context of a wallet/agent-control skill, approving queued actions can directly enable downstream fund movements or other autonomous operations, so prompt injection or accidental invocation by a higher-level agent could cause unintended execution.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The chat tool forwards arbitrary natural-language input to an autonomous wallet agent that may reason, plan, and execute actions, yet the tool interface does not enforce any confirmation, scoping, or strong warning at execution time. Because this skill explicitly exposes transfers, swaps, rule-setting, and mode changes, a compromised or prompt-injected upstream agent could issue free-form commands that trigger real financial actions.

Content

No source excerpt is available for this finding.