agentleFS
kaandgnshkaandgnsh/Claude-Blue/skills/ai-security/rag-security-review/SKILL.md

rag-security-review

Skill0 starsChanged 13 days agoMITView on GitHub

Review retrieval-augmented generation (RAG) systems — document-level access control at retrieval time, ingestion pipeline trust (poisoned or injected documents), vector store security and tenant isolation, embedding inversion/leakage, citation integrity, and logging. Use when building or assessing enterprise search copilots, chat-with-your-docs features, or vector databases (OWASP LLM08:2025).

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Test (authorized test users): user without access to doc X asks questions only X can answer — expect refusal/no citation.

    line 30
  2. Distinctive:

    Check vector DB security: authentication, network exposure, encryption, admin access, backups.

    line 31
  3. Distinctive:

    Verify citations link to source with the user's own access.

    line 32

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

RAG Security Review

Key risks

RiskDescriptionControl
Permission bypassRetriever returns chunks the user can't access in the source systemEnforce source ACLs at query time (filter by user/group IDs synced from source; re-check on read), not only at ingestion
Over-sharing amplificationRAG surfaces content that was technically shared too broadly ("everyone" links)Fix source permissions; sensitivity-label-aware retrieval; exclude restricted labels
Indirect prompt injectionMalicious instructions inside indexed docsprompt-injection-review; restrict who can write to indexed sources; content provenance in prompts
Data poisoningAttacker inserts false info to steer answersSource allow-lists, ingestion review for external sources, provenance and citations
Cross-tenant leakageShared vector index without tenant filterSeparate indexes/namespaces per tenant or mandatory tenant filter enforced server-side
Embedding leakageEmbeddings can be partially inverted to recover textTreat vectors as sensitive as the source text; encrypt, restrict access
Stale/deleted dataDeleted source documents remain in the indexDeletion propagation, re-index schedules, retention
Logging exposurePrompts/answers containing sensitive data stored widelyRestricted logs, retention, redaction (telemetry-minimization)

Review steps

  1. Diagram ingestion → chunking → embedding → vector store → retrieval → prompt assembly → LLM → output.
  2. For each source: who can write, how ACLs are captured, sync frequency, deletion handling.
  3. Test (authorized test users): user without access to doc X asks questions only X can answer — expect refusal/no citation.
  4. Check vector DB security: authentication, network exposure, encryption, admin access, backups.
  5. Verify citations link to source with the user's own access.

Output

Source | Write access | ACL enforcement point | Tenant isolation | Injection exposure | Findings | Fix

Related skills

prompt-injection-review, data-classification, llm-gateway-controls, trust-boundary-analysis

References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.