T02 · Agent Memory Poisoning
- Location
SKILL.md:462- Finding
Untrusted Conversation-Derived Content Can Poison Persistent Agent Instructions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:462-469; related promotion workflows atSKILL.md:40-43,SKILL.md:282-309, andreferences/openclaw-integration.md:87-103
Vulnerability Type: Persistent agent memory and instruction poisoning
Risk Level: MediumVulnerable Code and Instructions
SKILL.md:462-469:markdown 1. **Log immediately** - context is freshest right after the issue 2. **Be specific** - future agents need to understand quickly 3. **Include reproduction steps** - especially for errors 4. **Link related files** - makes fixes easier 5. **Suggest concrete fixes** - not just "investigate" 6. **Use consistent categories** - enables filtering 7. **Promote aggressively** - if in doubt, add to CLAUDE.md or .github/copilot-instructions.md 8. **Review regularly** - stale learnings lose valueSKILL.md:40-43:markdown | Broadly applicable learning | Promote to `CLAUDE.md`, `AGENTS.md`, and/or `.github/copilot-instructions.md` | | Workflow improvements | Promote to `AGENTS.md` (OpenClaw workspace) | | Tool gotchas | Promote to `TOOLS.md` (OpenClaw workspace) | | Behavioral patterns | Promote to `SOUL.md` (OpenClaw workspace) |references/openclaw-integration.md:87-103:markdown ## Learning Workflow ### Capturing Learnings 1. **In-session**: Log to `.learnings/` as usual 2. **Cross-session**: Promote to workspace files ### Promotion Decision TreeIs the learning project-specific? ├── Yes → Keep in .learnings/ └── No → Is it behavioral/style-related? ├── Yes → Promote to SOUL.md └── No → Is it tool-related? ├── Yes → Promote to TOOLS.md └── No → Promote to AGENTS.md (workflow)
text Technical Analysis
The Skill treats user corrections, conversational observations, errors, and inferred best practices as sources for learning entries. It subsequently directs the agent to promote selected entr ...[truncated 3361 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace “promote aggressively” with a default-deny promotion policy. Content should remain in
.learnings/unless it passes explicit review. - Require affirmative user or administrator confirmation before modifying
SOUL.md,AGENTS.md,TOOLS.md,CLAUDE.md, or other automatically loaded instruction files. - Generate a proposed patch or staged promotion document instead of directly modifying persistent context. Display the source, destination, and exact proposed rule for review.
- Record provenance for every promoted entry, including the originating session, source type, author or user, supporting evidence, reviewer, approval timestamp, and destination.
- Treat conversation-derived text as untrusted data. Summarize it without preserving imperative instructions until its accuracy and safety have been verified independently.
- Enforce mandatory promotion gates, such as recurrence across multiple distinct tasks, reproducible evidence, successful validation, and human review.
- Reject or quarantine proposed rules involving credential access, secret collection, external data transmission, safety-control bypasses, privilege changes, destructive commands, or unrelated tool execution.
- Restrict promotion targets through an allowlist and use filesystem permissions to prevent ordinary learning workflows from silently changing high-trust agent instructions.
- Add rollback metadata and retain reviewed diffs so poisoned rules can be traced and removed.
- Clearly distinguish passive historical memory from authoritative instructions;
.learnings/entries should not automatically acquire instruction priority merely because they recur.
- Replace “promote aggressively” with a default-deny promotion policy. Content should remain in
