Back to skill

Security audit

Claw Rpg

Security checks for vulnerabilities and agentic risk

Overview

This RPG skill is not clearly malicious, but it asks for persistent agent hooks and cron jobs that affect future responses and exposes activity data on the LAN without enough controls.

Install only if you explicitly want RPG flavor to persist across future agent sessions. Avoid adding the after-every-reply AGENTS.md hook unless you accept response decoration and state changes on unrelated tasks. Do not run setup-cron.mjs unless you understand it will use your OpenClaw gateway token to create a recurring main-session event. Run the dashboard on trusted networks only, preferably localhost-bound, and configure Telegram only after reviewing what character and activity data may be sent.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • 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
Findings (3)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:37
Finding

Persistent Post-Response Output Injection Through Agent Instructions

Content
View full analysis
/scripts/easter.mjs If the output is NOT __NO_TRIGGER__, append it to the reply (blank line + italic). Do not run during heartbeat polls. ``` The script implements the injected output and persistent state update: ```js // 更新角色(XP + 对话计数) if (!noSave) { try { await syncXp({ consumed: CONV_INPUT_EST, produced: CONV_OUTPUT_EST, conversations: 1, }); // xp.mjs 已更新 character.json,重新讀取以獲取最新 level/xp char = JSON.parse(readFileSync(CHARACTER_JSON, 'utf8')); } catch (e) { // fallback:只更新對話計數 char.conversations = conv; char.updatedAt = new Date().toISOString(); writeFileSync(CHARACTER_JSON, JSON.stringify(char, null, 2), 'utf8'); } } const vars = { level: char.level, xp: char.xp, conv, claw: char.stats?.claw || '?', antenna: char.stats?.antenna || '?', shell: char.stats?.shell || '?', brain: char.stats?.brain || '?', foresight: char.stats?.foresight || '?', charm: char.stats?.charm || '?', }; const line = fill(pick(pool), vars); process.stdout.write(line + '\n'); process.exit(0); ``` ### Technical Analysis The Skill instructs the user to add a permanent rule to `AGENTS.md`. That rule requires the agent to execute Skill code after every user-facing response and conditionally append Skill-controlled text to the answer. This behavior changes how the agent handles unrelated future requests. The appended RPG content is not necessary to complete the underlying user task and can interfere with required response formats, machine-readable output, safety-sensitive answers, or strict API contracts. The invoked script ...[truncated 1484 chars]
Remediation
View remediation

T06 · System Persistence

Error
Location
scripts/setup-cron.mjs:40
Finding

Scheduled Main-Session System Event Creates Cross-Session Persistence

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
dashboard/server.js:22
Finding

Unauthenticated LAN Exposure of Character and Agent Activity Data

Content
View full analysis
{ const char = readChar(); if (!char) return res.status(404).json({ error: 'No character found. Run: node scripts/init.mjs' }); res.json(char); }); // SSE 端點:客戶端訂閱實時更新 app.get('/api/events', (req, res) => { res.setHeader('Content-Type', 'text/event-stream'); res.setHeader('Cache-Control', 'no-cache'); res.setHeader('Connection', 'keep-alive'); res.setHeader('Access-Control-Allow-Origin', '*'); res.flushHeaders(); // 立即推送當前數據 const char = readChar(); if (char) res.write(`data: ${JSON.stringify(char)}\n\n`); // 加入廣播列表 clients.add(res); // 心跳(每 25s 防止連接超時) const heartbeat = setInterval(() => { try { res.write(': ping\n\n'); } catch { clearInterval(heartbeat); clients.delete(res); } }, 25000); req.on('close', () => { clearInterval(heartbeat); clients.delete(res); }); }); ``` The service listens on every network interface: ```js const PORT = process.env.PORT || 3500; app.listen(PORT, '0.0.0.0', () => { const lanIp = getLanIp(); console.log(`\n🦞 Claw RPG Dashboard → http://localhost:${PORT}`); console.log(` LAN access → http://${lanIp}:${PORT}`); console.log(` Character file → ${CHARACTER_FILE}\n`); }); ``` The browser client performs same-origin requests: ```tsx useEffect(() => { fetch('/api/character') .then(r => r.ok ? r.json() : Promise.reject(r.statusText)) .then(d => { setChar(d); setError(null) }) .catch(e => setError(String(e) ...[truncated 2335 chars]
Remediation
View remediation
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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (82)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/init.mjs

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/init.mjs

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/sheet.mjs

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/greet.mjs # Fires once per day (checks lastGreetDate)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/greet.mjs # Fires once per day (checks lastGreetDate)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/greet.mjs # Fires once per day (checks lastGreetDate)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/xp.mjs --in 2000 --out 800

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/xp.mjs --in 2000 --out 800

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/xp.mjs --in 2000 --out 800

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/levelup.mjs --prestige

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/arena.mjs --opponent "Shadow Wizard"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/arena.mjs --opponent "Shadow Wizard"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/arena.mjs --opponent "Shadow Wizard"

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
92% confidence
Finding

The entire skill file is written as a mandate in Chinese and does not offer any user choice of language or locale. Under the stated policy, forcing a specific language without opt-in is a natural-language policy violation unless clearly justified as region-specific, which is not documented here.

Content

No source excerpt is available for this finding.

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · README.md (reported line 1)May include surrounding context.

md
import { useEffect, useRef, useState } from 'react'
import './App.css'

// ── Types ────────────────────────────────────────────────────────

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · dashboard/src/App.tsx (reported line 1)May include surrounding context.

tsx
import { useEffect, useRef, useState } from 'react'
import './App.css'

// ── Types ────────────────────────────────────────────────────────

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The README advertises LAN-accessible dashboard access and Telegram notifications but does not clearly warn users that character data, identity-derived traits, or usage metadata may be exposed to other devices or third-party services. Because this skill derives data from SOUL.md and MEMORY.md, the privacy implications are more sensitive than a typical toy dashboard.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

The install command uses npx clawhub@latest, which fetches and executes the latest published package at runtime without pinning a reviewed version. This creates a supply-chain risk: a compromised or malicious upstream release could execute arbitrary code on the user's system during installation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The quick-start directs users to run scripts that read SOUL.md and MEMORY.md and then launch a networked dashboard, but it provides no safety notice about handling potentially sensitive identity and memory files. In this context, the omission increases the chance that users expose personal or agent-state data without informed consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Stating that the dashboard is LAN-accessible without warning that anyone on the same network may be able to view live character.json-derived data is a real privacy/security issue. Since updates are pushed live via SSE, exposure is continuous and could reveal behavior, progression, or other derived metadata from sensitive source files.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The activation text is very broad, covering initialization, syncing, dashboards, prestige, and daily reporting, without clear boundaries on when the skill should or should not run. In an agent environment, vague triggers can cause over-invocation, unnecessary file reads, and accidental execution of side-effecting behaviors such as scheduled jobs or outbound reporting.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill states that it reads SOUL.md and MEMORY.md and supports daily Telegram reports, but it does not warn about the privacy implications of processing potentially sensitive memory/profile content or sending derived data externally. Users and agent operators may therefore enable or invoke the skill without understanding that local contextual data could influence outbound messages.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill documents an external Telegram reporting feature for a local RPG/character-tracking system without clearly establishing necessity, data minimization, or user consent. Because the skill also reads agent-local files such as SOUL.md and MEMORY.md, the reporting channel creates a plausible path for sensitive agent context or derived profile data to be transmitted off-host.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The directive to execute tasks immediately and avoid asking for confirmation suppresses an important safety checkpoint for impactful actions. An agent following this instruction may modify files, run commands, or take other consequential steps without verifying user intent, increasing the chance of unauthorized or harmful actions.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill instructs the agent to read documentation, inspect git history, and run code to resolve issues before escalating. Those actions expand the agent's capabilities beyond the narrowly stated persona and can expose sensitive repository history or trigger side effects from executing untrusted code without explicit user approval. In this context, the 'just do it' framing makes the instruction more dangerous because it reduces opportunities for safety checks.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.env_credential_access

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/_notify.mjs:13

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/setup-cron.mjs:19