Python: Feature request: Memory poisoning defense (OWASP ASI06) integration
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 28/100
Research direction
Start by reviewing the ISemanticTextMemory adapter and the kernel memory pipeline mentioned in the proposal, then examine how Semantic Kernel currently handles persistent memory. Determine whether the integration should be an adapter, middleware hook, documentation guidance, or a combination, and define completion criteria for memory validation, integrity checks, policy handling, and rollback.
Written by the indexing model from the issue text.
Description
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
-
- Dominant language
- C#
- Stars
- 28.8k
- Forks
- 4.9k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 48
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/semantic-kernel
-
Python: Bug: ChatMessageContent.from_element drops AudioContent and BinaryContent into raw TextContentPossibly taken @halcyon-past claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
microsoft/semantic-kernel#14824 · 1 comment ·
Maintainers usually reply within 3 days
-
Python: Bug: Redis search returns None for every field that declares a storage_name, because RETURN lists the declared namePossibly taken @wasim-builds claimed this 9 days ago. Openpython triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/semantic-kernel#14753 · 1 comment ·
Maintainers usually reply within 3 days
-
.Net: gpt-image-1 is the default image model in the .NET OpenAI connector, and OpenAI shuts it down on October 23Possibly taken @nightcityblade claimed this 46 days ago. Open.NET triage
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
microsoft/semantic-kernel#14526 · 1 comment ·
Maintainers usually reply within 3 days
-
Python: VolatileMemoryStore.get_batch and get_nearest_matches ignore with_embeddings=False (deepcopy result is discarded)Possibly taken @VANDRANKI claimed this 48 days ago. Openpython triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
microsoft/semantic-kernel#14522 ·
Maintainers usually reply within 3 days
-
.Net: Bug: BinaryContent does not decode the %xx escapes of a non-base64 data URIPossibly taken @Laurianti claimed this 48 days ago. Open.NET triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
microsoft/semantic-kernel#14518 ·
Maintainers usually reply within 3 days
All issues in microsoft/semantic-kernel
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Support Flux ignore rules (drift detection ignore paths) in Microsoft.KubernetesConfiguration schemaOpen
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Azure/azure-resource-manager-schemas#3921 ·
Maintainers usually reply within 1 day
-
text-align: justify is ignored in HTML to PDF conversionPossibly taken @PrzemyslawKlys claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
asyncapi/modelina#2709 · 1 comment ·
Maintainers usually reply within 1 day