rag-security-reviewer
Installation
SKILL.md
RAG Security Reviewer
RAG security is non-negotiable. Most production breaches in RAG systems trace to filtering applied after retrieval or trusting retrieved content as if it were system input. Both are preventable.
The first principle
The LLM is not a security boundary. Access control must be enforced at the retrieval layer.
If unauthorized content reaches the LLM, you have already lost — regardless of what the prompt says.
The five required controls
1. Pre-filter, never post-filter
| Mode | Safe? |
|---|---|
| Pre-filtered ANN (native filtered search) | ✅ Documents user can't see are never considered |
| Post-filter on top-k | ❌ ANN saw unauthorized docs; one filter bug = leak |
| Brute-force filtered | ✅ Safe but slow |