microsoft / microsoft/semantic-kernel

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

Nobody has claimed this yet.

python triage
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

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

Contributor guide

Open the contributing guide

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.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.