Python: Feature request: Memory poisoning defense (OWASP ASI06) integration
维护者通常 3 天内回复
还没有人认领这个 Issue。
评估
调研方向
首先审查提案中提到的 ISemanticTextMemory 适配器和内核记忆管道,然后研究 Semantic Kernel 当前如何处理持久化记忆。确定该集成应采用适配器、中间件钩子、文档指导还是组合方式,并定义记忆验证、完整性检查、策略处理和回滚的完成标准。
由索引模型根据 Issue 内容生成。
描述
Summary
OWASP recently published the Top 10 for Agentic Applications, which includes ASI06: Memory Poisoning — a threat category specific to AI agents that persist memory across sessions.
As Semantic Kernel adds more persistent memory and agent loop capabilities, it would be valuable to have a built-in or recommended defense layer for this attack surface.
The threat
When an agent stores information in memory (conversation history, retrieved facts, tool outputs, scratchpads), a malicious actor can craft inputs that get stored as "trusted" memories. Those poisoned memories then influence the agent's future behavior — causing it to leak data, take unauthorized actions, or be persistently manipulated across sessions.
This is distinct from prompt injection (which targets user input at the front of the loop) — memory poisoning targets the memory store itself.
Proposed integration
The OWASP reference implementation for ASI06 is agent-memory-guard (MIT/Apache-2.0 licensed, pure Python, zero external dependencies):
pip install agent-memory-guard
It provides:
- Runtime memory validation (prompt injection, secret leakage, protected-key tampering)
-
- Cryptographic integrity verification (SHA-256 baselines)
-
-
- Declarative YAML policy engine
-
-
-
-
- Point-in-time snapshots and rollback
-
-
-
-
-
-
- Drop-in middleware for common memory backends
Suggested integration points for Semantic Kernel:
- Drop-in middleware for common memory backends
-
-
-
- A
MemoryGuard-wrappedISemanticTextMemoryadapter -
- Optional middleware hook in the kernel's memory pipeline
-
- Documentation guidance on memory security best practices per OWASP ASI06
References
- OWASP Top 10 for Agentic Applications: https://genai.owasp.org/
-
- agent-memory-guard (OWASP reference impl): https://github.com/OWASP/www-project-agent-memory-guard
-
- 主要语言
- C#
- 星标
- 28.8k
- 派生
- 4.9k
- 平均合并
- 2 天 17 小时
- 30 天内合并 PR
- 48
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/semantic-kernel 的其他 Issue
-
Python: Bug: ChatMessageContent.from_element drops AudioContent and BinaryContent into raw TextContent可能已有人在做 @halcyon-past 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
microsoft/semantic-kernel#14824 · 1 条评论 ·
维护者通常 3 天内回复
-
Python: Bug: Redis search returns None for every field that declares a storage_name, because RETURN lists the declared name可能已有人在做 @wasim-builds 于 9 天前认领。 未关闭python triage
难度 2/5 1-3 小时 新手友好度 78/100
microsoft/semantic-kernel#14753 · 1 条评论 ·
维护者通常 3 天内回复
-
.Net: gpt-image-1 is the default image model in the .NET OpenAI connector, and OpenAI shuts it down on October 23可能已有人在做 @nightcityblade 于 46 天前认领。 未关闭.NET triage
难度 2/5 1-3 小时 新手友好度 73/100
microsoft/semantic-kernel#14526 · 1 条评论 ·
维护者通常 3 天内回复
-
Python: VolatileMemoryStore.get_batch and get_nearest_matches ignore with_embeddings=False (deepcopy result is discarded)可能已有人在做 @VANDRANKI 于 48 天前认领。 未关闭python triage
难度 2/5 1-3 小时 新手友好度 84/100
microsoft/semantic-kernel#14522 ·
维护者通常 3 天内回复
-
.Net: Bug: BinaryContent does not decode the %xx escapes of a non-base64 data URI可能已有人在做 @Laurianti 于 48 天前认领。 未关闭.NET triage
难度 2/5 1-3 小时 新手友好度 76/100
microsoft/semantic-kernel#14518 ·
维护者通常 3 天内回复
查看 microsoft/semantic-kernel 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
Support Flux ignore rules (drift detection ignore paths) in Microsoft.KubernetesConfiguration schema未关闭
难度 2/5 1-3 小时 新手友好度 65/100
Azure/azure-resource-manager-schemas#3921 ·
维护者通常 1 天内回复
-
text-align: justify is ignored in HTML to PDF conversion可能已有人在做 @PrzemyslawKlys 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 78/100
维护者通常 4 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
asyncapi/modelina#2709 · 1 条评论 ·
维护者通常 1 天内回复