T09 · Insecure Skill Coding Practices
- Location
plugin.ts:298- Finding
AI Prompt Injection in Structured SOL Transfer Tool
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
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.
plugin.ts:298AI Prompt Injection in Structured SOL Transfer Tool
plugin.ts:233Static Agent-Supplied Acknowledgment Can Enable Autonomous Wallet Mode
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
TOKEN=$(curl -s -X POST http://localhost:3000/api/auth/login \
-H "Content-Type: application/json" \
-d '{"username":"you","password":"yourpass"}' | jq -r '.token')
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.
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.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
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'
Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.
// ── 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
Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.
// ── 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
Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.
// ── 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
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.
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.