T02 · Agent Memory Poisoning
- Location
SKILL.md:165- Finding
Untrusted Learnings Can Poison Persistent Agent Instructions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:165-190,SKILL.md:306-312; related injection behavior inreferences/clawdbot-integration.md:38-44and promotion workflow inreferences/clawdbot-integration.md:124-138
Vulnerability Type: Persistent agent-memory poisoning
Risk Level: HighVulnerable Code
markdown ## Promoting to Project Memory When a learning is broadly applicable (not a one-off fix), promote it to permanent project memory. ### When to Promote - Learning applies across multiple files/features - Knowledge any contributor (human or AI) should know - Prevents recurring mistakes - Documents project-specific conventions ### Promotion Targets | Target | What Belongs There | |--------|-------------------| | `CLAUDE.md` | Project facts, conventions, gotchas for all Claude interactions | | `AGENTS.md` | Agent-specific workflows, tool usage patterns, automation rules | | `.github/copilot-instructions.md` | Project context and conventions for GitHub Copilot | | `SOUL.md` | Behavioral guidelines, communication style, principles (clawdbot) | | `TOOLS.md` | Tool capabilities, usage patterns, integration gotchas (clawdbot) | ### How to Promote 1. **Distill** the learning into a concise rule or fact 2. **Add** to appropriate section in target file (create file if needed) 3. **Update** original entry: - Change `**Status**: pending` → `**Status**: promoted` - Add `**Promoted**: CLAUDE.md`, `AGENTS.md`, or `.github/copilot-instructions.md`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 .gi ...[truncated 2649 chars]- Remediation
View remediation
Remediation Suggestions
- Require explicit human approval before writing to any persistent instruction file.
- Treat user corrections, error output, logs, retrieved documentation, and session messages as untrusted data.
- Keep learnings as quoted informational records rather than imperative instructions.
- Reject promotions that alter safety rules, authorization boundaries, tool permissions, identity, credential handling, or instruction precedence.
- Replace “promote aggressively” with a conservative, review-based promotion policy.
- Record provenance for every promoted rule, including source session, author, timestamp, and approving reviewer.
- Add an allowlist of permitted promotion categories and destination sections.
- Present a diff for approval before modifying
CLAUDE.md,AGENTS.md,SOUL.md,TOOLS.md, or Copilot instructions. - Add rollback support and periodically review persistent instructions for stale or suspicious entries.
- Never automatically extract or publish a Skill from content that has not undergone independent security review.
