Python: [Feature] Memory validation layer to protect against memory poisoning attacks (OWASP AMG integration)
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu bằng cách lần theo luồng bộ nhớ Python qua TextMemoryPlugin, SemanticTextMemory, connectors và các triển khai IMemoryStore. So sánh các cách tiếp cận middleware hoặc pipeline có thể cấu hình được đề xuất với đường dẫn persistence hiện có và tích hợp OWASP Agent Memory Guard. Được xem là hoàn thành khi một lớp validation tùy chọn có thể quét các entry trước khi persistence và chặn nội dung memory poisoning được phát hiện mà không ảnh hưởng đến các store chưa được cấu hình.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Scenario
Semantic Kernel's memory features (TextMemoryPlugin, VolatileMemoryStore, connectors) allow agents to store and retrieve information across interactions. However, there's currently no built-in validation to prevent memory poisoning attacks — where adversarial content gets stored in memory and alters agent behavior in subsequent sessions.
This is now a documented attack class: Memory Poisoning Attacks in LLM Agents (arxiv, June 2026)
Proposal
Add an optional memory validation layer that scans entries before they're persisted to any IMemoryStore implementation. This could be implemented as:
- A middleware/decorator pattern for IMemoryStore
- A configurable validation step in the memory pipeline
There's an existing open-source solution that already supports Semantic Kernel: OWASP Agent Memory Guard
What it detects:
- Prompt injection hidden in memory entries
- Instruction override attempts ("ignore previous instructions...")
- Persona/identity manipulation
- Cross-session persistence attacks
- Encoding-based obfuscation (base64, hex, rot13)
Integration example (Python SK):
from agent_memory_guard import MemoryGuard
from semantic_kernel.memory import SemanticTextMemory
guard = MemoryGuard()
# Validate before saving to memory
async def save_with_validation(memory: SemanticTextMemory, collection, text, id):
result = guard.scan(text)
if result.is_safe:
await memory.save_information(collection, text, id)
else:
raise MemoryPoisoningError(f"Blocked: {result.threat_type}")
Key details:
pip install agent-memory-guard- 98.7% detection rate, <2ms latency per validation
- OWASP Incubator project (Apache 2.0)
- Already has integrations for CrewAI, AutoGen, LangChain, and Semantic Kernel
Benefits
- Protects SK agents from having their behavior silently altered via poisoned memories
- Complements existing SK security practices
- Minimal performance impact (<2ms per memory operation)
- Could be opt-in via configuration
- Ngôn ngữ chính
- C#
- Star
- 28.6k
- Fork
- 4.8k
- Merge trung bình
- 13 giờ 24 phút
- Pull request đã merge (30 ngày)
- 11
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/semantic-kernel
-
python triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
microsoft/semantic-kernel#14491 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
python triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
microsoft/semantic-kernel#14490 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Python: [Python] structured_outputs_transform reuses ChatHistory across calls (prompt pollution)Đang mởpython triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
microsoft/semantic-kernel#14483 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
.NET python triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
microsoft/semantic-kernel#14482 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Python: [Python] as_agent_framework_tool drops parameter defaults (optionals become required)Đang mởpython triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
microsoft/semantic-kernel#14481 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của microsoft/semantic-kernel
Issue tương tự
-
WPF: each page's `Title` overwrites the window title, and returning to a page does not restore itĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
agentic-workflows area/Docs partner/agentic-workflows
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
jamesmontemagno/tiny-clips#378 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
go 🏃 testing 🧪
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
valkey-io/valkey-glide#7239 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
SubtitleEdit/subtitleedit#15462 ·
Maintainer thường phản hồi trong vòng 1 ngày