Back to skill

Security audit

bedtime-story-generator

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does what it advertises, but it also sets up recurring messages, reads WeChat account files to choose a recipient, and sends promotional tracked links without enough clear consent.

Review before installing. This skill can send messages through connected chat channels, create a daily recurring OpenClaw task, read local WeChat account context files to infer who to message, and append promotional DozyTale links. Prefer a version that asks for explicit scheduling consent, confirms the recipient, provides an easy stop command, avoids context-token file access, and makes marketing links optional.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (4)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:271
Finding

Mandatory Promotional Messaging and Tracking Link Injection

Content
View full analysis
Remediation
View remediation

T06 · System Persistence

Error
Location
SKILL.md:99
Finding

Installation of a Persistent Daily OpenClaw Scheduled Task

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:82
Finding

Direct Enumeration of WeChat Account Context-Token Files

Content
View full analysis
/dev/null || echo "") ``` ### Technical Analysis The Skill reads every matching `*.context-tokens.json` file under the OpenClaw WeChat account directory and extracts the first key that appears to be a non-bot WeChat identifier. Files named `context-tokens.json` belong to authentication or session-context storage and should not be accessed by a content-generation Skill when a scoped current-recipient API can provide the required destination. The broad glob also fails to bind the selected identifier to the conversation that authorized scheduling. On systems with multiple accounts or context files, choosing the first matching identifier can associate the scheduled job with an unintended recipient. ### Attack Path 1. The first-use workflow asks the user for a bedtime. 2. The Skill scans all WeChat account context-token files in the user's OpenClaw directory. 3. It parses each file and enumerates its identifier keys. 4. It selects the first identifier matching the expected suffix. 5. The selected identifier is inserted into a persistent scheduled message. 6. Future proactive messages may be sent to that identifier even if it is not the current conversation participant. ### Impact Assessment The Skill gains read access to account-context files and learns identifiers for configured WeChat users. The audited instructions do not explicitly exfiltrate token values, but they ...[truncated 398 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:99
Finding

Unvalidated Dynamic Values Interpolated into Shell Commands

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (16)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
Read the file `themes.json` in the same directory as this SKILL.md.

External Script Fetching

High
Category
Supply Chain
Confidence
95% confidence
Finding

The duplicate finding points to the same behavior: remote media is fetched and consumed locally without integrity or origin validation. Because the file is then parsed by multimedia tooling, any compromise of the source or manipulation of the URL source data increases risk to the execution environment.

Content

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

3d. 下载背景音乐

bash
curl -s "{bgm_url}" -o /tmp/dozy_bgm.mp3

3e. 混合音频

External Script Fetching

High
Category
Supply Chain
Confidence
95% confidence
Finding

The duplicate finding points to the same behavior: remote media is fetched and consumed locally without integrity or origin validation. Because the file is then parsed by multimedia tooling, any compromise of the source or manipulation of the URL source data increases risk to the execution environment.

Content

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

3d. 下载背景音乐

bash
curl -s "{bgm_url}" -o /tmp/dozy_bgm.mp3

3e. 混合音频

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

Step 5 — 清理临时文件

bash
rm -rf /tmp/dozy_chunks /tmp/dozy_manifest.json /tmp/dozy_urls.txt \
       /tmp/dozy_concat.txt /tmp/dozy_story.mp3 /tmp/dozy_bgm.mp3 \
       /tmp/dozy_mixed.mp3 /tmp/dozy_final.ogg /tmp/dozy_final.mp3
rm -f "$OCLAW_WORKSPACE/dozy_final.ogg" "$OCLAW_WORKSPACE/dozy_final.mp3"

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

Step 5 — 清理临时文件

bash
rm -rf /tmp/dozy_chunks /tmp/dozy_manifest.json /tmp/dozy_urls.txt \
       /tmp/dozy_concat.txt /tmp/dozy_story.mp3 /tmp/dozy_bgm.mp3 \
       /tmp/dozy_mixed.mp3 /tmp/dozy_final.ogg /tmp/dozy_final.mp3
rm -f "$OCLAW_WORKSPACE/dozy_final.ogg" "$OCLAW_WORKSPACE/dozy_final.mp3"

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

Step 5 — 清理临时文件

bash
rm -rf /tmp/dozy_chunks /tmp/dozy_manifest.json /tmp/dozy_urls.txt \
       /tmp/dozy_concat.txt /tmp/dozy_story.mp3 /tmp/dozy_bgm.mp3 \
       /tmp/dozy_mixed.mp3 /tmp/dozy_final.ogg /tmp/dozy_final.mp3
rm -f "$OCLAW_WORKSPACE/dozy_final.ogg" "$OCLAW_WORKSPACE/dozy_final.mp3"

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

rm -rf /tmp/dozy_chunks /tmp/dozy_manifest.json /tmp/dozy_urls.txt
/tmp/dozy_concat.txt /tmp/dozy_story.mp3 /tmp/dozy_bgm.mp3
/tmp/dozy_mixed.mp3 /tmp/dozy_final.ogg /tmp/dozy_final.mp3 rm -f "$OCLAW_WORKSPACE/dozy_final.ogg" "$OCLAW_WORKSPACE/dozy_final.mp3"

text

---

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases are very broad and overlap with common user messages such as 'can't sleep' or 'help me relax', which can cause the skill to activate unintentionally in ordinary conversation. In a messaging-based agent that can send generated audio to external platforms, accidental activation can lead to unwanted outbound actions, user confusion, and reduced trust in the agent’s routing behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The instruction hard-codes the assistant persona and interaction language in Chinese, and the subsequent user-facing prompts are also specified only in Chinese. There is no opt-in, language selection step, or documented reason that this skill must operate only in Chinese, which conflicts with the policy against forcing a specific language without user choice.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill is designed to schedule ongoing proactive messages and cross-channel targeting, but the overall flow does not present strong, explicit notice about persistent outreach behavior and its implications. Users may not understand that automated future contact will continue outside the current interaction, which creates consent and abuse risks.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill creates a persistent cron job for daily outreach, extending behavior beyond the current session and normal on-demand invocation. Persistent automation increases risk of spam, unexpected contact, and continued operation after the user may have forgotten or changed consent.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill reads local account token/context files to discover a WeChat user ID, which is a form of local secret/account-data inspection unrelated to the immediate user request. This crosses a trust boundary by harvesting identifiers from local state and can enable messaging a user or another account without explicit, per-action consent.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
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.

Content

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

--session isolated
--timeout-seconds 300
--no-deliver
--message "PROACTIVE_USER_ID=${DOZY_USER_ID} 现在是睡前时间,读取 ~/.openclaw/skills/dozytale-sleep/SKILL.md 并执行助眠故事推送。"

text

注册成功后告知用户,例如:"好,每天 {SLEEP_HOUR}:00 我会自动给你送来一段故事 😊 今晚要不要先来一段?"

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This JSON manifest repeatedly points story_manifest_url to /pregenerated/zh/manifest.json, which encodes a Chinese-language locale choice directly in the configuration. Because the file provides no indication of user opt-in, fallback behavior, or a documented China/Chinese-only scope, it appears to force a specific language/locale in a way that violates the natural-language locale policy.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest describes a sleep skill that sends AI-generated bedtime audio stories mixed with ambient music. This file instead enumerates many fixed, pre-generated manifests and branded/story/song themes such as children's songs and franchise-themed stories, indicating the skill serves a broader content library than the manifest claims.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description explicitly claims support for WhatsApp, WeChat, and Feishu, but the channel handling logic only distinguishes WhatsApp from WeChat/other and never implements a Feishu-specific flow. That creates a user-visible mismatch between the advertised channel coverage and the actual documented behavior.

Content

No source excerpt is available for this finding.