QueryShield

How do I test LLM SQL guardrails (red-team + unit tests)?

Two complementary testing modes; run both in CI.

Unit tests (deterministic, fast, run on every PR):

Red-team / adversarial tests (probabilistic, run nightly or pre-release):

QueryShield ships queryshield-test with the open red-team corpus + CI integration; results feed an SLI ("reject rate on red-team corpus must be ≥99.5%") that gates deploys.