
Memory Poisoning Scanner
io.github.4hmetuyar由 GitHub 账号 4hmetuyar 发布v0.1.2更新于 Nov 3, 2026
Scans agent code for untrusted input poisoning persistent cross-session memory
发布方自己的服务:Memory.fit
概览
本地 MCP 服务器,扫描智能体源码中的记忆投毒模式:不可信输入被写入持久记忆,或被召回进受信任的提示词。
- 可以做什么
- 扫描代码片段、单个文件或递归扫描整个目录,查找记忆投毒模式
- 按类别列出支持的记忆写入与记忆回读模式
- 输出从 medium 到 critical 的严重级别结果,可选 SARIF 2.1.0 格式用于 CI/CD
- 读取 guardbee.yml 配置,例如失败阈值、文件数量上限与排除规则
- 适用场景
- 适合在审查或审计带有长期记忆、归档/核心记忆或向量知识库的智能体代码库时使用,检查不可信输入是否未经清洗就写入其中,或被召回进 system/assistant 消息。也适合在 CI 流程中对高危结果直接失败。
- 运行要求
- 通过 npx 从 npm 包 @guardbee/mcp-memory-poisoning-scanner 以本地进程运行,需要 Node.js 以及拉取软件包的网络访问。未声明账号、API 密钥或请求头。可通过 guardbee.yml 文件进行可选配置。
安装
在 SourceWeft 中
- 打开 控制台中的 Memory Poisoning Scanner,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
@guardbee/mcp-memory-poisoning-scanner
🇬🇧 English | 🇹🇷 Türkçe | 🇨🇳 中文 | 🇯🇵 日本語 | 🇰🇷 한국어 | 🇧🇷 Português | 🇪🇸 Español | 🇩🇪 Deutsch
[npm version] [npm downloads] [License: MIT]
An MCP (Model Context Protocol) server that scans agent code for memory poisoning — untrusted input written into an agent's persistent, cross-session memory that later gets recalled and fed back to the model as trusted context, potentially in a completely unrelated future session.
prompt-injection-scanner catches an injection payload sitting in content the model reads once (a document, a scraped page). This package catches something structurally different: the code pattern that lets an injection payload become part of what the model treats as its own long-term knowledge — the same gap between reflected and stored XSS, applied to an agent's memory instead of a browser's DOM.
Telemetry is off by default. With
GUARDBEE_TELEMETRY=1it sends the server, tool, success, duration and short parameter values such as a file path; longer strings and fields likecontent,tokenorpasswordare replaced with a placeholder. See@guardbee/mcp-telemetry.
Why ordinary conversation memory is out of scope
A ConversationBufferMemory holding raw chat turns, or a plain chatHistory.push({role: "user", content: userInput}), is completely normal — that's just conversation history, not a vulnerability. This package deliberately does not flag that.
What it targets is narrower and higher-stakes: writes to persistent memory that outlives the current conversation — MemGPT-style archival memory (recalled across future, unrelated sessions) and core memory (re-injected into the system prompt on every turn by design), or a vector store used as a long-term knowledge base rather than per-conversation RAG context. If untrusted input lands there unsanitized, it doesn't just influence the current exchange — it becomes part of what the agent believes is true, for anyone, indefinitely, until someone happens to notice.
The second half of the risk is symmetric: a memory/vector retrieval result flowing directly into a system/assistant-role message or a prompt template is where a poisoned memory "cashes out" as an instruction the model obeys rather than data it merely reads.
Features
- 5 memory-write patterns: MemGPT
archival_memory_insert/core_memory_append/core_memory_replacefed raw input, vector storeadd_texts/add_documents/upsertfed raw input, and a generic catch-all for custom-named long-term-memory/knowledge-base stores - 3 memory-readback patterns: archival/vector retrieval results flowing into a system/assistant-role message, or interpolated directly into a prompt template
- SARIF 2.1.0 output — CI/CD integration (GitHub Code Scanning, etc.)
- Config file support via
guardbee.yml - 17 unit tests — a positive and a negative (false-positive) scenario for every pattern, including an explicit check that ordinary conversation-buffer usage produces zero findings. End-to-end verified against a realistic planted-vulnerability fixture (caught both the write and the read-back) and the entire guardbee-mcp monorepo (386 files, zero false positives in production code)
Quick Start
Claude Desktop / MCP Client
CLI (CI/CD)
MCP Tools
Detected Patterns
Configuration (guardbee.yml)
Limitations (by design)
- Heuristic, not taint tracking. The write and read-back checks each look at one bounded location, not a proven data-flow path from a specific write to a specific later read. A finding means the shape of the risk is present in the code, not a mathematically confirmed exploit chain.
- Pattern coverage is MemGPT-terminology and generic-JS-naming based. A custom-built long-term memory system using entirely different function/variable names won't be recognized unless it happens to match the generic patterns (
*memory*/*knowledge_base*naming, or avectorstore-style API). - This finds code patterns that enable memory poisoning, not an actual poisoned memory store at runtime — pair it with
prompt-injection-scanner(for scanning what's actually stored) if you can inspect the memory contents directly.
Development
License
MIT — GuardBee
Feedback
Questions, ideas, or a false positive? Start a thread in GitHub Discussions or open an issue. If GuardBee is useful to you, a ⭐ on the repository helps others find it.
来源:packages/memory-poisoning-scanner/README.md,提交 040e072
工具
0版本历史
1- v0.1.2最新Sep 29, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
其他 Memory 集成

Memory.fit
fit.memory官方发布者
托管式 Memory.fit 服务器,让 AI 读取你的训练、睡眠、恢复与饮食数据,并写回每周计划、每日目标和饮食计划。
pg.ddx.io: the PostgreSQL community's memory
io.ddx.pg官方发布者
pg.ddx.io: the PostgreSQL community's memory 的托管 MCP 服务,由 pg.ddx.io 发布;无需登录;Streamable HTTP;29 个工具。
var.gg Naming Memory
gg.var官方发布者
远程 MCP 服务器,可根据领域概念推荐并检索韩、日、中、越、英多语言的代码标识符名称,并提供 ERD 结构查询。

Counterparts
ai.counterparts
面向 Claude Code 与 Claude Desktop 的本地优先长期记忆:助手自行写下关于你和项目的笔记,并在之后的会话中回忆起来。

LAHZE - Persian AI Memory Platform
由 GitHub 账号 pedramgholizadeh 发布
以波斯语为先的地理记忆平台:发现地点,起草并发布仅限波斯语的记忆。AI 翻译