testing-rag-and-memory-poisoning

Solid

Test whether an attacker can plant content in the knowledge an AI agent later retrieves and trusts: a RAG index or vector store, an agent's persistent memory, or the search and web results it pulls at runtime. Covers poisoned documents that surface as authoritative context, memory entries that persist across sessions, retrieval-ranking abuse, and injected instructions that ride retrieved chunks. Use when reviewing a RAG pipeline, an agent with long-term memory, or any retrieval step feeding the model. The poison fires on an innocent query.

AI & Automation 4 stars 1 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 80/100

Stars 20%
23
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Testing RAG and memory poisoning: attacking the knowledge, not the prompt Prompt injection attacks the input at request time. Poisoning attacks the knowledge *before* the request, so the malicious content is already inside the trusted context when retrieval pulls it. Because retrieved chunks and remembered facts are treated as ground truth, a poisoned store is an injection that fires on a legitimate query, from a user who did nothing wrong. The trap is set once and sprung by the victim. ## When to use - You are reviewing a RAG pipeline, a vector store, or any retrieval-augmented assistant. - The agent has persistent or long-term memory written across sessions. - The agent queries live search or web results at runtime and treats them as context. ## Scope check Test stores and pipelines you own or are authorized to test. Use benign, marked content and canaries; never plant real malicious instructions in a shared store. If you can't name the authorization, stop. ## The loop 1. **Map every write path into retrievable knowledge.** List how content enters each store the agent reads: who can add documents to the corpus, who influences what the crawler or indexer ingests, what writes to the agent's memory (the agent itself, users, tool outputs), and which live sources it queries at runtime. Every writer is a potential poisoner. 2. **Check whether ingestion is authenticated and bounded.** Can an unprivileged or external party add or edit a document that wi...

Details

Author
UnboundCompute
Repository
UnboundCompute/security-agent-skills
Created
5 days ago
Last Updated
yesterday
Language
N/A
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category