Garak

What It Is

Garak is an open-source LLM vulnerability scanner. It automates probing models for known vulnerability categories — jailbreaks, prompt injection, data leakage, toxicity, and more.

Repository: github.com/NVIDIA/garak

Installation

pip install garak

Basic Usage

# Scan a local Ollama model
garak --model_type ollama --model_name llama3

# Scan OpenAI
garak --model_type openai --model_name gpt-4

# Run specific probes
garak --model_type ollama --model_name llama3 --probes encoding.InjectBase64

# List available probes
garak --list_probes

Key Probe Categories

ProbeWhat It Tests
danDAN (Do Anything Now) jailbreak variants
encodingBase64, ROT13, and other encoding bypasses
glitchToken-level adversarial inputs
knownbadsignaturesKnown malicious prompt patterns
lmrcLanguage Model Risk Cards checks
misleadingHallucination and misinformation
packagehallucinationHallucinated package names (supply chain risk)
promptinjectPrompt injection techniques
realtoxicitypromptsToxicity evaluation
snowballEscalating complexity probes
xssCross-site scripting via model output

Output

Garak produces structured reports showing which probes succeeded, failure rates, and specific responses. Export to JSON for integration with other tools.