Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Python: [Feature] Memory validation layer to protect against memory poisoning attacks (OWASP AMG integration)

オープン
#14,062 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
python
領域
ai, security

調査の方向性

まず、TextMemoryPlugin、SemanticTextMemory、connectors、および IMemoryStore の実装を通る Python メモリフローを追跡します。提案されている middleware または設定可能な pipeline のアプローチを、既存の永続化パスおよび OWASP Agent Memory Guard の統合と比較します。オプションの検証レイヤーが永続化前にエントリをスキャンし、検出された memory-poisoning コンテンツをブロックでき、未設定のストアに影響を与えない状態を完了とします。

索引モデルが issue の本文から書いたものです。

説明

python triage

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:

  1. A middleware/decorator pattern for IMemoryStore
  2. 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
主要言語
C#
スター
28.6k
フォーク
4.8k
平均マージ
13時間 24分
マージ済み PR(30日)
11

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/semantic-kernel のほかの issue

microsoft/semantic-kernel の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。