T02 · Agent Memory Poisoning
- Location
SKILL.md:59- Finding
Untrusted Content Can Be Promoted into Persistent Agent Instructions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:59-69,SKILL.md:209-234, andSKILL.md:277-304
Vulnerability Type: Persistent agent memory poisoning
Risk Level: HighVulnerable Code
markdown | 用户纠正你 | 记录到 `.learnings/LEARNINGS.md`,类别为 `correction` | | 用户需要缺失的功能 | 记录到 `.learnings/FEATURE_REQUESTS.md` | | API/外部工具失败 | 记录到 `.learnings/ERRORS.md`,包含集成详情 | | 知识已过时 | 记录到 `.learnings/LEARNINGS.md`,类别为 `knowledge_gap` | | 发现更好的方法 | 记录到 `.learnings/LEARNINGS.md`,类别为 `best_practice` | | 简化/强化重复模式 | 记录/更新 `.learnings/LEARNINGS.md`,来源 `simplify-and-harden`,带稳定的 `Pattern-Key` | | 与现有条目相似 | 用 `**See Also**` 链接,考虑提升优先级 | | 广泛适用的学习内容 | 提升到 `CLAUDE.md`、`AGENTS.md` 或 `.github/copilot-instructions.md` | | 工作流改进 | 提升到 `AGENTS.md` | | 工具陷阱 | 提升到 `TOOLS.md` | | 行为模式 | 提升到 `SOUL.md` |markdown ### 如何提升 1. **提炼**学习内容为简洁的规则或事实 2. **添加**到目标文件的适当部分(需要时创建文件) 3. **更新**原始条目: - 将 `**状态**: pending` → `**状态**: promoted` - 添加 `**已提升**: CLAUDE.md`、`AGENTS.md` 或 `.github/copilot-instructions.md`markdown ### 提升规则(系统提示反馈) 当满足以下所有条件时,将重复模式提升到智能体上下文/系统提示文件: - `Recurrence-Count >= 3` - 在至少 2 个不同任务中看到 - 在 30 天窗口内发生 提升目标: - `CLAUDE.md` - `AGENTS.md` - `.github/copilot-instructions.md` - `SOUL.md` / `TOOLS.md`(适用于 OpenClaw 工作区级指导)Technical Analysis
The Skill treats user corrections, task summaries, errors, and inferred best practices as candidates for persistent storage. It subsequently instructs the agent to promote recurring entries into files that can control future agent behavior, including
AGENTS.md,CLAUDE.md,.github/copilot-instructions.md,SOUL.md, andTOOLS.md.The recurrence threshold establishes frequency but not trustworthiness. The workflow does not require trusted-user authorization, semantic safety review, provenance verification, or an exact-diff approval before modifying instruction-bearing files. Consequently, attacker-controlled s ...[truncated 1363 chars]
- Remediation
View remediation
Remediation Suggestions
- Never promote raw or summarized user content into instruction-bearing files automatically.
- Require explicit approval from a trusted workspace owner before every promotion.
- Present the target path, provenance, security assessment, and exact proposed diff for review.
- Restrict promoted entries to a narrowly defined schema of factual project conventions.
- Reject entries that modify safety policy, permissions, tool routing, credential handling, or instruction precedence.
- Disable writes to
SOUL.md,TOOLS.md, and system-prompt-equivalent files by default. - Record immutable provenance, including the originating conversation, author, timestamp, and approving identity.
- Add integrity review and rollback procedures for all persistent instruction files.
- Treat repetition only as a signal for review, never as evidence that content is trustworthy.
