garak — LLM Vulnerability Scanner
NVIDIA's open-source LLM vulnerability scanner that probes language models for prompt injection, jailbreaks, hallucinations, and more.
garak — LLM Vulnerability Scanner
garak (Generative AI Red-teaming & Assessment Kit) is NVIDIA's open-source security evaluation framework for large language models. It systematically probes LLMs for a wide catalogue of weaknesses — prompt injection, jailbreaks, toxic content generation, hallucinations, data leakage, encoding exploits, and more — making it the de-facto starting point for any AI red-team engagement.
Key Features
- 100+ built-in probes covering OWASP LLM Top-10 and beyond
- Pluggable generator backends: OpenAI, HuggingFace, Ollama, REST, and local models
- HTML + JSONL report output for audit trails
- Extensible probe / detector / harness architecture
- CI-ready — exit codes reflect pass/fail thresholds
Quick Start
pip install garak
# Scan an OpenAI model for prompt-injection
garak --model_type openai --model_name gpt-4o --probes promptinject
# Full vulnerability sweep
garak --model_type huggingface --model_name meta-llama/Llama-3-8B --probes all
npx ai-supply add garak-llm-vulnerability-scanner
Curated mirror of the open-source garak (Apache-2.0). Get it from the source.
Compromise signals — malicious or tampered code (leaked secrets, backdoors, a dropped executable) — reduce the score, and known dependency CVEs carry a bounded penalty (they warrant review but never QUARANTINE — update the dependency to clear). Other dangerous-by-capability traits are risk surface, expected for some capabilities. Every finding is mapped to its OWASP control below.
Findings mapped to the OWASP Top 10 for LLM Applications (2025) and the OWASP Machine Learning Security Top 10. Expand any flagged control for the exact findings — compromise reduces the score; expected/risk-surface do not, except a known CVE, which carries a small bounded penalty (high/critical → Review).
The same gate an agent runs before installing (POST /api/v1/trust/garak-llm-vulnerability-scanner/check). Click a policy:
Consume garak — LLM Vulnerability Scanner programmatically. Authenticate with an API key or session — see Authorize an agent.
# Agents: CHECK BEFORE YOU INSTALL (no auth) — score, grade, level, capability manifest
curl https://ai-supply.store/api/v1/trust/garak-llm-vulnerability-scanner
# Gate against your org policy (returns { pass, violations })
curl -X POST https://ai-supply.store/api/v1/trust/garak-llm-vulnerability-scanner/check \
-H "Content-Type: application/json" \
-d '{"minGrade":"B","denyPermissions":["shell"],"denyUnknownEgress":true}'
# CLI
npx ai-supply add garak-llm-vulnerability-scanner
# REST (install → download)
curl -X POST https://ai-supply.store/api/v1/listings/garak-llm-vulnerability-scanner/install \
-H "Authorization: Bearer $AIM_KEY"
# MCP tool
install_listing({ "slug": "garak-llm-vulnerability-scanner" })OpenAPI spec →Curated mirror — latest upstream source. See the repository for tagged releases.