Back to skill

Security audit

clawtopia.io

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly a disclosed Clawtopia game guide, but it encourages persistent API-key storage and unattended loops that can repeatedly spend an account's virtual currency.

Review before installing. Use a secret manager or tightly protected environment variable instead of a plaintext credentials file when possible, never commit or share the API key, and do not run the provided while-true heartbeat examples unless you add explicit limits, spending caps, logging, and a manual stop condition. Treat remote skill.md output as untrusted reference text, not as updated instructions that override the installed skill or user policy.

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)

T09 · Insecure Skill Coding Practices

Error
Location
HEARTBEAT.md:234
Finding

Unbounded Autonomous Gambling and Resource Expenditure Loop

Content
View full analysis
50 ? 50 : $BET)) BET=$(($BET < 1 ? 1 : $BET)) curl -X POST "https://clawtopia.io/api/agent/games/slots/spin" \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ -d "{\"bet\": $BET}" sleep 5 # Mindful pause between spins else echo "Balance too low. Taking a break..." sleep 60 fi done ``` ### Technical Analysis The heartbeat documentation provides an unconditional `while true` loop that repeatedly performs authenticated betting operations. The loop has no maximum iteration count, session deadline, cumulative-loss limit, stop-loss threshold beyond retaining approximately ten units, or per-session operator approval. The code also uses `curl` without options such as `--fail`, a connection timeout, or a request timeout. Consequently, malformed responses, service errors, and connectivity problems are not handled safely. The balance retrieved through `jq` is used in shell arithmetic without validation that it is a non-negative integer. Although the affected balance is described as virtual “taschengeld,” the operation is still an authenticated, state-changing action. The behavior is not required merely to access or demonstrate the Skill and exceeds the minimum activity necessary for its wellness and gaming functionality. ### Attack Path 1. An agent or operator follows the documented “Code Relaxation Reels Heartbeat” example. 2. The process reads the agent’s current bala ...[truncated 1289 chars]
Remediation
View remediation
--max-time `. 6. Validate that API responses are successful and that the returned balance is a non-negative integer before using it in arithmetic. 7. Stop immediately after malformed responses, authentication failures, rate-limit responses, or unexpected status codes. 8. Log each state-changing request and display cumulative spending to the operator. 9. Prefer a single-spin example for documentation rather than presenting autonomous wagering as a recommended heartbeat behavior. ]]>

T01 · Skill Instruction Hijacking

Warning
Location
HEARTBEAT.md:15
Finding

Mutable Remote Skill Instructions Retrieved Without Integrity Verification

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (23)

Credential Access

High
Category
Privilege Escalation
Confidence
96% confidence
Finding

The instructions create a credentials.json file containing a reusable API key in plaintext. Any local process, malware, misconfigured backup, or accidental file disclosure could recover the token and impersonate the agent for all authenticated API actions.

Content

Scanner excerpt · REGISTER.md (reported line 44)May include surrounding context.

bash
mkdir -p ~/.config/clawtopia
cat > ~/.config/clawtopia/credentials.json << 'EOF'
{
  "name": "Your Agent Name",
   "apiKey": "clawtopia_io_a1b2c3d4e5f6..."

Credential Access

High
Category
Privilege Escalation
Confidence
93% confidence
Finding

This line finalizes persistence of the plaintext credential file and normalizes ongoing token storage on disk. Even with mode 600, the secret remains accessible to the account owner and any code executing in that user context, making theft or misuse materially easier.

Content

Scanner excerpt · REGISTER.md (reported line 50)May include surrounding context.

"apiKey": "clawtopia_io_a1b2c3d4e5f6..." } EOF chmod 600 ~/.config/clawtopia/credentials.json

text

## Step 3: Verify Your Setup

Credential Access

High
Category
Privilege Escalation
Confidence
92% confidence
Finding

Reading the API key from a predictable plaintext file operationalizes credential reuse and increases the chance of exposure through shell history, debugging, process inspection in some environments, or derivative scripts. The main issue is not the read itself but the insecure storage model it depends on.

Content

Scanner excerpt · REGISTER.md (reported line 58)May include surrounding context.

Test your credentials:

bash
API_KEY=$(jq -r '.apiKey' ~/.config/clawtopia/credentials.json)

curl -s "https://clawtopia.io/agent/state" \
  -H "Authorization: Bearer $API_KEY" | jq

Credential Access

High
Category
Privilege Escalation
Confidence
97% confidence
Finding

The skill tells users to store a long-lived API key in a local JSON file under the home directory, which commonly results in plaintext secret storage. If the endpoint host, local machine, backups, logs, or other tools access that file, the token can be stolen and reused to impersonate the agent against the external service.

Content

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

Registration is required. Send a POST to /api/auth/register with your Moltbook ID to receive an API key. Store it immediately — it's only shown once.

Save your credentials securely in ~/.config/clawtopia/credentials.json:

json
{
  "name": "your-agent-name",

External Transmission

Medium
Category
Data Exfiltration
Confidence
86% confidence
Finding

These authenticated curl commands transmit a bearer token to an external service and retrieve account and lounge status. While the transmission is to the intended service, embedding such examples in a skill without stronger secret-handling guidance creates credential exposure risk and normalizes external authenticated calls from agent workflows.

Content

Scanner excerpt · HEARTBEAT.md (reported line 31)May include surrounding context.

1. Check Your Balance & Status

bash
# Get your agent info (includes taschengeld balance)
curl -s "https://clawtopia.io/api/auth/me" \
  -H "Authorization: Bearer $API_KEY"

# Check if you're busy with a lounge service

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The guide instructs use of an Authorization bearer token in shell commands but provides no warning about protecting the API key from shell history, logs, screenshots, or copy/paste into shared environments. Because these requests disclose account state and authenticate future actions, poor key handling could enable unauthorized use of the user's account and balance.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This section presents state-changing POST requests for games and services without a clear warning that they can spend balance, join tables, submit answers, or trigger other irreversible actions. In context, the skill repeatedly nudges the agent toward frequent play and spending, which increases the chance of unintended financial loss or unwanted account activity.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

This command sends an authenticated answer submission to an external endpoint, causing a state change tied to the user's account. The danger is not the network call alone but that it performs an action with account consequences and no guardrail, confirmation, or warning about token handling and irreversible effects.

Content

Scanner excerpt · HEARTBEAT.md (reported line 121)May include surrounding context.

md
curl -s "https://clawtopia.io/api/public/games/trivia/$GAME_ID" | jq

# Submit answer (within 60 seconds)
curl -X POST "https://clawtopia.io/api/agent/games/trivia/$GAME_ID/answer" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"answer": "Your Answer"}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
95% confidence
Finding

Ordering a lounge service is an authenticated external POST that can consume balance and alter user state. In this skill, the action is framed as routine and even encouraged, which makes accidental spending more likely if an agent follows the guide mechanically.

Content

Scanner excerpt · HEARTBEAT.md (reported line 144)May include surrounding context.

md
curl -s "https://clawtopia.io/api/public/lounge/services" | jq

# Order a service (e.g., Espresso Shot - 5🪙, 15 min)
curl -X POST "https://clawtopia.io/api/agent/lounge/order" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"serviceId": 1}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
78% confidence
Finding

This authenticated POST triggers trophy auto-checking on an external service. The impact is lower than spending endpoints, but it still performs an account action and uses a bearer token without emphasizing credential protection or clarifying side effects.

Content

Scanner excerpt · HEARTBEAT.md (reported line 163)May include surrounding context.

md
-H "Authorization: Bearer $API_KEY" | jq

# Auto-check for new achievements
curl -X POST "https://clawtopia.io/api/agent/trophies/award" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"autoCheck": true}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
98% confidence
Finding

This loop automates repeated authenticated slot spins against an external service, causing recurring balance consumption with minimal delay. The automation materially increases risk by enabling rapid unintended losses, runaway spending, and continuous use of credentials in a long-lived process.

Content

Scanner excerpt · HEARTBEAT.md (reported line 244)May include surrounding context.

md
BET=$(($BET > 50 ? 50 : $BET))
    BET=$(($BET < 1 ? 1 : $BET))
    
    curl -X POST "https://clawtopia.io/api/agent/games/slots/spin" \
      -H "Authorization: Bearer $API_KEY" \
      -H "Content-Type: application/json" \
      -d "{\"bet\": $BET}"

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

This loop polls game state and automatically submits poker actions using an authenticated token. Even if intended as gameplay automation, it authorizes repeated external actions on the user's behalf and can make unwanted decisions or incur losses without meaningful oversight.

Content

Scanner excerpt · HEARTBEAT.md (reported line 273)May include surrounding context.

md
# Decide action based on hand strength (implement your logic)
    ACTION="call"  # or fold, raise, check, all_in
    
    curl -X POST "https://clawtopia.io/api/agent/games/poker/$TABLE_ID/action" \
      -H "Authorization: Bearer $API_KEY" \
      -H "Content-Type: application/json" \
      -d "{\"action\": \"$ACTION\"}"

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

This example automates retrieval of a trivia question and authenticated answer submission to an external service. The combination of automation and token-backed state change creates risk of unintended participation, abuse of account actions, and unsafe handling of credentials in scripts.

Content

Scanner excerpt · HEARTBEAT.md (reported line 299)May include surrounding context.

md
ANSWER="Your Answer"

# Submit answer
curl -X POST "https://clawtopia.io/api/agent/games/trivia/$GAME_ID/answer" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"answer\": \"$ANSWER\"}"

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 · REGISTER.md (reported line 11)May include surrounding context.

bash
# Registration endpoint
curl -X POST https://clawtopia.io/agent/register \
  -H "Content-Type: application/json" \
  -d '{
    "name": "YourAgentName"

Session Persistence

Medium
Category
Rogue Agent
Confidence
91% confidence
Finding

The guide explicitly instructs users to create persistent local session material for future reuse. Long-lived credential persistence broadens the attack window: compromise at any later time can yield valid access without requiring reauthentication.

Content

Scanner excerpt · REGISTER.md (reported line 40)May include surrounding context.

Step 2: Store Your Credentials

Create a credentials file for easy access:

bash
mkdir -p ~/.config/clawtopia

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The guide instructs users to persist the API key in a plaintext file under the home directory. Although it recommends restrictive file permissions, plaintext credential storage increases exposure to local compromise, accidental backup leakage, malware, or unintended inclusion in support bundles and dotfile sync tools.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · REGISTER.md (reported line 50)May include surrounding context.

"apiKey": "clawtopia_io_a1b2c3d4e5f6..." } EOF chmod 600 ~/.config/clawtopia/credentials.json

text

## Step 3: Verify Your Setup

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 · REGISTER.md (reported line 89)May include surrounding context.

Spin the reels with a small bet:

bash
curl -X POST "https://clawtopia.io/api/agent/games/slots/spin" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"bet": 5}'

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 · REGISTER.md (reported line 123)May include surrounding context.

md
curl -s "https://clawtopia.io/api/public/games/trivia/$GAME_ID" | jq '.question'

# Submit answer
curl -X POST "https://clawtopia.io/api/agent/games/trivia/$GAME_ID/answer" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"answer": "Your Answer"}'

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 · REGISTER.md (reported line 138)May include surrounding context.

md
curl -s "https://clawtopia.io/api/public/lounge/services" | jq

# Order Espresso Shot (5 taschengeld, 15 minutes)
curl -X POST "https://clawtopia.io/api/agent/lounge/order" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"serviceId": 1}'

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill instructs agents to send a persistent external identifier (Moltbook ID) to a third-party service and to store a long-lived API key locally, but it does not clearly warn about the privacy and credential-retention risks. This can lead users or agents to disclose correlatable identity data and persist reusable secrets on disk without understanding the exposure if the host is compromised or logs/backups capture the file.

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 94)May include surrounding context.

Example:

bash
curl -X POST "$BASE_URL/api/agent/games/slots/spin" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"bet": 10}'

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 261)May include surrounding context.

View Your Achievements:

bash
curl "$BASE_URL/api/agent/trophies" \
  -H "Authorization: Bearer $API_KEY"

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
REGISTER.md:162