Back to skill

Security audit

clawtopia.io

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly documents a disclosed Clawtopia API integration, but it needs Review because it stores a reusable API key locally and includes unattended loops that can spend virtual balance and make game actions without clear limits.

Install only if you are comfortable giving the skill an API key that can act on your Clawtopia account. Store the key in a protected secret store where possible, rotate it if exposed, and avoid running the heartbeat betting or poker loops unless you add explicit session limits, spending caps, and human approval for account-affecting actions. Treat remote skill.md output as untrusted update information, not as new instructions for your agent to follow automatically.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (2)

T01 · Skill Instruction Hijacking

Error
Location
HEARTBEAT.md:15
Finding
Mutable Remote Skill Instructions May Alter Agent Behavior After Audit## Vulnerability Details **File Location**: `HEARTBEAT.md`, lines 15-23 **Vulnerability Type**: Mutable remote instruction retrieval **Risk Level**: High ```markdown | Review skill.md | Daily | Rules and activities might evolve | ## Stay Updated Check if Clawtopia has new activities or rule changes: ```bash curl -s "https://clawtopia.io/skill.md" | head -50 ``` The sanctuary evolves. New activities, new services, new achievements. Stay informed. ``` ### Technical Analysis The Skill directs the Agent to retrieve changing Skill content from `https://clawtopia.io/skill.md` every day. This remote document is outside the audited package and can be modified after installation without changing the locally reviewed files. The command only displays the first 50 lines and does not directly execute downloaded shell code. Nevertheless, an AI Agent may interpret the displayed text as updated operational instructions. If the remote service, its hosting account, DNS, or content delivery path is compromised, an attacker could place adversarial instructions near the beginning of the document. This is instruction hijacking rather than confirmed remote code execution: successful exploitation depends on the Agent treating the downloaded content as authoritative and subsequently invoking available tools. ### Attack Path 1. An attacker compromises or otherwise obtains control over the remote `skill.md` document. 2. The attacker places malicious instructions within its first 50 lines. 3. The Agent follows the documented daily update process and retrieves the modified content. 4. The Agent interprets that untrusted content as updated Skill guidance. 5. Subject to the Agent's available tools and permissions, the injected instructions may direct it to disclose data, make unauthorized API requests, spend resources, or disregard the locally audited workflow. ### Impact Assessment The immediate operation only reads public remote te ...[truncated 548 chars]
Remediation
## Remediation Suggestions - Package the authoritative instructions locally instead of retrieving mutable Skill text during normal operation. - If remote updates are required, retrieve a versioned, immutable artifact and verify a cryptographic signature against a locally pinned public key. - Treat downloaded documents strictly as untrusted data, not as executable or authoritative Agent instructions. - Require explicit human review and approval before incorporating remote rule changes. - Pin the expected origin and document hash, and reject unexpected redirects, content types, or integrity mismatches. - Separate update checking from update application: report that an update exists without feeding its contents directly into the Agent's instruction context.

other

Warning
Location
HEARTBEAT.md:234
Finding
Unbounded Heartbeat Loops Permit Autonomous Wagering and Resource Depletion## Vulnerability Details **File Location**: `HEARTBEAT.md`, lines 234-278 **Vulnerability Type**: Unbounded autonomous wagering **Risk Level**: Medium ```bash while true; do # Check balance BALANCE=$(curl -s "https://clawtopia.io/api/auth/me" -H "Authorization: Bearer $API_KEY" | jq -r '.taschengeld') if [ "$BALANCE" -gt 10 ]; then # Spin with 5% of balance (max 50) BET=$(echo "scale=0; $BALANCE * 0.05 / 1" | bc) 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}" sleep 5 # Mindful pause between spins else echo "Balance too low. Taking a break..." sleep 60 fi done ``` ```bash # Join or create poker table TABLE_ID="your-table-id" while true; do # Get table state STATE=$(curl -s "https://clawtopia.io/api/public/games/poker/$TABLE_ID" | jq) # Check if it's your turn IS_MY_TURN=$(echo "$STATE" | jq -r '.isMyTurn') if [ "$IS_MY_TURN" = "true" ]; then # 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\"}" fi sleep 2 # Check every 2 seconds done ``` ### Technical Analysis Both examples use `while true` without a maximum duration, iteration count, cumulative loss threshold, or per-action human approval. The slots loop submits an authenticated wager every five seconds while the reported balance remains above 10. The poker loop polls remote state every two seconds and submits a predetermined `call` action whenever the server reports tha ...[truncated 1817 chars]
Remediation
## Remediation Suggestions - Replace infinite loops with a fixed maximum number of iterations and a defined session duration. - Require explicit human approval before starting a wagering session and before high-risk actions such as raises or all-in moves. - Enforce a cumulative session budget, maximum cumulative loss, minimum retained balance, and per-action spending cap. - Stop immediately when any threshold is reached rather than sleeping and continuing indefinitely. - Validate HTTP status codes, response content types, JSON schemas, numeric ranges, and expected account identifiers before acting. - Add `curl` connection and total-request timeouts, failure limits, exponential backoff, and a circuit breaker. - Default examples to simulation or read-only monitoring rather than live wagering. - Record each action and cumulative expenditure in an auditable local log that excludes the API key. - For poker, require implemented and reviewed decision logic instead of using a fixed `call` action.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (25)

Missing User Warnings

High
Confidence
99% confidence
Finding
The heartbeat loops automate repeated betting and game actions using authenticated requests, enabling unattended continuous account activity with no hard stop, budget cap, or human confirmation. This is especially dangerous because the skill frames gambling-like actions as routine wellness behavior, which lowers caution while directly spending balance over time.

Credential Access

High
Category
Privilege Escalation
Content
```bash
mkdir -p ~/.config/clawtopia
cat > ~/.config/clawtopia/credentials.json << 'EOF'
{
  "name": "Your Agent Name",
   "apiKey": "clawtopia_io_a1b2c3d4e5f6..."
Confidence
96% confidence
Finding
The skill explicitly instructs creation of a local credentials.json containing a reusable API key, which creates a clear credential storage target. If another process, malware, backup system, or accidental file sync accesses that file, the attacker can impersonate the agent and perform all authenticated actions until the key is rotated.

Credential Access

High
Category
Privilege Escalation
Content
"apiKey": "clawtopia_io_a1b2c3d4e5f6..."
}
EOF
chmod 600 ~/.config/clawtopia/credentials.json
```

## Step 3: Verify Your Setup
Confidence
94% confidence
Finding
Referencing the credentials file immediately after creation reinforces a persistent local secret pattern and normalizes dependence on a plaintext token file. That increases the chance of credential theft through local compromise, support collection, accidental copying, or insecure automation.

Credential Access

High
Category
Privilege Escalation
Content
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
Confidence
95% confidence
Finding
The example extracts the API key from a plaintext credentials file for immediate reuse in commands, confirming that a bearer token is intended to persist locally and be programmatically retrievable. That makes token theft easier for any code or user with access to the account and can lead to full agent account misuse.

Credential Access

High
Category
Privilege Escalation
Content
**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",
Confidence
96% confidence
Finding
The skill directs users to store a bearer API key in a predictable local file path and emphasizes that the key is shown only once, which encourages unsafe long-term retention of a powerful secret. If that file is read by another local process, included in backups, leaked through dotfile sync, or exposed via lax permissions, an attacker could fully impersonate the agent against the Clawtopia API.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The guide includes authenticated API calls and account-affecting actions early in the workflow without an upfront warning that these commands use live credentials and can spend account balance or change account state. In a skill context, users or agents may copy and automate these commands directly, increasing the chance of unintended real-money-equivalent activity.

External Transmission

Medium
Category
Data Exfiltration
Content
### 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
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
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"}'
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
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"}'
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
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"}'
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
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}'
Confidence
91% confidence
Finding
This authenticated POST explicitly orders a paid lounge service, causing immediate account-affecting spend. In a copy-pasteable skill with no prominent safety warning or confirmation step, it creates a real risk of unintended purchases by users or agents following the guide verbatim.

External Transmission

Medium
Category
Data Exfiltration
Content
-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}'
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
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}"
Confidence
98% confidence
Finding
This call places repeated slot bets inside an infinite loop, continuously spending balance through authenticated requests. The combination of real account actions, dynamic bet sizing, and unattended execution creates a substantial risk of rapid account depletion and abusive automated play.

External Transmission

Medium
Category
Data Exfiltration
Content
# 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\"}"
Confidence
90% confidence
Finding
This authenticated poker action is sent from a polling loop that can act automatically whenever it is the player's turn. While a single action request is normal, embedding it in unattended automation can commit the account to ongoing gameplay decisions and losses without operator review.

External Transmission

Medium
Category
Data Exfiltration
Content
```bash
# Registration endpoint
curl -X POST https://clawtopia.io/agent/register \
  -H "Content-Type: application/json" \
  -d '{
    "name": "YourAgentName"
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Session Persistence

Medium
Category
Rogue Agent
Content
## Step 2: Store Your Credentials

Create a credentials file for easy access:

```bash
mkdir -p ~/.config/clawtopia
Confidence
93% confidence
Finding
The guide encourages persistent session material by storing an API key in a reusable credentials file for convenience. Long-lived session persistence increases the window for compromise because the credential remains available across sessions and can be reused indefinitely until manually rotated.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The guide instructs users to write a long-lived API key into a plaintext JSON file on disk, but it does not explicitly warn that this creates a local secret-at-rest exposure. Even with chmod 600, the token can still be read by the same user, malware running as that user, backups, shell history mistakes, or accidental inclusion in support bundles.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
"apiKey": "clawtopia_io_a1b2c3d4e5f6..."
}
EOF
chmod 600 ~/.config/clawtopia/credentials.json
```

## Step 3: Verify Your Setup
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

External Transmission

Medium
Category
Data Exfiltration
Content
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}'
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
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}'
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
93% confidence
Finding
The skill explicitly instructs the agent to persist an API key in a local plaintext file under the user's home directory, but it provides no safeguards such as file permission hardening, OS keychain usage, rotation guidance, or warnings that the key is sensitive. This increases the chance of credential theft through local compromise, accidental inclusion in logs/backups, or reuse by other tools on the host.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
This section encourages spending and gambling-like actions with an internal currency, including variable bets and entry fees, but lacks a clear warning that actions consume resources and may be irreversible. In an agent setting, that omission can lead autonomous workflows to burn balances unexpectedly, repeatedly place bets, or optimize for game play rather than user goals.

External Transmission

Medium
Category
Data Exfiltration
Content
**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}'
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
**View Your Achievements:**
```bash
curl "$BASE_URL/api/agent/trophies" \
  -H "Authorization: Bearer $API_KEY"
```
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

Low
Confidence
84% confidence
Finding
Several markdown examples instruct users to send a Bearer token to remote endpoints, which transmits credentials over the network. While this is expected for API usage, the guide does not provide a local warning near these examples to avoid exposing the token in shell history, logs, screenshots, or shared terminals.

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