haystack-rag-security

Audits Haystack pipelines for router, document-store, and leakage security issues.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Haystack pipelines connect routers, retrievers, rankers, generators, and evaluators. When boundary decisions or grounding are weak, sensitive data can leak, or generated answers can be ungrounded. This Skill provides a structured review to enforce boundary validations and reduce leakage across components.

Core Features & Use Cases

  • Validate router scope decisions to enforce tenant and document-class constraints before routing.
  • Ensure grounding and provenance by verifying that generated responses are supported by retrieved documents.
  • Enforce fail-closed behavior and server-side document-store filters to prevent data leakage across stores or tenants.
  • Review evaluator components and debugging outputs for access control and possible data exposure.
  • Use Case: Auditing a multi-tenant Haystack deployment to ensure per-tenant data isolation and verifiable grounding.

Quick Start

Audit your Haystack pipeline to implement tenant-scoped routing, grounding verification, and provenance checks.

Frequently Asked Questions about haystack-rag-security

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

FAQPage Schema
How do I prevent data leakage in a multi-tenant Haystack RAG pipeline?

To prevent data leakage in a multi-tenant Haystack RAG pipeline, enforce tenant-scoped routing decisions and apply backend-enforced document-store filters. Implementing fail-closed behavior when retrieved documents have low confidence further isolates sensitive data across tenants.

How do I verify grounding and provenance for generated responses in Haystack?

Verify grounding and provenance in Haystack by applying post-generation checks that ensure generated responses are fully supported by retrieved documents. This structured review validates boundary decisions across retrieval, ranking, and generation stages to prevent ungrounded answers.

What is router scope failure in Haystack pipelines?

Router scope failure in Haystack pipelines occurs when boundary validations are weak, allowing routers to pass sensitive data across components without enforcing tenant or document-class constraints. Auditing these routers ensures data isolation before routing occurs.

Can I audit insecure document-store access in a Haystack deployment?

Yes, you can audit insecure document-store access in a Haystack deployment by enforcing server-side document-store filters. This review process prevents data leakage across stores and ensures per-tenant data isolation during retrieval.

Do I need fail-closed behavior when retrieved documents have low confidence?

Yes, implementing fail-closed behavior when retrieved documents have low confidence is required to prevent ungrounded generation. This ensures the pipeline safely restricts outputs rather than relying on insecure or irrelevant retrieved data.

How do I check Haystack evaluators for access control and data exposure?

Check Haystack evaluators for access control and data exposure by reviewing debugging outputs and evaluator components that access sensitive data across retrieval, ranking, and generation stages. This identifies possible data exposure within the pipeline.