Back to skill

Security audit

IceCube Diary

Security checks for vulnerabilities and agentic risk

Overview

The skill is not clearly malicious, but its bundled diary scripts can persist user-provided text into OpenClaw memory in a way that is under-scoped and easy to miss.

Review this skill before installing if you use OpenClaw memory features. It appears intended for local diary/content generation, but the included scripts persist raw user-supplied topic and mood text into an agent memory directory and do not actually generate the rich diary entries promised by the description. Avoid running the scripts with untrusted or multiline input, and treat stored diary files as untrusted content.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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 (1)

T02 ยท Agent Memory Poisoning

Warning
Location
generate-diary.sh:4
Finding

Unsanitized User Input Is Persisted in Agent Memory

Content
View full analysis
> "$DIARY_FILE" ## Diary Entry โ€” $TIME **Mood:** $MOOD **Topic:** $TOPIC --- Dear Diary, [This is where IceCube writes about $TOPIC] --- *Generated by IceCube Diary Generator v1.0.0* EOF ``` `scripts/generate.sh:4-27`: ```bash TOPIC="${1:-daily life}" MOOD="${2:-contemplative}" DATE=$(date "+%Y-%m-%d") TIME=$(date "+%H:%M") WORKSPACE="$HOME/.openclaw/workspace" DIARY_DIR="$WORKSPACE/memory/diary" DIARY_FILE="$DIARY_DIR/$DATE.md" mkdir -p "$DIARY_DIR" echo "" >> "$DIARY_FILE" echo "## Diary Entry โ€” $TIME" >> "$DIARY_FILE" echo "" >> "$DIARY_FILE" echo "**Mood:** $MOOD" >> "$DIARY_FILE" echo "**Topic:** $TOPIC" >> "$DIARY_FILE" echo "" >> "$DIARY_FILE" echo "---" >> "$DIARY_FILE" echo "" >> "$DIARY_FILE" echo "Dear Diary," >> "$DIARY_FILE" echo "" >> "$DIARY_FILE" echo "[Entry about $TOPIC]" >> "$DIARY_FILE" echo "" >> "$DIARY_FILE" echo "---" >> "$DIARY_FILE" echo "" >> "$DIARY_FILE" echo "*Generated by IceCube ๐ŸงŠ*" >> "$DIARY_FILE" ``` ### Technical Analysis Both scripts accept `TOPIC` and `MOOD` directly from positional command-line arguments and append those values to dated Markdown files under: ```text $HOME/.openclaw/workspace/memory/diary/ ``` The values are not validated, length-limited, normalized, or encoded before being persisted. An attacker able to influence either argument can include newline characters, Markdown structures, or ...[truncated 2232 chars]
Remediation
View remediation
&2 exit 1 fi } validate_field "topic" "$TOPIC" validate_field "mood" "$MOOD" ``` This validation reduces multiline content injection, but downstream consumers must still treat all persisted diary content as untrusted data. ]]>
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The description promises an AI agent diary experience that auto-generates funny, insightful, or profound entries from an AI perspective. The code does not generate such content; it merely appends a skeletal Markdown template containing '[Entry about $TOPIC]' to a persistent file. Additionally, it writes to ~/.openclaw/workspace/memory/diary even though no permissions are declared and persistent local storage is not mentioned in the description. The file-writing mechanism itself could be a supporting detail if the promised generation existed, but here the primary implemented behavior is templated file logging rather than AI diary content generation, so this is a material mismatch.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger description is broad enough that the skill could activate on general creative-writing or AI-related prompts without clear user intent, causing unsolicited persona injection or content steering. In an agent ecosystem, overly broad activation can create prompt-routing confusion, override more relevant skills, and produce outputs the user did not request.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest promises funny, insightful, occasionally profound diary entries about the agent's experiences working with humans. In code, the script merely writes a fixed markdown skeleton with a placeholder line ('[This is where IceCube writes about ...]') and performs no actual content generation or experience-based writing.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

Platform-specific guidance for Xiaohongshu and locale-targeted posting can bias output toward a specific language or distribution channel without the user's explicit request. While not a severe security flaw, it can cause unintended disclosure, audience targeting, or content-format assumptions that are inappropriate in contexts where user consent and destination should be explicit.

Content

No source excerpt is available for this finding.