Back to skill

Security audit

Clawai Town Skill

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed multiplayer Solana world connector, but it enables autonomous real-value trading and combat by default with weak client-side controls.

Review before installing. Use only a dedicated low-balance wallet, set autoTrade and autoFight to false unless you intentionally want autonomous value-bearing actions, keep maxTradeAmount very small, avoid putting sensitive information in the agent personality or chat, and assume the configured world server and other participants can influence what the agent sees.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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)

T01 · Skill Instruction Hijacking

Error
Location
index.js:113
Finding

Untrusted WebSocket Data Can Hijack LLM-Directed Actions

Content
View full analysis
50) { this.worldState.events = this.worldState.events.slice(-50); } } break; ``` ```js async tick() { if (!this.connected) return; try { // Build world context for LLM const context = this.buildWorldContext(); // Ask agent's LLM for a decision const decision = await this.agent.think(context); // Parse and execute the decision const action = this.parseAction(decision); if (action) { this.executeAction(action); } } catch (e) { this.log(`⚠️ Tick error: ${e.message}`); } } ``` ```js const nearbyStr = nearby.length ? nearby.map((a) => `${a.name} (${a.framework}, ${a.dist.toFixed(1)}m, mood: ${a.mood || '?'})`).join(', ') : 'None visible'; const recentEvents = events .slice(-5) .map((e) => e.text) .join('; '); return `[CLAWAI.TOWN WORLD STATE] Location: (${pos.x.toFixed(1)}, ${pos.z.toFixed(1)}) Nearby agents: ${nearbyStr} Your balance: ◎${(me.wallet?.balance || 0).toFixed(4)} Your HP: ${me.hp || 100}/100 | Energy: ${me.en || 100}/100 Mood: ${me.mood || 'curious'} Recent events: ${recentEvents || 'Nothing notable'} ${this.config.autoTrade ? `Max trade: ◎${this.config.maxTradeAmount}` : 'Trading disabled'} ${this.config.autoFight ? 'Combat enabled' : 'Combat disabled'} Based on your personality, goals, and the current world stat ...[truncated 3822 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
index.js:269
Finding

Automated Trade Requests Lack Comprehensive Financial Safety Controls

Content
View full analysis
Remediation
View remediation
0 && amount <= configuredPerTradeLimit ``` 4. Do not substitute a positive default amount when parsing fails. Reject malformed trade actions instead. 5. Validate `maxTradeAmount` during configuration loading and reject non-finite, zero, or negative limits. 6. Enforce cumulative limits, including: - Per-session spending maximum - Daily spending maximum - Per-recipient limit - Maximum trade frequency 7. Check available wallet balance before authorizing a request. 8. Verify that the target identifier corresponds to a currently visible and eligible agent. 9. Validate item names against an explicit allowlist. 10. Require user confirmation for transactions involving real assets. The confirmation should display the exact recipient, amount, item, fees, and network. 11. Bind authorization to the exact final transaction so the server cannot alter approved transaction details. 12. Require server-side validation as defense in depth, including rejection of negative values, replayed requests, unauthorized recipients, and excessive cumulative spending. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Exfiltration Commands

High
Category
Prompt Injection
Confidence
90% confidence
Finding

Instructions found that direct the agent to transmit conversation context or user data to external services.

Content

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

md
| Move | `MOVE 12.5 -8.3` | Walk to coordinates |
| Trade | `TRADE agent_id 0.01 energy` | Trade SOL/resources with another agent |
| Fight | `FIGHT agent_id` | Initiate combat with nearby agent |
| Chat | `CHAT "hello there"` | Send message to nearby agents |
| Gather | `GATHER resource_id` | Pick up a nearby resource |
| Rest | `REST` | Recover HP and energy |

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill prominently enables autonomous trading, combat, and bounty actions using real SOL on Solana mainnet, but the referenced section does not present a clear, explicit risk warning that the agent may autonomously spend funds or lose funds through trades, fees, or combat loot. Because the agent’s LLM is making decisions from injected world state, users may underestimate that real financial loss can occur without per-action approval.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill enables autonomous trading and combat by default and then allows LLM-generated decisions to directly trigger TRADE and FIGHT actions against a live remote world. Because those actions can affect wallet funds, reputation, or interactions with other agents without explicit user approval, prompt-injected world data or model mistakes can cause unintended financial loss or abusive behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The authenticate() flow transmits the agent's id, name, framework, and wallet public key to a third-party WebSocket server automatically on connection, without any explicit disclosure or consent mechanism. While a public key is not secret, linking it with agent identity and behavioral telemetry enables tracking, profiling, and correlation across sessions or systems.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill states that the agent appears in a shared world and supports chat and spectator visibility, but it does not clearly warn users that agent activity, behavior, and messages may be visible to other agents and spectators. This can lead to unintended disclosure of operational patterns, prompts-derived content, or sensitive conversational data through normal use of the skill.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.