rag-security
Skill20 starsChanged 4 months agoMITView on GitHub
Detects RAG pipelines that ingest external documents into LLM context without
1 other project uses a version of this.
Adopted by
Most recently taken up by
- GoldenWing-360/claude-security-skillstheir own version, first seen May 12, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- GoldenWing-360/claude-security-skills★ 19same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository52 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- authentication-failuresSkill
- broken-access-controlSkill
- concurrency-correctnessSkill
- contract-reviewSkill
- cryptographic-failuresSkill
- crypto-library-misuseSkill
- csrfSkill
- exceptional-conditionsSkill
- excessive-agencySkill
- file-uploadSkill
- graphql-securitySkill
- hardcoded-secretsSkill
- header-injectionSkill
- hotspotsSkill
- injectionSkill
- insecure-designSkill
- insecure-local-storageSkill
- insecure-output-handlingSkill
- insecure-plugin-designSkill
- integrity-failuresSkill
- ipc-securitySkill
- llm-supply-chainSkill
- logging-failuresSkill
- mass-assignmentSkill
- mcp-securitySkill
- memory-api-misuseSkill
- model-dosSkill
- model-theftSkill
- multi-agent-trustSkill
- nosql-injectionSkill
- numeric-trust-boundarySkill
- oauth-implementationSkill
- open-redirectSkill
- overrelianceSkill
- path-traversalSkill
- privilege-handlingSkill
- prompt-injectionSkill
- prototype-pollutionSkill
- pr-reviewSkill
- race-conditionSkill
- redosSkill
- security-cleanupSkill
- security-misconfigurationSkill
- security-reviewSkill
- sensitive-disclosureSkill
- ssrfSkill
- supply-chainSkill
- threat-modelSkill
- token-smugglingSkill
- training-data-poisoningSkill
- unsafe-api-consumptionSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
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
- Distinctive: line 22
No length or token cap on retrieved content, allowing one document to consume the entire context window.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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.
Files
RAG Pipeline Security (OWASP LLM01:2025)
What this checks
Prevents prompt injection through retrieved documents and uncontrolled content flooding into LLM context. Attacker-controlled documents can override system instructions, exfiltrate data, or manipulate model behavior when injected without guardrails.
Vulnerable patterns
- Retrieved document concatenated into the system prompt — retrieved content can override developer instructions.
- HTTP fetch of a caller-supplied or document-supplied URL with no domain allowlist — SSRF surface and attacker-controlled content into context.
- No length or token cap on retrieved content, allowing one document to consume the entire context window.
- Retrieved content mixed into the prompt with no delimiter or trust label distinguishing it from developer instructions.
Fix immediately
Flag the vulnerable code and explain the risk. Then suggest a fix that establishes these properties. Translate each property into the audited file's language, HTTP client, and LLM API — use the documented secure primitives of that stack.
- Retrieval sources are validated against a domain allowlist before fetch.
Arbitrary URLs from user input or from another document's links lead to SSRF
and to attacker-controlled documents landing in the context; the allowlist
is the same property enforced by the
ssrfskill for outbound HTTP. - Retrieved content is truncated to a fixed character or token cap before injection into the prompt. Unbounded retrieval lets a single document eat the context window — either denial of service or a vehicle for flooding instructions.
- Retrieved content is wrapped in explicit delimiters that label it as
untrusted data, and lives in the user role — never concatenated into the
system prompt. The model is more likely to treat it as data rather than
instructions when the framing is structural. See the
prompt-injectionskill for the trust-tier pattern. - Every retrieval is logged with source URL and content length — useful for incident response and for detecting poisoning attempts (sudden spikes in retrieved size or novel sources).
Verification
Confirm the response:
- Retrieved URLs validated against an explicit domain allowlist
- Content truncated to a fixed character or token limit before injection
- Retrieved content wrapped in clear delimiters that mark it as untrusted
- Every retrieval logged with source URL and content length
References
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
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.

