SuperAPIAI Directory

garak

github.com · AI security

garak is a free and open-source LLM vulnerability scanning tool developed by NVIDIA, with the full name Generative AI Red-teaming & Assessment Kit. It is used to check whether LLM-based applications may fail in unintended ways, covering more than 190 probes such as hallucination, data leakage, prompt injection, misinformation, toxicity generation, and jailbreaks. garak supports everything from bare models to complete applications with guardrails and tools, combining static, dynamic, and adaptive probing methods. It runs via the command line, supports Linux, macOS, and Windows, and can connect to local models (Hugging Face, Ollama, llama.cpp), model APIs (OpenAI, Anthropic, Azure OpenAI, AWS Bedrock, etc.), frameworks (LiteLLM, LangChain, NeMo Guardrails, etc.), as well as REST/WebSocket endpoints.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsmacOS · Linux

About this tool

garak is a free and open-source LLM vulnerability scanning tool maintained by NVIDIA, with the full name Generative AI Red-teaming & Assessment Kit. Its core purpose is to check whether applications of generative AI can fail in ways developers do not intend, similar to nm or Metasploit Framework in the security field, but aimed at generative AI.

In terms of capabilities, garak includes more than 190 probes and continues to add more, covering various weaknesses such as hallucination, data leakage, prompt injection, misinformation, toxicity generation, and jailbreaks. It combines static, dynamic, and adaptive probing methods and can assess everything from bare models to complete applications with guardrails and tools. garak consists of several types of plugins: generators connect to the system under test; probes send prompts intended to trigger failures; detectors determine whether each response exhibits the failure the probe is looking for; buffs modify prompts before sending (such as encoding, rewriting, or translation); harnesses run combinations of probes and detectors; evaluators score the results.

In terms of usage, garak is a command-line tool. The standard installation can be obtained from PyPI via pip, or the source can be cloned from GitHub or a development version installed. The basic syntax is garak <options>, and you need to specify the target type (--target_type) and optionally the model or endpoint name (--target_name). By default, all active probes are run against the target, and specific probe modules or plugins can also be specified via --spec, for example --spec probes.promptinject or --spec probes.lmrc.SlurUsage. It supports running probes by tag (such as --spec tag:owasp:llm01) and grouping results by taxonomy (such as --taxonomy owasp). During a run, it generates a garak.log log, a run in JSONL format, and a hit log recording vulnerability hits.

Applicable scenarios include: security assessment and red teaming for local models (Hugging Face, Ollama, llama.cpp gguf models), commercial model APIs (OpenAI and compatible APIs, Anthropic, Azure OpenAI, AWS Bedrock, Cohere, Groq, Mistral, NVIDIA NIM, IBM watsonx, Replicate), frameworks (LiteLLM, LangChain, NeMo Guardrails, Rasa, llm), and agents and applications (REST and WebSocket endpoints, LangChain Serve, Python functions).

In terms of limitations, the material does not provide specific information such as performance metrics, scan duration, or false positive rates. garak requires users to configure the target environment and necessary API keys themselves (set via environment variables). Some generators may require additional dependencies or specific runtime environments. The tool itself does not provide a graphical interface and is operated entirely via the command line.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools