Skip to content
Garak

Garak

NEW
Category: AI Security
License: Free (Open-Source)
Suphi Cankurt
Suphi Cankurt
AppSec Enthusiast
Updated February 7, 2026
4 min read
Key Takeaways
  • Garak is NVIDIA's open-source LLM vulnerability scanner with 50+ probe modules for prompt injection, jailbreaks, and hallucinations.
  • Supports 23 generator backends including OpenAI, Anthropic, Hugging Face, and local models via a plugin architecture.
  • 28 detector types evaluate model responses for data leakage, toxicity, and policy violations with JSONL and HTML reporting.
  • Open-source under Apache 2.0 with 6.9k GitHub stars, installable via pip with a CLI-first workflow.

Garak is an open-source LLM vulnerability scanner from NVIDIA’s AI Red Team, listed in the AI security category. It has 6,938 GitHub stars, 777 forks, and 71 contributors.

Garak encoding probe results showing pass/fail rates across different encoding attacks on GPT-3

The name comes from the Star Trek character — fitting for a tool described as “the LLM vulnerability scanner” in the same way nmap scans networks or Metasploit tests exploits. NVIDIA released it under Apache 2.0 and actively maintains it with 3,500+ commits. The latest release is v0.14.0 (February 2026), which introduced redesigned HTML reports and JSON config support.

What is Garak?

Garak systematically probes language models for security weaknesses and safety failures. You point it at a model endpoint, pick which probe modules to run, and it generates adversarial inputs, feeds them to the model, and analyzes responses using detector modules.

Everything in Garak is a plugin. Probes generate test inputs. Detectors analyze responses. Generators interface with target LLMs. Evaluators compile results. Harnesses structure test workflows. Buffs modify probe behavior. Because of this modular design, you can test any model accessible via API.

50+ Probe Modules
Covers prompt injection, DAN jailbreaks, encoding bypasses, data leakage, package hallucination, malware generation, toxicity, XSS, and more.
23 Generator Backends
Connects to OpenAI, Hugging Face, AWS Bedrock, Cohere, Groq, LiteLLM, Mistral, NIM, Ollama, Replicate, and custom REST endpoints.
Plugin Architecture
Extensible system of probes, detectors, generators, evaluators, harnesses, and buffs. Write custom modules for domain-specific testing.

Key Features

FeatureDetails
Probe Modules50+ (promptinject, dan, encoding, goodside, lmrc, malwaregen, packagehallucination, leakreplay, snowball, tap, visual_jailbreak, xss, and more)
Detector Types28 built-in
Generator Backends23 (openai, huggingface, azure, bedrock, cohere, groq, litellm, mistral, nim, nvcf, ollama, replicate, rest, watsonx, and more)
Output FormatsJSONL reports, HTML reports (redesigned in v0.14.0), hit logs, debug logs
Python Support3.10 to 3.12
LicenseApache 2.0
Academic PaperarXiv:2406.11036
CommunityDiscord server, 71 contributors

Probe categories

Garak ships with probes organized by attack type:

ProbeWhat It Tests
promptinjectPrompt injection techniques to override system instructions
dan“Do Anything Now” jailbreak variants
encodingEncoding-based bypasses (base64, ROT-13, etc.)
goodsideSafe content verification
knownbadsignaturesKnown harmful patterns
lmrcLanguage Model Risk Cards
malwaregenMalware generation attempts
packagehallucinationFake package name suggestions
leakreplayTraining data extraction
snowballEscalating harmful requests
tapTree of Attack with Pruning
visual_jailbreakVisual encoding jailbreaks
xssCross-site scripting via LLM output
atkgenAutomated attack generation
continuationContinuation-based attacks
divergenceModel divergence probing
grandmaSocial engineering via roleplay
latentinjectionLatent prompt injection

Garak scan results showing encoding attack probe results against ChatGPT

Generator backends

Garak supports 23 different ways to connect to target models. The major backends include:

  • OpenAI — GPT models via API (chat and completion)
  • Hugging Face — Pipeline and Inference APIs for hosted models
  • AWS Bedrock — Claude, Llama, Titan, and other Bedrock models
  • Cohere — Cohere Command models
  • Groq — Fast inference endpoints
  • LiteLLM — Unified interface to 100+ providers
  • Ollama — Local models
  • Replicate — Hosted open-source models
  • REST — Custom API endpoints
  • NIM/NVCF — NVIDIA inference endpoints

Output and reporting

Garak generates three types of output per scan:

  • garak.log — Debug information, persists across runs
  • JSONL report — Detailed per-attempt records with status tracking
  • Hit log — Vulnerability findings only

Version 0.14.0 added redesigned HTML reports for easier reading.

Named after a Star Trek character
Garak is named after Elim Garak from Star Trek: Deep Space Nine — a character known for asking probing questions and uncovering hidden truths. The parallel to LLM probing is intentional.

Getting Started

1
Install Garak — Run python -m pip install -U garak. Requires Python 3.10 to 3.12. For development, clone the repo and install in editable mode.
2
Set API keys — Export your target model’s API key. For OpenAI: export OPENAI_API_KEY="sk-...". For Hugging Face: export HF_TOKEN="hf_...".
3
Run your first scan — Use the CLI to probe a model: python3 -m garak --target_type openai --target_name gpt-5-nano --probes encoding.
4
Review results — Check the generated JSONL report and HTML report. Use garak --list_probes to see all available probe modules.

CLI usage

The CLI is the primary interface. These examples are from the official README:

# List all available probes
garak --list_probes

# Probe an OpenAI model for encoding-based attacks
export OPENAI_API_KEY="sk-123XXXXXXXXXXXX"
python3 -m garak --target_type openai --target_name gpt-5-nano --probes encoding

# Test a Hugging Face model against DAN 11.0 jailbreak
python3 -m garak --target_type huggingface --target_name gpt2 --probes dan.Dan_11_0

# Run specific probes against GPT-4
garak --model_type openai --model_name gpt-4 --probes promptinject

Installation from source

For development or the latest features:

conda create --name garak "python>=3.10,<=3.12"
conda activate garak
gh repo clone NVIDIA/garak
cd garak
python -m pip install -e .

Or install directly from the main branch:

python -m pip install -U git+https://github.com/NVIDIA/garak.git@main

When to use Garak

Garak is the right tool when you need a dedicated vulnerability scanner with a wide library of attack probes. Its 50+ probe modules cover more attack techniques than most alternatives, and the plugin architecture lets you extend it with custom probes for your specific threat model.

The CLI-first design makes it easy to drop into existing workflows. Point it at any model endpoint, run a scan, and get a structured report.

Security teams use it for red team assessments of LLM deployments and pre-deployment security checks. The CLI output is also easy to pipe into monitoring dashboards for ongoing scans.

Best for
Security teams running adversarial assessments against LLM endpoints who need a wide probe library and support for many model providers.

For a broader overview of AI threats and defenses, see our AI security guide. For a Python-native framework with structured vulnerability categories and OWASP mapping, see DeepTeam. For an evaluation framework that combines prompt testing with red teaming, look at Promptfoo. For Microsoft’s multi-turn red teaming orchestrator, check PyRIT. For runtime guardrails rather than testing, consider NeMo Guardrails or LLM Guard.

Frequently Asked Questions

What is Garak and what does it test?
Garak is an open-source vulnerability scanner built by NVIDIA’s AI Red Team for probing large language models. It tests for prompt injection, jailbreaks, data leakage, hallucination, toxicity, and more using 50+ probe modules. It has 6.9k GitHub stars and 71 contributors.
Is Garak free to use?
Yes. Garak is free and open-source under Apache 2.0. It runs locally and works with any LLM that exposes an API — OpenAI, Hugging Face, AWS Bedrock, Cohere, Groq, Ollama, and custom REST endpoints. There are no paid tiers.
How does Garak compare to Promptfoo?
Garak is a dedicated vulnerability scanner with 50+ probe modules focused on adversarial security testing. Promptfoo is an evaluation framework that includes red teaming as one capability alongside prompt testing and model comparison. Garak goes deeper on attack techniques; Promptfoo covers a broader testing surface.
What types of vulnerabilities can Garak detect?
Garak tests for prompt injection, jailbreak susceptibility, training data extraction, package hallucination, toxic content generation, encoding-based bypasses, malware generation attempts, and cross-site scripting via LLM outputs. You can also write custom probes.