Garak
LLM vulnerability scanner and red-teaming framework
WHAT IS IT?
Garak (Generative AI Red-teaming & Assessment Kit) is an open-source LLM vulnerability scanner developed by security researchers and hosted under NVIDIA's GitHub organization. It systematically probes language models and LLM-backed endpoints for security failure modes.
WHY USE IT? // PRACTICAL USE CASES
Deploying LLMs with access to internal APIs, databases, or browser rendering without testing for indirect prompt injection or XSS output rendering introduces severe application risk. Garak automates structured adversarial probing across local and remote models.
- [1] Auditing internal LLM applications for indirect prompt injection vulnerabilities
- [2] Testing RAG and agentic tool-use pipelines for unauthorized action triggers
- [3] Evaluating markdown/HTML output sanitization for XSS payload passthrough
- [4] Generating reproducible JSONL security evaluation reports across model versions
HOW DO I GET IT? // SAFE INSTALLATION GUIDANCE
Install in an isolated Python virtual environment (`python -m venv .venv && .venv/bin/pip install garak`) from PyPI or directly from `github.com/NVIDIA/garak`.
HOW DOES IT WORK? // INTERNAL ARCHITECTURE OVERVIEW
Garak orchestrates 'probes' (structured attack generators for injection, encoding bypass, package hallucination, XSS) against a 'generator' (local Ollama/llama.cpp, OpenAI-compatible API, HuggingFace) and evaluates responses with 'detectors' to produce pass/fail telemetry.