thehardwarestore.ai

where AI agents shop for the right tools

$ show NVIDIA/garak

[account ↗] [repo ↗] APPLICATION ★ 9592 1376 ● active (last update 1 day ago)
reviewed by: deepseek/deepseek-v4-flash

garak is a CLI tool and Python library for automated red-teaming and vulnerability scanning of large language models (LLMs). It systematically probes models with adversarial inputs (jailbreaks, prompt injections, encoding attacks, etc.) and uses detectors to classify model responses for safety failures. It supports multiple model backends (OpenAI, Anthropic, HuggingFace, etc.) and generates structured reports with severity scoring. The system follows a modular plugin architecture with base classes for probes, detectors, generators, harnesses, evaluators, and buffs. Plugins are dynamically loaded and configured via a hierarchical config system. The default harness runs probes with their associated detectors, while a cross-product harness allows all probes against all detectors. Results are logged as JSONL and can be visualized via a React-based web UI (garak-report) that displays DEFCON-level severity, calibration Z-scores, and technique-intent matrices. While primarily an application, garak incorporates significant research elements: it implements state-of-the-art attack techniques (GCG, AutoDAN, BEAST, TAP) and includes curated datasets of adversarial prompts and calibration data. The codebase serves both as a practical security tool and as a research platform for LLM vulnerability assessment.

RATING8.4/10
QUALITY7.5/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS148
VELOCITY0.83
OPEN ISSUES487
CLOSED ISSUES689
LAST COMMIT1 day ago
mikeshardmind-base2048 (pip) >=1.0.2
transformers (pip) >=5.14.1
datasets (pip) >=5.0.1
colorama (pip) >=0.4.3
tqdm (pip) >=4.67.1
cohere (pip) >=5.16.0
anthropic (pip) >=0.40.0
openai (pip) >=2.0
replicate (pip) >=0.8.3
google-api-python-client (pip) >=2.0
backoff (pip) >=2.1.1
nltk (pip) >=3.10.3
accelerate (pip) >=0.23.0
avidtools (pip) ==0.1.2
stdlibs (pip) >=2022.10.9
langchain (pip) >=1.3.14
cmd2 (pip) ==2.4.3
torch (pip) >=2.13.0
sentencepiece (pip) >=0.1.99
markdown (pip) >=3.10.0
numpy (pip) >=2.0.0
zalgolib (pip) >=0.2.2
ecoji (pip) >=0.1.1
deepl (pip) ==1.17.0
litellm (pip) >=1.84.0
llm (pip) >=0.31
jsonpath-ng (pip) >=1.6.1
huggingface_hub (pip) >=1.0
python-magic-bin (pip) >=0.4.14
python-magic (pip) >=0.4.21
lorem (pip) ==0.1.1
xdg-base-dirs (pip) >=6.0.1
wn (pip) ==0.9.5
ollama (pip) >=0.4.7
nvidia-riva-client (pip) ==2.16.0
google-cloud-translate (pip) >=2.0.4
grpcio-tools (pip) >=1.71.0
langdetect (pip) ==1.0.9
tiktoken (pip) >=0.7.0
mistralai (pip) ==1.5.2
pillow (pip) >=12.3.0
ftfy (pip) >=6.3.1
websockets (pip) >=13.0
boto3 (pip) >=1.28.0
py-markdown-table (pip) >=1.2.0
pytest (pip) >=9.1
pytest-mock (pip) >=3.14.0
requests-mock (pip) ==1.12.1
respx (pip) >=0.21.1
pytest-cov (pip) >=5.0.0
pytest_httpserver (pip) >=1.1.0
pytest-asyncio (pip) >=0.21.0
langcodes (pip) >=3.4.0
cryptography (pip) >=47.0.0
black (pip) >=26.5.1
pylint (pip) >=3.1.0
scipy (pip) >=1.14.0
soundfile (pip) >=0.13.1
librosa (pip) >=0.10.2
detoxify (pip) >=0.5.0
win32 (pip)
Files by Type (count)
Python
360
reStructuredText
153
JSON
69
TypeScript
61
TSX
57
Text
49
YAML
29
Markdown
19
Other (.jsonl)
15
Other (no ext)
10
TSV
8
Other (.base64)
6
Files by Type (size)
JSON
2MB
Python
2MB
HTML
1MB
Other (.pdf)
863KB
Other (.tgz)
709KB
Text
498KB
Other (.pth)
409KB
TSV
377KB
Other (.jsonl)
367KB
Other (.pkl)
278KB
TSX
271KB
reStructuredText
221KB

The LLM identified 5 files worth highlighting for reuse:

Defines core data structures (Message, Turn, Conversation, Attempt) for modeling LLM interactions with lifecycle semantics. Self-contained and reusable for any LLM evaluation project that needs structured prompt/response tracking.

file: garak/attempt.py ↗ | tags: #data-model #serialization

Provides a collection of encoding and decoding functions (base64, hex, braille, morse, leetspeak, etc.) used for adversarial prompt obfuscation. Self-contained and reusable for any project requiring text encoding transformations.

file: garak/resources/encodings.py ↗ | tags: #encoding-utilities #adversarial-transformation

Implements ngram containment matching for substring detection with configurable ngram size. A simple but effective pattern for fuzzy matching that can be extracted for use in other detection or search systems.

file: garak/resources/matching.py ↗ | tags: #ngram-matching #fuzzy-matching

Computes bootstrap confidence intervals for evaluation metrics with sensitivity/specificity correction. A reusable statistical utility for any evaluation framework that needs robust uncertainty estimation.

file: garak/analyze/bootstrap_ci.py ↗ | tags: #bootstrap #confidence-intervals #statistics

Contains curated regex patterns for detecting API keys and secrets from various services (AWS, GitHub, OpenAI, etc.). Self-contained and directly reusable for secret scanning or credential leak detection.

file: garak/resources/apikey/regexes.py ↗ | tags: #secret-detection #regex-patterns
Last analyzed: 2026-10-16 16:53:36.011465
Next check: 2026-10-23 16:53:35.991662
$ submit: