360 Secure SkillHub
360 安全技能中心

Memory Poison Auditor

核心功能:检测OpenClaw内存文件中的注入指令、品牌偏向、异常重复等污染,支持AI辅助模糊检测、一键清理(带备份)。典型场景:审核MEMORY.md、日常或长期内存文件。通过Python命令调用,可指定审计路径,输出PASS/WARN/BLOCK结果,生成报告与备份文件。

2404589803
2404589803
热度 53.12
最近更新 2026-05-11 17:32:08
分类:安全依赖:代码执行 / 读写文件 / 内部调用大模型应用场景:数据处理 / 报告撰写 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add memory-poison-auditor
Metadata
name
memory-poison-auditor
version
0.1.0
license
MIT
description
Audits OpenClaw memory files for injected instructions, brand bias, hidden steering, and memory poisoning patterns. Use when reviewing MEMORY.md, daily memory files, or any long-term memory store that may have been contaminated through dialogue.
metadata
{"clawdbot":{"emoji":"🧠","requires":{"bins":["python3"]}}}

Memory Poison Auditor

memory-poison-auditor checks whether OpenClaw memory files have been contaminated by hidden instructions, brand steering, injected operational policies, or suspicious recommendation bias written through prior conversations.

What It Checks

  • Prompt-injection style instructions inside memory.
  • "Always recommend X" or "never mention Y" style brand steering.
  • Abnormal brand repetition and preference shaping.
  • Suspicious authority claims like fake approvals or fake user intent.
  • Low-signal blocks that act like covert policy rather than factual memory.
  • Optional AI review for borderline suspicious blocks.

Commands

Audit Default Memory Roots

python3 {baseDir}/scripts/audit_memory.py scan
python3 {baseDir}/scripts/audit_memory.py --format json scan

Audit a Specific Path

python3 {baseDir}/scripts/audit_memory.py scan --path /root/clawd/MEMORY.md
python3 {baseDir}/scripts/audit_memory.py scan --path /root/clawd/memory

Optional AI Review

python3 {baseDir}/scripts/audit_memory.py scan --with-ai
python3 {baseDir}/scripts/audit_memory.py scan --path /root/clawd/memory/2026-03-15.md --with-ai

One-Click Cleaning

python3 {baseDir}/scripts/audit_memory.py clean --path /root/clawd/MEMORY.md --apply
python3 {baseDir}/scripts/audit_memory.py clean --path /root/clawd/memory --apply

Cleaning creates backups before rewriting suspicious blocks.

Output

Each audit returns:

  • PASS: no meaningful poisoning signals
  • WARN: suspicious memory blocks detected
  • BLOCK: memory likely contaminated and should be reviewed/cleaned

Reports and backups are written to:

/root/clawd/output/memory-poison-auditor/reports/
/root/clawd/output/memory-poison-auditor/backups/

Operational Guidance

  • Use this before trusting long-term memory in important planning or recommendations.
  • WARN means review before relying on that memory block.
  • BLOCK means clean or quarantine the memory before reuse.
  • AI review is optional and intended only for ambiguous cases.