rag-exploitation

Identify vulnerabilities in Retrieval-Augmented Generation systems with Python tooling.

3|Updated Nov 18, 2025
One-click install
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-ai-red-teaming --skill rag-exploitation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rag-exploitation
Source: https://github.com/pluginagentmarketplace/custom-plugin-ai-red-teaming/tree/main/skills/rag-exploitation
Command: npx skills add https://github.com/pluginagentmarketplace/custom-plugin-ai-red-teaming --skill rag-exploitation

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

RAG exploitation tests help security teams identify and quantify vulnerabilities in Retrieval-Augmented Generation systems, focusing on knowledge bases, retrieval pipelines, and prompt handling to prevent unsafe outputs and data leakage.

Core Features & Use Cases

  • Threat modeling of RAG architectures to map attack surfaces including KB poisoning, retrieval manipulation, and context injection.
  • Practical testing with predefined attack scenarios to validate defenses, safeguards, and monitoring.
  • Use Case: A security engineer runs the RAG security suite against a live deployment to confirm prompt safety, access controls, and audit trails.

Quick Start

Run the included security test harness against your RAG deployment using the scripts and references in this Skill's directory. Review results and remediation recommendations in the generated reports.

Frequently Asked Questions about rag-exploitation

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

FAQPage Schema
How do I test my RAG system for prompt injection vulnerabilities?

A security team can identify and quantify RAG system vulnerabilities by applying tests across knowledge bases, retrieval pipelines, and prompt handling to prevent unsafe outputs and data leakage. Threat modeling maps attack surfaces including KB poisoning, retrieval manipulation, and context injection.

How do I test my RAG system for prompt injection vulnerabilities?

To test your RAG system for prompt injection vulnerabilities, apply predefined attack scenarios across knowledge bases, vector stores, and prompt handling to validate safeguards and prevent unsafe outputs. The testing harness executes simulated and production-like deployments to identify context injection flaws.

Can I run RAG security tests against a live production deployment?

Yes, you can run RAG exploitation tests against a live deployment to confirm prompt safety, access controls, and audit trails. The security test harness applies predefined attack scenarios to validate defenses, safeguards, and monitoring in production-like environments.

Do I need specific dependencies to run RAG vulnerability tests?

Running RAG exploitation tests requires standard Python tooling along with the included scripts, references, and assets to execute tests and generate actionable results. No external dependencies are required beyond the standard Python environment.

What is the best way to secure a retrieval pipeline against knowledge base poisoning?

The best way to secure a retrieval pipeline against knowledge base poisoning is threat modeling your RAG architecture to map attack surfaces, then applying practical testing with predefined attack scenarios to validate defenses, safeguards, and monitoring. This approach identifies and quantifies vulnerabilities effectively.

What limitations exist when testing retrieval manipulation in simulated environments?

Testing retrieval manipulation in simulated environments may not capture all production-like deployment variables affecting access controls and audit trails. The harness covers simulated and production-like states, but complex live integrations require validating prompt safety and monitoring directly.