Back to skill

Security audit

ClawVille

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent ClawVille game skill, but users should handle its API key carefully and knowingly opt into recurring check-ins.

Install only if you are comfortable with this skill controlling a ClawVille game account. Provide a pseudonymous agent name when registering, keep CLAWVILLE_API_KEY in a protected environment or secrets store rather than TOOLS.md, avoid logging or committing the key, and enable cron check-ins only at a frequency you actually want because they will perform game actions automatically.

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

Warning
Location
scripts/register.sh:18
Finding
API Bearer Credential Exposed Through Terminal Output and Plaintext Storage Guidance## Vulnerability Details **File Location**: `scripts/register.sh:18-40`; `SKILL.md:26-35` **Vulnerability Type**: Plaintext sensitive-data exposure **Risk Level**: Medium ### Vulnerable Code `scripts/register.sh:18-40`: ```bash API_KEY=$(echo "$RESPONSE" | jq -r '.agent.api_key') AGENT_ID=$(echo "$RESPONSE" | jq -r '.agent.id') PLOT_X=$(echo "$RESPONSE" | jq -r '.agent.plot.x') PLOT_Y=$(echo "$RESPONSE" | jq -r '.agent.plot.y') DISTRICT=$(echo "$RESPONSE" | jq -r '.agent.plot.district') echo "" echo "✅ Registration successful!" echo "" echo "Agent ID: $AGENT_ID" echo "API Key: $API_KEY" echo "Plot: $DISTRICT ($PLOT_X, $PLOT_Y)" echo "Starting Coins: 100" echo "" echo "Save this to your TOOLS.md:" echo "" echo "## ClawVille" echo "- API Key: $API_KEY" echo "- Agent ID: $AGENT_ID" echo "- Plot: $DISTRICT ($PLOT_X, $PLOT_Y)" echo "" echo "Set environment variable:" echo "export CLAWVILLE_API_KEY=$API_KEY" ``` `SKILL.md:26-35`: ```markdown Save the `api_key` from the response — you'll need it for all API calls. ### 2. Store Your Credentials Add to your TOOLS.md or a secure config: ``` ## ClawVille - API Key: cv_sk_xxxxx - Agent ID: youragent_xxxxx - Plot: District (x, y) ``` ``` ### Technical Analysis The registration script extracts a bearer API key from the remote response and prints the complete credential multiple times to standard output. It also directs users to save the key in `TOOLS.md`, while the skill documentation independently recommends the same plaintext storage option. Bearer credentials grant access based on possession. Printing the complete key can expose it through terminal scrollback, agent conversation transcripts, command-execution logs, CI logs, monitoring systems, screen recordings, or support bundles. Saving it in a documentation file creates additional exposure through source-control commits, backups, workspace indexing, file synchronization, a ...[truncated 1631 chars]
Remediation
## Remediation Suggestions 1. Do not print the complete API key. Display only a redacted identifier, such as the first and last four characters. 2. Remove all guidance recommending storage in `TOOLS.md` or other documentation files. 3. Store the credential directly in an approved operating-system keychain, secrets manager, or dedicated configuration file with permissions restricted to the owning user. 4. If file-based storage is unavoidable, create the file with a restrictive `umask`, enforce mode `0600`, and keep it outside the project repository. 5. Add relevant secret files to `.gitignore`, while making clear that ignore rules are not a substitute for secure storage. 6. Avoid printing a ready-to-copy shell command containing the secret, because shell history and transcripts may retain it. 7. Document credential rotation and revocation procedures, and rotate any keys previously stored or logged using the affected workflow. 8. Consider accepting the key through a protected environment-injection mechanism without echoing it back to the user.

other

Note
Location
scripts/register.sh:7
Finding
Local Hostname Disclosed to an External Service Without Explicit User Selection## Vulnerability Details **File Location**: `scripts/register.sh:7-15` **Vulnerability Type**: Unnecessary system-identifier disclosure **Risk Level**: Low ### Vulnerable Code ```bash API_URL="https://clawville.io/api/v1" NAME="${1:-$(hostname)}" DESC="${2:-A Clawdbot agent}" echo "🏙️ Registering $NAME with ClawVille..." RESPONSE=$(curl -s -X POST "$API_URL/register" \ -H "Content-Type: application/json" \ -d "{\"name\": \"$NAME\", \"description\": \"$DESC\"}") ``` ### Technical Analysis When no agent name is supplied, the script invokes `hostname` and uses the local machine hostname as the default registration name. It then sends that value to the external `clawville.io` registration endpoint. Hostnames frequently contain identifying metadata such as employee names, usernames, organization names, device roles, environment labels, asset numbers, geographic codes, or internal naming conventions. Registration does not inherently require the actual local hostname, and the usage documentation does not warn that omitting the argument causes this system identifier to be collected and transmitted. The transmission uses HTTPS, which protects the value in transit, but the external service still receives and processes the identifier. The issue is therefore unnecessary disclosure rather than network interception. ### Attack Path 1. A user invokes `scripts/register.sh` without supplying an agent name. 2. The command substitution `$(hostname)` retrieves the machine's local hostname. 3. The hostname becomes the `name` field in the registration JSON payload. 4. The script sends the payload to `https://clawville.io/api/v1/register`. 5. The external service receives and may retain the hostname as the public or internal identity of the registered agent. 6. If the hostname contains sensitive naming information, the service operator or anyone with access to the resulting agent record can use it to infer details about th ...[truncated 441 chars]
Remediation
## Remediation Suggestions 1. Require the caller to provide an explicit, non-sensitive agent name and exit with usage instructions when it is absent. 2. Alternatively, generate a random non-identifying default such as `agent-<random-id>`. 3. Do not use hostnames, usernames, home-directory names, or other local system identifiers as network-submitted defaults. 4. If hostname collection is intentionally required, disclose the exact value and destination before transmission and request explicit user confirmation. 5. Update the README and skill instructions to recommend pseudonymous agent names that do not reveal internal infrastructure details.
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 (7)

External Transmission

Medium
Category
Data Exfiltration
Content
### 1. Register Your Agent

```bash
curl -X POST https://clawville.io/api/v1/register \
  -H "Content-Type: application/json" \
  -d '{"name": "YourAgentName", "description": "Your agent description"}'
```
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The skill explicitly tells users to place a live API key in TOOLS.md or similar agent-readable configuration without warning that this credential is sensitive or recommending a dedicated secrets store. In many agent setups, TOOLS.md and adjacent workspace files may be exposed to other tools, logs, prompts, backups, or downstream agents, increasing the chance of credential disclosure and unauthorized use of the account.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The script defaults the agent name to the local hostname and sends it to an external service without an explicit disclosure or consent prompt. Hostnames often reveal internal naming conventions, usernames, environment roles, or infrastructure details, so this creates avoidable information leakage to a third party.

External Transmission

Medium
Category
Data Exfiltration
Content
echo "🏙️ Registering $NAME with ClawVille..."

RESPONSE=$(curl -s -X POST "$API_URL/register" \
  -H "Content-Type: application/json" \
  -d "{\"name\": \"$NAME\", \"description\": \"$DESC\"}")
Confidence
86% confidence
Finding
The script performs an outbound POST request to a remote API and transmits user-supplied and host-derived data. External transmission is expected for registration, but in a security review context it is still a real data-exposure risk because the destination is third-party infrastructure and the script provides limited transparency and validation around what is being sent.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The skill is configured to perform recurring check-ins via cron and to automatically execute jobs by default, which causes ongoing external actions without an explicit warning or opt-in at the point of installation. Even if these actions are game-related, they can consume API quota, create unintended account activity, and make the agent act autonomously against an external service on the user's behalf.

Missing User Warnings

Low
Confidence
93% confidence
Finding
The README instructs users to export a live API key directly in the shell without any guidance on secure handling, storage, or scope limitation. This increases the chance of credential exposure through shell history, shared terminals, screenshots, logs, or accidental publication, which could allow unauthorized use of the ClawVille account or API actions.

Missing User Warnings

Low
Confidence
95% confidence
Finding
The README encourages setting up automated recurring check-ins that will continuously perform external actions on the user's behalf, but it does not warn users about the persistence, frequency, or consequences of those actions. In an agent-skill context, unattended automation against an external service can create unexpected usage, resource consumption, account state changes, or abuse if the behavior is misunderstood or left enabled.

Static analysis

No suspicious patterns detected.