garak
v0.16.0 open-sourcethe LLM vulnerability scanner
python -m garak --target_type anthropic --target_name claude-3-5-haiku-20241022 --probes encoding
Summary
garak is an open-source, free command-line scanner that probes large language models for weaknesses such as hallucination, prompt injection, jailbreaks, toxicity generation, and data leakage, combining static, dynamic, and adaptive probes to make a target model fail in specific, catalogued ways. It's aimed at red teamers and AI security practitioners assessing a model or chat system before or after deployment, rather than at application developers debugging normal behaviour. Its README compares it to nmap or Metasploit, but for LLMs instead of networks and hosts. Configuration and results follow a defined structure, with a unified spec syntax for selecting probes and buffs and a `report.jsonl` output for downstream analysis. First committed in 2023, garak now has 128 contributors and over a thousand commits in the past year, with a release just 17 days ago, indicating active, ongoing development.
the LLM vulnerability scanner
What garak answers
Can I target a model I built or host myself?
supports custom probe and detector plugins, so an in-house model or a bespoke failure check can be scanned the same way as a supported provider
How do I know which specific weakness a failure maps to?
each probe now carries technique and intent annotations, and reports include a matrix linking results to named, described attack techniques rather than a bare pass/fail
Will an existing config or report parser keep working after I upgrade?
the selection syntax and output structure have changed recently enough that old top-level selection keys and old report fields break, so pinned configs and downstream parsers need updating
Do I need to write custom string-matching logic to catch obfuscated attacks?
detectors normalise Unicode and are hardened against domain and extension evasion, catching attacks that vary character representation rather than requiring bespoke matching rules
Examples
Command line
No option matches that search.
| option | found in | since | description |
|---|
No option matches that search.
Values are placeholders taken from each option’s declared default. Nothing is executed here — the output shown is a recording of a run that already happened.
Release history
- v0.16.0
garak v0.16.0 adds intent/technique-aware scanning, a native Anthropic generator, and an adaptive attacks probe
└──▷ GET THIS VERSION$ git clone --branch v0.16.0 https://github.com/NVIDIA/garak.git # already have the repo? check out this version: $ git checkout v0.16.0
└──▷ TRY ITScan an Anthropic Claude model directly using the new native Anthropic generator.$ python -m garak --target_type anthropic --target_name claude-3-5-haiku-20241022 --probes encoding
- ›Adds a unified
run.specselection grammar that combines probe, buff, and intent selection into a single specification, replacing separateprobe_specandbuff_specconfig keys. - ›Introduces
IntentProbe— a new probe base class enabling context-aware scanning that maps attack techniques to intents and automatically selects detectors based on intent mappings. - ›Adds
probe_summaryentries and an enrichedtechnique_intent_matrix(with names and descriptions) toreport.jsonloutput, providing a new facet of per-probe and cross-technique/intent reporting. - ›Adds a native Anthropic generator plugin, enabling direct scanning of Anthropic Claude models without going through a compatibility shim.
- ›Adds
suppressed_paramssupport to theBedrockGenerator, allowing callers to exclude specific inference parameters from AWS Bedrock requests.
+2 moreshow less
- ›Adds Unicode normalisation to
StringDetectorto improve detection consistency across text encodings. - ›Hardens
web_injectionmarkdown exfiltration detectors against domain, extension, and parameter evasion.
└──▷ BREAKING ON UPGRADE- !
probe_specandbuff_specconfiguration keys move into therundefinition as part of the new unified spec; existing config files using top-levelprobe_specorbuff_specwill break. - !CLI plugin selection options for probes and buffs are now deprecated (backwards-compatible aliases remain, but dependence on the old forms should be migrated).
- !
report.jsonloutput structure changes: newprobe_summaryentry type added,digestformat expanded, and olderdigestvalues tied to the removed*_specconfiguration keys are no longer emitted.
- ›Adds a unified