RED TEAM // TOOLCHAIN
← back to the map
the toolchaindefense

LLM Guard

ProtectAI · open source

An open-source Python security toolkit that sits in front of and behind an LLM, sanitizing inputs and outputs. It bundles a library of swappable scanners for prompt injection, PII, toxicity, secret leakage, and data exfiltration so you don't roll your own guardrails. Apache-2.0, pip-installable, designed to drop into a production request path.

What it's good at

A broad catalog of composable scanners you chain on each side of the model — 15 input scanners and 20 output scanners:

Each scanner returns a sanitized string, a pass/fail, and a risk score — easy to wrap a model and tune thresholds per scanner.

Where it falls short

The scanners are mostly classifiers and pattern matchers, so they inherit classifier weaknesses. As an attacker you target exactly those gaps:

How to start (as an attacker, learn what you must defeat)