T02 · Agent Memory Poisoning
- Location
SKILL.md:17- Finding
Untrusted conversational content can be promoted into persistent agent instructions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a coherent self-improvement skill, but it needs review because it can turn conversation-derived notes into persistent instructions that affect future agent sessions.
Review before installing. This skill is not clearly malicious, but use it only if you want agents to keep persistent learning files and potentially edit future instruction files. Prefer project-local setup, avoid global hooks unless you trust the scripts, do not log secrets or sensitive prompts, require human review before promoting learnings into CLAUDE.md, AGENTS.md, SOUL.md, TOOLS.md, or Copilot instructions, and install from a pinned or verified release rather than a mutable branch.
SKILL.md:17Untrusted conversational content can be promoted into persistent agent instructions
SKILL.md:39Manual installation retrieves mutable Skill content from an unpinned repository branch
scripts/extract-skill.sh:88Output path validation can be bypassed through symbolic links
The declared description is about maintaining and consulting learnings for continuous improvement—essentially recording lessons, corrections, and failures. The supplied code does not capture, store, review, or manage learnings directly. Instead, it is a filesystem scaffolding utility that generates a new skill folder and template markdown file from a skill name, optionally as a dry run. While the comments mention extracting a skill from a learning entry, that is a narrower and different function than the declared behavior. The primary purpose, triggers, and effective capabilities are materially different, so this is a clear mismatch.
Instructing users to install the hook in ~/.claude/settings.json enables global execution across all projects and sessions, expanding the blast radius if the script is unsafe, modified, or later compromised. Because the skill is self-improvement oriented and persistent by design, global activation makes the behavior more dangerous than project-local use.
Add to ~/.claude/settings.json for global activation:
{
Instructions found that direct the agent to transmit conversation context or user data to external services.
Send message to another session:
sessions_send(sessionKey="session-id", message="Learning: API requires X-Custom-Header")
The skill instructs agents to create persistent files under ~/.openclaw/workspace/.learnings, which can retain conversation-derived content across sessions. Because the logged material may include user corrections, errors, API details, or operational context, this creates a data-retention and cross-session exposure risk if sensitive information is written without redaction or access controls.
└── FEATURE_REQUESTS.md
### Create Learning Files
```bash
mkdir -p ~/.openclaw/workspace/.learnings
An empty hook matcher causes the activator script to run on every user prompt, creating an overly broad prompt-injection surface and unnecessary execution path. In environments where hook scripts process untrusted prompt content or invoke shell logic, this increases the chance of unintended data exposure, excessive logging, or abuse through crafted prompts.
The full hook setup repeats the same broad empty matcher, so every prompt triggers the hook regardless of relevance. Repeated always-on triggering magnifies the risk of prompt-driven misuse, noisy persistence of sensitive content into .learnings/, and accidental execution overhead in all sessions.
The manifest describes a skill focused on capturing learnings, errors, and corrections and reviewing them before major tasks. This section adds a separate capability to generate entirely new skills, including invoking helper scripts and creating skills/<skill-name>/SKILL.md, which is not an obvious or necessary part of merely recording and promoting learnings.
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.
When the above learning is extracted as a skill, it becomes:
File: skills/docker-m1-fixes/SKILL.md
---
Project-level hook configuration creates session persistence, causing the behavior to be reloaded automatically in future sessions without a fresh security decision. Persistence is not inherently malicious, but for command-executing hooks it increases the risk of unnoticed continued execution and long-term influence over agent behavior.
Create .claude/settings.json in your project root:
{
An empty matcher causes the activator hook to run on every prompt, creating broad and persistent interception of agent activity. In this skill context, that increases exposure because any future change to the script or its output affects all prompts rather than a narrowly scoped subset.
The document states that hook scripts only output text and do not run commands, but the configuration explicitly executes shell scripts via command hooks. This mismatch can mislead users into granting trust or permissions under false assumptions, increasing the chance they deploy code-executing hooks without appropriate review.
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.
openclaw hooks enable self-improvement
### 3. Create Learning Files
Create the `.learnings/` directory in your workspace:
No suspicious patterns detected.