microsoft / microsoft/semantic-kernel
Python: [Feature Request] Memory Poisoning Protection for Semantic Kernel via OWASP Agent Memory Guard
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 28.6k
- Forks
- 4.8k
- Avg merge
- 14h 13m
- Merged PRs (30d)
- 18
Description
Problem
Semantic Kernel agents with persistent memory (ChatHistory, VolatileMemoryStore, or custom stores) are vulnerable to memory poisoning attacks. Adversarial inputs stored in memory can cause agents to leak secrets, ignore instructions, or produce corrupted outputs. OWASP identifies this as a top risk for LLM applications.
Proposed Solution
OWASP Agent Memory Guard (AMG) is an open-source Python library that wraps any memory store as a transparent security layer:
pip install agent-memory-guard- Scans every memory write for prompt injection, PII leakage, and tampering
- 92.5% detection rate on AgentThreatBench
- <5ms latency per scan
Links
- GitHub: https://github.com/OWASP/www-project-agent-memory-guard
- PyPI: https://pypi.org/project/agent-memory-guard/
- Benchmark: https://pypi.org/project/agent-threat-bench/
Would the Semantic Kernel team consider integrating AMG as a security layer for agent memory? Happy to contribute a PR.
Contributor 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.
Research direction
The issue names no Semantic Kernel files or tests. Start by reviewing the ChatHistory, VolatileMemoryStore, and custom memory-store integration points, then examine the linked agent-memory-guard package. Done means an agreed integration scope with validation criteria, or a clearly scoped implementation path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, python
- Domain
- ai, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100