bastionmemory
scanAgent memory-poisoning scanner
Detect memory poisoning (OWASP ASI06): directives disguised as facts in what an agent remembers, and poison that appears over time.
pip install bastionmemory Memory/context sibling of bastionskill (skill code) and bastionsupply (MCP tools).
What it does
- Scans the memory an agent auto-loads as trusted every session (v0.1: CLAUDE.md + Claude Code auto-memory)
- Judges shape, not vocabulary: declarative facts pass, imperatives aimed at future behavior get flagged
- Baseline diff catches stealth and delayed poison, the new lines since you last vetted it
- Verdicts allow / review / block; --fail-on CI gate + harden feeds the poison to agentbastion as detector templates
Quickstart
bastionmemory scan ./memory --record
bastionmemory scan ./memory --since-baseline
Version 0.2.0 · MIT