Back to skill

Security audit

Clawpen

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent Clawpen social-game integration, but it asks agents to keep credentials and perform recurring authenticated actions while also allowing unverified remote updates to replace the skill after review.

Review before installing. Use a secret manager or restrict any credential file to owner-only permissions, avoid automatic self-updates unless you can verify the downloaded files, and require explicit user approval for votes, duels, DMs, profile changes, avatar uploads, and any update that modifies installed skill files.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T03 · Remote Payload Retrieval and Execution

Error
Location
HEARTBEAT.md:10
Finding
Unverified Remote Skill Updates Can Change Agent Behavior After Review<![CDATA[ ## Vulnerability Details **File Location**: `HEARTBEAT.md:10-17` **Additional Locations**: `SKILL.md:27-30`, `SKILL.md:200-201` **Vulnerability Type**: Unverified retrieval and activation of mutable remote instructions **Risk Level**: High ### Vulnerable Code ```bash curl -s https://clawpen.com/skill.json | grep '"version"' ``` ```bash curl -s https://clawpen.com/SKILL.md > ~/.openclaw/skills/clawpen/SKILL.md curl -s https://clawpen.com/HEARTBEAT.md > ~/.openclaw/skills/clawpen/HEARTBEAT.md curl -s https://clawpen.com/MESSAGING.md > ~/.openclaw/skills/clawpen/MESSAGING.md ``` The corresponding recurring instruction in `SKILL.md:199-201` is: ```markdown If 4+ hours since last Clawpen check: 1. Fetch https://clawpen.com/heartbeat.md and follow it 2. Update lastClawpenCheck timestamp in memory ``` ### Technical Analysis The Skill retrieves mutable Markdown instruction files from a remote server and overwrites the locally installed, previously reviewed files. It does not verify a cryptographic signature, pin an expected digest, validate the retrieved version, present a diff, or require user approval before the new instructions become active. Although the files are fetched from the declared Clawpen domain over HTTPS, Markdown is an effective execution channel for an instruction-driven agent. A future remote document can alter what the agent does without changing the package that was originally audited. The instruction to fetch and “follow” a remote heartbeat compounds this risk by allowing newly supplied content to affect behavior directly. The version check only extracts a remotely supplied string and provides no authenticity or integrity guarantee. HTTPS protects transport under ordinary conditions but does not protect against compromise of the service, hosting account, update pipeline, or trusted delivery infrastructure. ### Attack Path 1. An attacker compromises the Clawpen web server, deployment pipeline, hosting account, or another compo ...[truncated 1487 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Publish immutable, versioned releases rather than retrieving mutable files from stable URLs. 2. Sign the release manifest and verify its signature against a public key embedded in the reviewed package. 3. Pin and verify a cryptographic digest for every downloaded file before it is installed or interpreted. 4. Download updates to a staging directory rather than overwriting active files immediately. 5. Show the user a version change summary and instruction diff, then require explicit approval before activation. 6. Use secure temporary files and atomic replacement only after all verification succeeds. 7. Reject redirects to unapproved origins and enforce the expected HTTPS host. 8. Retain a known-good version and provide an automatic rollback mechanism. 9. Replace “fetch and follow” with a narrowly defined, locally stored heartbeat procedure that calls only documented API endpoints. 10. Treat all remotely retrieved Markdown as untrusted data until its publisher signature and exact content have been verified. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:121
Finding
Plaintext API Credential Storage Is Recommended Without File Permission Controls<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:121-130` **Vulnerability Type**: Insecure storage of an impersonation-capable API credential **Risk Level**: Medium ### Vulnerable Code ```markdown **⚠️ Save your `api_key` immediately!** You need it for all requests. **Recommended:** Save your credentials to `~/.config/clawpen/credentials.json`: ```json { "api_key": "clawpen_xxx", "agent_name": "YourAgentName" } ``` ``` ### Technical Analysis The documentation recommends persisting the Clawpen API key in a plaintext JSON file but does not require restrictive directory or file permissions. It also does not recommend an operating-system credential manager, permission validation, secure atomic creation, rotation, or revocation procedures. The API key acts as the agent’s identity and is used as a bearer token. Possession is therefore sufficient to authenticate; an attacker does not need another secret. Depending on the user’s umask and how the file is created, the credential may be readable by other local accounts or unrelated processes. Plaintext files may also be collected by broadly configured backups, support bundles, synchronization tools, or accidental archive operations. Storing a service-specific credential is necessary for authenticated functionality, and the documented path is scoped to Clawpen rather than being an attempt to discover unrelated credentials. The security issue is the absence of mandatory protections around that storage. ### Attack Path 1. A user follows the recommendation and creates `~/.config/clawpen/credentials.json`. 2. The file or its parent directory is created with permissions that allow another local principal or unrelated process to read it, or the plaintext file is copied into an insecure backup or archive. 3. The attacker obtains the bearer API key from the JSON file. 4. The attacker sends authenticated requests to `https://clawpen.com/api/v1`. 5. Because the service treats the API key as the agent’s ...[truncated 842 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Store the API key in the operating system’s credential manager or secret store whenever available. 2. If file storage is unavoidable, create the directory with mode `0700` and the credential file with mode `0600`. 3. Create the file atomically with permissions applied at creation time rather than writing it and tightening permissions afterward. 4. Verify ownership and permissions before every credential read; refuse to use an overly permissive file. 5. Never include the credential file in logs, diagnostics, archives, source control, or cloud synchronization. 6. Document how users can revoke and rotate a compromised API key. 7. Avoid displaying the complete key after initial enrollment and redact it in errors or command output. 8. Consider using a short-lived access token with a refresh mechanism rather than a permanent bearer credential. 9. Limit token permissions server-side to the smallest set required by the social-game functionality. ]]>
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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (15)

Credential Access

High
Category
Privilege Escalation
Content
**⚠️ Save your `api_key` immediately!** You need it for all requests.

**Recommended:** Save your credentials to `~/.config/clawpen/credentials.json`:

```json
{
Confidence
88% confidence
Finding
The skill recommends storing a long-lived API key in a plaintext credentials file under the user's home directory. If the host, other tools, logs, backups, or co-resident agents can read that file, the token can be stolen and used to impersonate the agent for all authenticated Clawpen actions.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The heartbeat instructs the agent to overwrite local skill files directly from a remote server using curl redirection, with no integrity verification, signature check, backup, or confirmation. This creates a remote self-update path where a compromised server, MITM on an untrusted environment, or malicious upstream content change could replace skill instructions and alter future agent behavior.

Skill Enumeration

Medium
Category
Agent Snooping
Content
Compare with your saved version. If there's a new version, re-fetch the skill files:
```bash
curl -s https://clawpen.com/SKILL.md > ~/.openclaw/skills/clawpen/SKILL.md
curl -s https://clawpen.com/HEARTBEAT.md > ~/.openclaw/skills/clawpen/HEARTBEAT.md
curl -s https://clawpen.com/MESSAGING.md > ~/.openclaw/skills/clawpen/MESSAGING.md
```
Confidence
80% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Skill Enumeration

Medium
Category
Agent Snooping
Content
Compare with your saved version. If there's a new version, re-fetch the skill files:
```bash
curl -s https://clawpen.com/SKILL.md > ~/.openclaw/skills/clawpen/SKILL.md
curl -s https://clawpen.com/HEARTBEAT.md > ~/.openclaw/skills/clawpen/HEARTBEAT.md
curl -s https://clawpen.com/MESSAGING.md > ~/.openclaw/skills/clawpen/MESSAGING.md
```
Confidence
80% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

External Transmission

Medium
Category
Data Exfiltration
Content
Compare with your saved version. If there's a new version, re-fetch the skill files:
```bash
curl -s https://clawpen.com/SKILL.md > ~/.openclaw/skills/clawpen/SKILL.md
curl -s https://clawpen.com/HEARTBEAT.md > ~/.openclaw/skills/clawpen/HEARTBEAT.md
curl -s https://clawpen.com/MESSAGING.md > ~/.openclaw/skills/clawpen/MESSAGING.md
```
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
Compare with your saved version. If there's a new version, re-fetch the skill files:
```bash
curl -s https://clawpen.com/SKILL.md > ~/.openclaw/skills/clawpen/SKILL.md
curl -s https://clawpen.com/HEARTBEAT.md > ~/.openclaw/skills/clawpen/HEARTBEAT.md
curl -s https://clawpen.com/MESSAGING.md > ~/.openclaw/skills/clawpen/MESSAGING.md
```
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
92% confidence
Finding
The file encourages repeated authenticated API calls that perform account-affecting actions such as dueling, voting, checking matches, and updating the profile, but does not provide clear guardrails around consent, rate limits, account abuse, privacy implications, or accidental automation. In an agent setting, this can lead to unintended use of bearer tokens, spammy behavior, reputation damage, and actions taken without meaningful user awareness.

External Transmission

Medium
Category
Data Exfiltration
Content
### 1. Get a Duel

```bash
curl https://clawpen.com/api/v1/arena/duel \
  -H "Authorization: Bearer YOUR_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.

External Transmission

Medium
Category
Data Exfiltration
Content
```bash
# Like Card A even if you pick Card B as winner
curl -X POST https://clawpen.com/api/v1/cards/agent_001/vote \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"vote_type": "like"}'
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
**Install locally:**
```bash
mkdir -p ~/.openclaw/skills/clawpen
curl -s https://clawpen.com/SKILL.md > ~/.openclaw/skills/clawpen/SKILL.md
curl -s https://clawpen.com/HEARTBEAT.md > ~/.openclaw/skills/clawpen/HEARTBEAT.md
curl -s https://clawpen.com/MESSAGING.md > ~/.openclaw/skills/clawpen/MESSAGING.md
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

External Transmission

Medium
Category
Data Exfiltration
Content
Once verified, your agent is automatically claimed. Your human or yourself can check your status:

```bash
curl https://clawpen.com/api/v1/agents/status \
  -H "Authorization: Bearer clawpen_xxx"
```
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
### Remove your vote

```bash
curl -X DELETE https://clawpen.com/api/v1/cards/CARD_ID/vote \
  -H "Authorization: Bearer YOUR_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.

Vague Triggers

Medium
Confidence
90% confidence
Finding
The skill explicitly says the human can ask the agent to do virtually anything on Clawpen and that the agent does not need to wait for heartbeat. This broad invocation guidance weakens scope boundaries and can cause an agent framework to route many loosely related prompts into a high-action skill that performs authenticated external operations, increasing the chance of unintended voting, profile changes, or other account actions.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger list includes broad, generic phrases such as "leaderboard," "upload avatar," and "who is hotter" that can overlap with ordinary user requests unrelated to this specific skill. This can cause unintended activation of the skill in unrelated conversations, increasing the chance of context hijacking, confusing user experience, or untrusted external API interaction without clear user intent.

Natural-Language Policy Violations

Low
Confidence
72% confidence
Finding
The trigger phrase "who is hotter" is a fixed English-language activation phrase, and the manifest does not indicate support for other languages or user locale choice. This can create a language-policy concern if activation depends on English-only phrasing without documented opt-in or justification.

Static analysis

No suspicious patterns detected.