awesome-prompt-injection-defense

Awesome Prompt Injection Defense Awesome

A curated list of tools, papers, datasets, and resources for defending Large Language Models against prompt injection and indirect prompt injection attacks.

Prompt injection is the leading security risk in production LLM systems. The defense ecosystem is fragmented across academic preprints, vendor blogs, npm/PyPI utilities, and ad-hoc system prompts. This list is an attempt to bring it together in one place.

Contents

Detection libraries

Drop-in checks you call before passing untrusted text to an LLM.

RAG-specific guardrails

Prompt injection in RAG often hides inside retrieved documents (indirect injection) or poisoned vectors.

Evaluation datasets

Labeled corpora for benchmarking detectors.

Live demos

Try detectors in the browser.

GitHub Actions for CI

Plug into pull-request flows.

Research papers and preprints

Adjacent reliability tooling

Not strictly prompt-injection but commonly composed with it.

Background reading

Contributing

Send a pull request. Each entry should:

  1. Already exist (no vaporware or roadmaps).
  2. Be free or have a meaningful free tier.
  3. Have a one-line description of what makes it useful, not just a name.

Sort within each section alphabetically, except where the order is meaningful.

License

CC0

To the extent possible under law, the maintainer has waived all copyright and related rights to this list.