rag-security

Audit RAG systems for ingestion poisoning, retrieval boundary failures, and metadata weaknesses.

4|Updated Apr 27, 2026
One-click install
npx skills add https://github.com/maruakshay/mii-ai-security --skill rag-security
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rag-security
Source: https://github.com/maruakshay/mii-ai-security/tree/main/skills/rag-security
Command: npx skills add https://github.com/maruakshay/mii-ai-security --skill rag-security

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

In a retrieval augmented generation (RAG) system, untrusted documents and weak metadata handling create surfaces for ingestion poisoning, cross-tenant leakage, and hallucinated grounding that misleads users.

Core Features & Use Cases

  • Detect and mitigate ingestion poisoning, ensure chunk provenance, and validate metadata to keep retrieved context trustworthy.
  • Enforce retrieval boundaries with server-side filters, provenance persistence, and robust citation verification across multi-tenant deployments.
  • Provide a repeatable review workflow with guardrails, checklists, and recommended quick wins to harden RAG pipelines in codebases and design patterns.

Quick Start

Apply the RAG security review to your codebase to identify ingestion poisoning, boundary violations, and metadata handling weaknesses.

Frequently Asked Questions about rag-security

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent cross-tenant data leakage in a multi-tenant RAG system?

Prevent cross-tenant data leakage in multi-tenant RAG systems by enforcing server-side retrieval boundary filters and provenance persistence. This stops unauthorized context retrieval across tenants and keeps document trust intact.

What is ingestion poisoning in retrieval augmented generation pipelines?

Ingestion poisoning in retrieval augmented generation occurs when untrusted documents introduce malicious or misleading content into the knowledge base. Auditing chunk provenance and validating metadata keeps retrieved context trustworthy and prevents hallucinated grounding.

How do I verify citations in RAG outputs to prevent hallucinated grounding?

Verify RAG citations by applying structured citation verification and provenance tracking. This enforces document trust and ensures generated responses accurately reference their original retrieved chunks.

Can I audit my existing RAG codebase for retrieval boundary failures?

Yes, you can audit existing RAG codebases for retrieval boundary failures and metadata handling weaknesses. A repeatable review workflow identifies ingestion poisoning risks and provides guardrails, checklists, and quick wins to harden pipelines.

What's the best way to secure document metadata handling in cross-context RAG deployments?

Secure document metadata handling in cross-context RAG deployments by enforcing server-side controls and provenance persistence. This prevents stale-context exposure and document trust confusion by validating metadata throughout the retrieval pipeline.