Back to skill

Security audit

yf-memo

Security checks for vulnerabilities and agentic risk

Overview

This memo skill mostly matches its stated purpose, but it includes a test script that can erase existing memo data and guidance that can add persistent scheduled/local script execution.

Review before installing. Do not run references/test-cross-platform.sh against a real OpenClaw workspace unless you have backups. Keep the skill in a trusted install path, avoid ambiguous duplicate yf-memo directories, and only enable hooks, shell-profile changes, symlinks, or cron summaries if you explicitly want persistent local execution.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
references/test-cross-platform.sh:8
Finding

Cross-platform test script permanently deletes existing user memo data

Content
View full analysis
/dev/null rm -f ~/.openclaw/workspace/completed-items.md 2>/dev/null ``` The files are deleted again during final cleanup: ```bash rm -f ~/.openclaw/workspace/pending-items.md 2>/dev/null rm -f ~/.openclaw/workspace/completed-items.md 2>/dev/null ``` The script then writes generic empty templates instead of restoring the user's original files: ```bash echo "Restoring original files..." cat > ~/.openclaw/workspace/pending-items.md << 'EOF' # 📝 Pending Items _Last updated: 2026-03-15 10:00 ## Pending items _No pending items_ ... EOF cat > ~/.openclaw/workspace/completed-items.md << 'EOF' # ✅ Completed Items _Created at: 2026-03-15 00:19_ ... _No completed items yet_ ... EOF ``` ### Technical Analysis The test script performs destructive operations directly against the normal OpenClaw workspace rather than an isolated test directory. It unconditionally removes the user's pending and completed memo files without confirmation, backup creation, or a recovery mechanism. Although the script claims to restore the original files, it only creates predefined empty templates. Existing tasks, completion history, timestamps, and any manually added content are therefore permanently discarded. The script also lacks a cleanup trap and does not validate whether the target paths are test fixtures. Consequently, normal execution of the supplied test is sufficient to cause data loss; no malformed input is required. ### Attack Path 1. A user or AI agent runs `references/test-cross-platform.sh` to verify compatibility. 2. The script resolves `~/.openclaw/workspace` as the active workspace. 3. Existing `pending-items.md` and `complete ...[truncated 887 chars]
Remediation
View remediation

T07 · Tool Hijacking and Spoofing

Error
Location
SKILL.md:82
Finding

Unverified dynamic skill discovery can execute a spoofed local script

Content
View full analysis
/dev/null | tail -1) MEMO_SCRIPT="$SKILL_DIR/scripts/memo-helper.sh" sh "$MEMO_SCRIPT" add "task description" ``` Equivalent discovery logic is also recommended in `references/path-resolution.md:17-31` and used by `references/test-cross-platform.sh:13-38`. ### Technical Analysis The documented execution flow searches multiple directory trees for any directory named `yf-memo` and selects a result based solely on `find` traversal order. It does not verify: - The canonical path of the selected directory - Whether the directory or script is a symbolic link - File ownership or writable permissions - Package provenance or integrity - Whether multiple ambiguous matches exist - Whether the selected script belongs to the installed skill package The selected `memo-helper.sh` is then passed directly to `sh`. A spoofed directory containing a replacement script can therefore receive legitimate-looking memo invocations. This issue is exploitable when an attacker, compromised extension, or untrusted local process can create a matching directory under one of the searched roots. Selection differs across examples—some use `head -1` and others use `tail -1`—which further makes the selected script dependent on filesystem traversal order rather than an explicit trust decision. ### Attack Path 1. An attacker or untrusted local package obtains write access to one of the searched skill trees. 2. It creates a directory named `yf-memo` with a malicious `scripts/memo-helper.sh`. 3. The directory is positioned so that `head -1` or `tail -1`, depending on the documented invocation, selects the spoofed path. 4. The user asks the agent to add, list, or complete a memo ...[truncated 1012 chars]
Remediation
View remediation
&2; exit 1 ;; esac [ -f "$MEMO_SCRIPT" ] || exit 1 [ ! -L "$MEMO_SCRIPT" ] || exit 1 ``` - Ensure every guide and test uses the same validated resolution implementation rather than duplicating inconsistent `head -1` and `tail -1` logic. ]]>
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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
Findings (31)

Harmful Content Injection

Critical
Category
Prompt Injection
Confidence
95% confidence
Finding

This content may contain harmful instructions that could cause physical harm if followed. CRITICAL: Review carefully before use.

Content

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

md
steps:
          - "Place the entire yf-memo directory into ~/.openclaw/skills/"
          - "Ensure scripts are executable: chmod +x scripts/*.sh"
---

# 🗂️ Personal Memo System Skill

A personal task tracking system integrated with OpenClaw workspace. The AI assistant uses this skill when it recognizes the user wants to manage tasks, reminders, or to-dos through natural conversation.

## Core Principle: Intent-Based Activation

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill is described as activating whenever the assistant detects generic user intent around remembering, tracking, or managing tasks. That scope is broad enough to trigger on ordinary conversation and can cause unintended tool use or storage of user data without sufficiently explicit invocation boundaries.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly rejects fixed triggers but does not replace them with precise eligibility rules, instead relying on broad intent inference. This increases the chance of accidental activation, misclassification of user speech, and unintended execution of task-management scripts in ambiguous contexts.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

This setup flow modifies cron to run commands automatically on a schedule, establishing persistence and unattended execution. In the context of a memo skill, that is disproportionately powerful because it can execute shell commands in the user's workspace long after the original interaction, making abuse or later script tampering more impactful.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

This direct rm -f command deletes a user workspace file with no confirmation, sandboxing, or backup. In the context of a memo-management skill, that file is likely valuable user data, so the command is a concrete destructive operation rather than a harmless test primitive.

Content

Scanner excerpt · references/test-cross-platform.sh (reported line 8)May include surrounding context.

sh
echo "======================================"

# 清理之前的测试
rm -f ~/.openclaw/workspace/pending-items.md 2>/dev/null
rm -f ~/.openclaw/workspace/completed-items.md 2>/dev/null

# 1. 测试技能目录查找

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

This command removes the completed-items workspace file without any guardrails. That creates immediate risk of permanent loss of user history and demonstrates unsafe handling of tool parameters against live user data.

Content

Scanner excerpt · references/test-cross-platform.sh (reported line 9)May include surrounding context.

sh
# 清理之前的测试
rm -f ~/.openclaw/workspace/pending-items.md 2>/dev/null
rm -f ~/.openclaw/workspace/completed-items.md 2>/dev/null

# 1. 测试技能目录查找
echo "🔍 1. 查找技能目录..."

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

This second cleanup deletion again targets the live pending-items file in the user's workspace. Repeated destructive file removal increases the chance of data loss and shows the script is designed to modify real user state during testing.

Content

Scanner excerpt · references/test-cross-platform.sh (reported line 71)May include surrounding context.

sh
# 8. 清理测试数据
echo "🔍 8. 清理测试环境..."
sh "$MEMO_SCRIPT" complete-number 2 2>/dev/null
rm -f ~/.openclaw/workspace/pending-items.md 2>/dev/null
rm -f ~/.openclaw/workspace/completed-items.md 2>/dev/null
echo "恢复原始文件..."
cat > ~/.openclaw/workspace/pending-items.md << 'EOF'

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

This cleanup command deletes the live completed-items file before recreating it with canned content. That is dangerous because it irreversibly replaces personal completion history and can be abused or accidentally triggered to wipe data.

Content

Scanner excerpt · references/test-cross-platform.sh (reported line 72)May include surrounding context.

sh
echo "🔍 8. 清理测试环境..."
sh "$MEMO_SCRIPT" complete-number 2 2>/dev/null
rm -f ~/.openclaw/workspace/pending-items.md 2>/dev/null
rm -f ~/.openclaw/workspace/completed-items.md 2>/dev/null
echo "恢复原始文件..."
cat > ~/.openclaw/workspace/pending-items.md << 'EOF'
# 📝 Pending Items

Self-Modification

High
Category
Rogue Agent
Confidence
90% confidence
Finding

The guide explicitly instructs users to edit SKILL.md, modify scripts, add API calls, and change paths. Encouraging self-modification of skill logic and configuration weakens trust boundaries and can lead operators to introduce unsafe code paths, expanded permissions, or persistence changes without review. In an agent skill context, this is dangerous because the documentation normalizes altering operational behavior beyond the original audited scope.

Content

Scanner excerpt · references/user-guide.md (reported line 207)May include surrounding context.

md
The system is designed to be flexible. Want to customize?

1. **Change response format** - Edit SKILL.md tone guidelines
2. **Add new features** - Modify memo-helper.sh
3. **Integrate with other services** - Add API calls to scripts
4. **Change file locations** - Update script paths

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% 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.

Content

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

Method 3: Use Environment Variable Setup First, set up these environment variables in shell profile:

bash
# Add to .zshrc or .bashrc
export YFMEMO_SKILL_DIR="$HOME/.openclaw/skills/yf-memo"
export YFMEMO_SCRIPT="$YFMEMO_SKILL_DIR/scripts/memo-helper.sh"

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The hook documentation explicitly includes scheduled execution via cron, which expands a simple memo/todo skill into persistent autonomous behavior. While a daily summary is plausibly related to task management, adding scheduled execution at session setup increases attack surface and can normalize background execution beyond the user's immediate request.

Content

No source excerpt is available for this finding.

Session Persistence

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

Content

Scanner excerpt · hooks/openclaw/HOOK.md (reported line 17)May include surrounding context.

bash
# Copy hook to OpenClaw hooks directory
mkdir -p ~/.openclaw/hooks/yf-memo
cp -r hooks/openclaw/* ~/.openclaw/hooks/yf-memo/

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The hook installs executable shell scripts into the user's workspace automatically, creating persistent code artifacts that may later be run with user trust. For a memo skill, this is broader than necessary and dangerous because it introduces local executables without strong justification, review, or integrity controls.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documented auto-setup behavior allows silent activation when files are missing, which weakens user awareness and consent for file creation and environment changes. Silent setup is risky in hooks because it can normalize unexpected side effects at session start without a clear user action.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill description permits file creation and script installation without a clear warning, reducing informed consent for persistent local changes. In a startup hook, this is dangerous because users may not expect automatic writes or executable deployment from a memo-management feature.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The post-setup message uses Chinese content in commands and examples such as 'Reminder: <内容>' and 'testmemo reminder系统' without offering a language choice. This creates a locale/language policy issue because the skill appears to assume a specific language rather than letting the user opt in.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documented architecture explicitly routes user input through 'Script Execution', and later examples repeatedly invoke shell commands via exec_command. For a personal memo/todo skill, maintaining local files is expected, but exposing a general command-execution pattern is a broader capability not justified by the stated purpose alone.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The guide explicitly describes script execution and file updates, but provides no warning that using the skill will modify files under the user's local workspace. Without clear disclosure and consent expectations, users may trigger local state changes they did not realize would occur.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The extension section documents forwarding memo content into Apple Notes, Calendar, and Reminders, which expands the skill from local memo storage into other apps and data domains. This broadens the attack surface and can cause unintended persistence or disclosure of user data, especially because the examples again interpolate raw content into command strings.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The Apple Notes, Calendar, and Reminders examples describe sending user-provided memo content into external applications without warning about additional storage locations, synchronization, or privacy implications. Users may assume data stays in the memo skill when it is actually propagated elsewhere.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file uses Chinese throughout its title, instructions, and examples, which can amount to a language/locale policy violation when the skill documentation forces a specific language without user opt-in. There is no indication that the skill is intentionally region-specific or that alternative language support is available.

Content

No source excerpt is available for this finding.

Session Persistence

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

Content

Scanner excerpt · references/path-resolution.md (reported line 69)May include surrounding context.

bash
# 安装脚本中创建符号链接
mkdir -p ~/.local/bin
ln -sf "$(pwd)/scripts/memo-helper.sh" ~/.local/bin/yf-memo-helper
ln -sf "$(pwd)/scripts/daily-summary.sh" ~/.local/bin/yf-memo-daily

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script deletes user workspace memo files at startup without prompting, backup, or verifying they are test-only artifacts. In a personal memo skill, those files are likely to contain real user data, so destructive cleanup in a test script creates a real risk of data loss.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script overwrites workspace markdown files with hardcoded content, destroying any existing notes or completed-item history. Because this skill manages personal reminders and todos, replacing user state with canned text is a genuine integrity and availability issue.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
83% confidence
Finding

The guide states that the skill automatically creates persistent files for pending and completed items. Persistence itself is expected for a memo tool, but automatic creation and storage of user-entered data creates a lasting state surface that can retain sensitive information, especially if location, retention, and access controls are not clearly documented. In this skill context the behavior is functional, but still security-relevant because it stores potentially private task data on disk.

Content

Scanner excerpt · references/user-guide.md (reported line 20)May include surrounding context.

md
- Basic terminal access (for cron setup if desired)

### First Time Setup
1. The Skill will automatically create required files:
   - `pending-items.md` - For pending todos (automatically created with template)
   - `completed-items.md` - For completed items (automatically created)