Python: [Feature Request] Memory Poisoning Protection for Semantic Kernel via OWASP Agent Memory Guard

Open
#14,047 5 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Quiet
Tech stack
csharp, python
Domain
ai, security

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.

Description

python triage

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

Would the Semantic Kernel team consider integrating AMG as a security layer for agent memory? Happy to contribute a PR.

Dominant language
C#
Stars
28.8k
Forks
4.9k
Avg merge
2d 17h
Merged PRs (30d)
48

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/semantic-kernel

All issues in microsoft/semantic-kernel

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.