Python: Feature request: Memory poisoning defense (OWASP ASI06) integration

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

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

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

評価

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

調査の方向性

まず、提案で言及されている ISemanticTextMemory アダプターと kernel memory パイプラインを確認し、次に Semantic Kernel が現在どのように永続メモリを処理しているかを調査します。統合をアダプター、ミドルウェアフック、ドキュメントによるガイダンス、またはそれらの組み合わせのどれにすべきかを判断し、メモリの検証、整合性チェック、ポリシー処理、ロールバックの完了基準を定義します。

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

説明

python triage

Summary

OWASP recently published the Top 10 for Agentic Applications, which includes ASI06: Memory Poisoning — a threat category specific to AI agents that persist memory across sessions.

As Semantic Kernel adds more persistent memory and agent loop capabilities, it would be valuable to have a built-in or recommended defense layer for this attack surface.

The threat

When an agent stores information in memory (conversation history, retrieved facts, tool outputs, scratchpads), a malicious actor can craft inputs that get stored as "trusted" memories. Those poisoned memories then influence the agent's future behavior — causing it to leak data, take unauthorized actions, or be persistently manipulated across sessions.

This is distinct from prompt injection (which targets user input at the front of the loop) — memory poisoning targets the memory store itself.

Proposed integration

The OWASP reference implementation for ASI06 is agent-memory-guard (MIT/Apache-2.0 licensed, pure Python, zero external dependencies):

pip install agent-memory-guard

It provides:

  • Runtime memory validation (prompt injection, secret leakage, protected-key tampering)
    • Cryptographic integrity verification (SHA-256 baselines)
      • Declarative YAML policy engine
        • Point-in-time snapshots and rollback
          • Drop-in middleware for common memory backends
            Suggested integration points for Semantic Kernel:
  1. A MemoryGuard-wrapped ISemanticTextMemory adapter
    1. Optional middleware hook in the kernel's memory pipeline
    1. Documentation guidance on memory security best practices per OWASP ASI06

References

主要言語
C#
スター
28.8k
フォーク
4.9k
平均マージ
2日 17時間
マージ済み PR(30日)
48

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

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

microsoft/semantic-kernel のほかの issue

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

似ている issue

C# の issue をもっと見る

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

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