garak
$ garak Official High Riskgarak (Generative AI Red-teaming & Assessment Kit) is NVIDIA's open-source security scanner for LLMs, often described as nmap for language models. It probes target endpoints for prompt injection, jailbreaks, hallucination, and data leakage while writing detailed JSONL reports to disk.
pip install garak garak fires large batches of adversarial probes and logs JSONL attack transcripts locally, making CLI execution far more practical than MCP.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Runs headlessly and outputs JSONL report artifacts (--report_prefix), though stdout uses progress bars and flags are shifting from --model_type to --target_type / --spec.
- Writes structured
.report.jsonlartifacts via--report_prefix - CLI flag transition (
--model_type/--probesvs--target_type/--spec)
High-impact red-teaming tool that actively sends adversarial prompts to targets; lacks a --dry-run probe preview and can trigger rate limits or safety alerts.
- Sends live adversarial payloads to target endpoints
- No
--dry-runmode to preview probe prompt counts before firing
Installable via pip install garak, though probe detectors pull NLP/PyTorch dependencies.
- PyPI package with heavy ML detector dependencies
Comprehensive catalog of LLM red-teaming probes, detectors, and buff generators in a single tool.
- Supports
promptinject,dan, encoding bypasses, and custom probes
Official NVIDIA project (NVIDIA/garak) under Apache-2.0 with active security research releases.
- Official
NVIDIA/garakrepository under Apache-2.0
Detailed docs at docs.garak.ai and --list_probes / --list_detectors introspection flags.
- Built-in
--list_probesand docs.garak.ai reference
Security, Auth & Guardrails
Reads generator/target API keys from provider env vars (OPENAI_API_KEY, HF_TOKEN, NIM_API_KEY, etc.) or YAML config files (--config).
Apache-2.0 open-source CLI; adversarial probing sends many prompts and incurs target model API token or compute costs.
# garak CLI Agent Rules - NEVER run `garak` against production endpoints or third-party systems without explicit authorization. - Always scope scans with `--probes <specific_probe>` (or `--spec`) instead of running all probes. - Set `--report_prefix` to keep generated JSONL attack logs inside a dedicated directory.
Agent-Ready Command Recipes
Safe Read-Only Queries
garak --list_probes
Lists installed probe modules (e.g., promptinject, dan, leakreplay) without sending requests.
Controlled Writes & Previews
garak --target_type openai --target_name gpt-4o-mini --probes promptinject --report_prefix ./garak_scan
Executes only the promptinject probe suite and writes JSONL/HTML reports under ./garak_scan.
Strengths for Agents
- + Built-in
--list_probesand.report.jsonloutput support automated vulnerability auditing. - + Covers dozens of real-world LLM attack vectors including prompt injection, jailbreaks, and training-data leaks.
Caveats & Pitfalls
- ! Active probing against unauthorized or production endpoints can trigger abuse/WAF blocks and substantial token spend.
- ! Recent versions deprecated
--model_type/--model_namein favor of--target_type/--target_name/--spec.