garakgarak
核验标记表示资料完整度,不是产品评分。下列未确认项可能影响选型;请按对应来源逐项确认。The confidence mark describes evidence completeness, not a product score. Unconfirmed items below may affect your choice; check them against the relevant sources.
未确认的信息Information not confirmed
- 全部 generator 类型清单与逐家参数差异(官方只点名数家)
- 默认日志目录名、文件保留与清理规则
- 是否存在默认遥测或结果上报(未取到官方声明)
- Docker 镜像与 CI 集成的官方口径(本批次未取到正文)
- harness 的会话构造与长度策略细节(README 只给一句定义)
- MCP 接入方式(官方文档未说明)
- releases 页与 PyPI 的 v0.17.1 日期标注差异原因
- 大陆网络环境下的直连可用性与备案情况(未实测、未检索)
- The complete generator list and per-provider parameter differences (the official pages name only a few)
- Default log directory names, retention and cleanup rules
- Whether telemetry or result upload is on by default (no official statement captured)
- The official Docker image and CI-integration story (no text captured in this pass)
- Harness conversation-construction and length strategy (the README gives one defining sentence only)
- MCP transport support (not described in the official docs)
- Why the releases page date label for v0.17.1 does not fully match PyPI
- Mainland-network direct reachability and filing status (not measured, not searched)
English summaries and interface labels are available. Detailed source notes below are currently in Chinese.
garak 是跑在自己终端里的 LLM 探针扫描器(NVIDIA 与维护者 Leon Derczynski,Apache-2.0):它把「和模型对话」写成 probes,把「什么算失效」写成 detectors,用 harness 组织成一次扫描,然后逐条把失败的 prompt 与响应落成本地日志。 仓库首页的自我表述是 generative AI red-teaming & assessment kit,官网则写作 "LLM vulnerability scanner"—— 两句话都是评测语义,不是运行时拦截语义。
garak 是跑在自己终端里的 LLM 探针扫描器(NVIDIA 与维护者 Leon Derczynski,Apache-2.0):它把「和模型对话」写成 probes,把「什么算失效」写成 detectors,用 harness 组织成一次扫描,然后逐条把失败的 prompt 与响应落成本地日志。 仓库首页的自我表述是 generative AI red-teaming & assessment kit,官网则写作 "LLM vulnerability scanner"—— 两句话都是评测语义,不是运行时拦截语义。
适合与不适合When to use it, when not to
适合:上线前对着自己可控的 endpoint(HuggingFace、OpenAI、Bedrock、replicate、litellm,或任何 REST 接口) 批量跑一轮探针;需要可复核的证据文件(JSONL、hit log)而不是一个「通过/不通过」的口号;要在多个 target 上复用同一套探针。 不适合:想在请求链路里拦用户输入的(它不阻断);把「全部探针 PASS」当成模型安全证明;要托管报告平台或合规证书的团队。
中文生态China availability 国产 / 国内可直接用 / 备案状态 · 快照domestic / direct access / CAC filing · snapshot 2026-11-06
- 出品属地Origin
- 国外出品foreign-made NVIDIA(美国)与维护者 Leon Derczynski 的开源项目;本批次未取到面向中国大陆的服务条款或中文站点。An open-source project of NVIDIA (US) and maintainer Leon Derczynski; no mainland-facing terms page or Chinese site was captured in this pass.
- 国内使用Direct access
- 直连未核验direct unknown github.com、garak.ai 与 docs.garak.ai 本批次从当前网络取到 200,但未在大陆网络环境做直连实测,故记未知;PyPI 与 GitHub 需自备可达性。github.com, garak.ai and docs.garak.ai returned 200 from the current network in this pass, but no mainland-network direct-connection measurement was made, so it is recorded as unknown; PyPI and GitHub reachability is on you.
- 备案状态CAC filing
- 备案未核验filing unknown:无官方依据,本批次未检索生成式 AI 备案公示,不下「未备案」结论。No official basis; the generative-AI filing registry was not searched in this pass, so no "not filed" conclusion is drawn.
备案信息以网信办《生成式人工智能服务已备案信息》公示名单为准(按批次滚动更新,本站只抄编号不解读);「大陆可直连」是本站从大陆网络直连实测的结果,不是厂商承诺。GitHub 类站点当日实测有波动,口径写在依据里。Filing status is quoted from the CAC public registry (updated batch by batch; this site copies the number and does not interpret it). "Direct access" is this site's own reachability measurement from a mainland network, not a vendor promise. GitHub-hosted sites fluctuated on the measurement day — the note says so.
固定坐标系Fixed coordinate system
8 个维度dimensions, 与同分区其他对象逐项可比each comparable item by item against others in the same section.
- 模型与开放条件Model & openness
它自己不带模型,被测面是别人的模型或应用:仓库首页把 generators 定义成「plugins for LLMs to be probed」, 点名的接入有 hugging face hub generative models、replicate text models、openai api chat & continuation models、 aws bedrock foundation models、litellm,并补一句「pretty much anything accessible via REST」。 文档首扫示例是
--model_type huggingface --model_name gpt2。全部 generator 类型与各家参数差异:未逐条清点。It ships no model of its own — the thing under test is somebody else's model or application: the repository front page defines generators as "plugins for LLMs to be probed", and names hugging face hub generative models, replicate text models, openai api chat & continuation models, aws bedrock foundation models and litellm, adding "pretty much anything accessible via REST". The documentation's first-scan example is
--model_type huggingface --model_name gpt2. The full generator list and per-provider parameter differences: not itemised.- 运行位置Where it runs
本机 Python 进程、终端交互:README 的安装命令是
python -m pip install -U garak,PyPI 记pip install garak、 requires-python 为 >=3.11;文档「Setting up」页同样把它描述成命令行工具。扫描请求按你选的 target 发往云端 API 或本机推理端点。是否存在托管执行面与 Docker 镜像口径:本批次未取到官方正文,记未知。A local Python process with a terminal interface: the README install command is
python -m pip install -U garak, PyPI recordspip install garakwith requires-python >=3.11, and the "Setting up" doc page likewise describes a command-line tool. Scan requests go to the target endpoint you pick — a cloud API or local inference. Whether a hosted execution surface exists, and the official Docker story: no official text captured in this pass, recorded as unknown.- 本地文件Local files
读的是随包安装的探针数据集与本机配置,写的是本地结果文件:README 记结果落 JSONL、garak.log 与 hit log; 文档「Our Features」列四类输出 Screen output、Report log、Hit log、Debug log。默认目录名、文件保留与清理规则: 本批次未逐字核验。
It reads the probe datasets installed with the package and your local configuration, and writes local result files: the README records JSONL, garak.log and hit logs; the "Our Features" doc page lists four output kinds — Screen output, Report log, Hit log, Debug log. Default directory names, retention and cleanup rules: not verified word for word in this pass.
- 关机后的任务Tasks after shutdown
没有「关机后续跑」的托管任务:一次扫描是一个本机进程,跑完写日志。文档目录列出 Setting up、Your first scan、 Getting help 等条目,未出现断点续跑或队列语义。批量任务的并行与限流方式:本批次未取到官方正文。
There is no "keeps running after you shut down" hosted task: one scan is one local process that writes logs when it ends. The docs table of contents lists Setting up, Your first scan and Getting help, with no resume or queue semantics. How batch runs parallelise and throttle: no official text captured in this pass.
- 工具与扩展Tools & extensions
四类插件面(README 原文短语):probes「classes for generating interactions with LLMs」、 detectors「classes for detecting an LLM is exhibiting a given failure mode」、harnesses「classes for structuring testing」、 generators 负责接模型。点选形式见文档示例
--probes lmrc.Profanity,--list_probes可列探针。 MCP 接入方式:官方文档未说明,记未知。Four plugin surfaces (README's own phrasing): probes are "classes for generating interactions with LLMs", detectors are "classes for detecting an LLM is exhibiting a given failure mode", harnesses are "classes for structuring testing", and generators connect to models. Selection syntax appears in the docs example
--probes lmrc.Profanity, and--list_probesenumerates probes. MCP support: not described in the official docs, recorded as unknown.- 上下文与记忆Context & memory
这里的「上下文」是 harness 如何把多轮交互拼成一次探测,不是跨会话记忆。README 对 harnesses 的表述止于 「classes for structuring testing」,具体会话构造与长度策略本批次未取到逐条官方正文,记未知。
Here "context" means how a harness assembles multiple turns into one probe, not cross-session memory. The README's statement about harnesses stops at "classes for structuring testing"; the concrete conversation-construction and length strategy had no official text captured in this pass, recorded as unknown.
- 权限与限制Permissions & limits
许可面清楚:Apache-2.0(LICENSE 正文直读,见 license 字段)。数据流向只有一条官方可读口径——探针 prompt 与响应 发往你配置的 target 端点,失败样本逐条写进本地日志(README:「If any of the prompt attempts yielded an undesirable behavior, the response will be marked as FAIL」)。是否有默认遥测、是否上传探针结果:未取到官方声明,进 unknowns。 它不阻断线上流量,因此不存在「拦截比例」这类结论;本站也不引用任何成功率或漏检率数字。
The licence is unambiguous: Apache-2.0 (LICENSE read directly, see the licence field). There is only one readable official statement about data flow — probe prompts and responses go to the target endpoint you configured, and failing samples are written item by item to local logs (README: "If any of the prompt attempts yielded an undesirable behavior, the response will be marked as FAIL"). Whether telemetry is on by default or results are uploaded: no official statement captured, moved to unknowns. It never blocks live traffic, so there is no "what share it stops" conclusion to write; this site cites no success-rate or miss-rate figures.
- 适合什么任务Best for
适合:上线前对自己可控的 endpoint 批量跑一轮探针、要求留下可复核的 prompt/响应证据文件、要在 HuggingFace、 OpenAI、Bedrock、litellm 等 target 之间复用同一套探针。不适合:当运行时护栏拦用户请求;把「探针全 PASS」读成 「模型安全」(官方口径只记录失败样本,不出安全证明);要托管报告平台或合规证书。
Fits: running a probe sweep against an endpoint you control before launch, keeping reviewable prompt/response evidence files rather than a slogan, reusing one probe set across HuggingFace, OpenAI, Bedrock, litellm and other targets. Not a fit: intercepting user requests at runtime (it does not block); reading "all probes PASS" as proof the model is safe (the official framing only records failing samples); teams needing a hosted report platform or compliance certificates.
头号误解Top misconception
- 把「支持哪些探针类别」读成「能拦住多少比例」——它只产出失败样本日志,不做阻断
- 以为 garak 是运行时护栏:它是一次性扫描进程,不在请求链路里
- 把
--list_probes的数量当成覆盖面结论:探针名与官方合规映射的关系本批次未逐条核验
证据来源Evidence sources
最近核验记录Latest recorded check 2026-11-06,内容更新日content updated on 2026-11-06。单项复核范围见正文或来源说明,不代表所有字段在同一天重新核验。See the text or source notes for item-specific scope; this does not mean every field was rechecked on that date.
| 类型Type | 名称Name | 链接Link |
|---|---|---|
| repo | NVIDIA/garak · 仓库首页(定位句、probes/detectors/harnesses/generators 四件套、target 接入清单、安装命令;直读 200,2026-11-06)NVIDIA/garak · repository front page (positioning line, the probes/detectors/harnesses/generators four, the target list, install commands; direct-fetched 200, 2026-11-06) | https://github.com/NVIDIA/garak |
| docs | garak · LICENSE(Apache-2.0 正文与版权行署名;直读 200,2026-11-06)garak · LICENSE (Apache-2.0 text and copyright attribution lines; direct-fetched 200, 2026-11-06) | https://github.com/NVIDIA/garak/blob/main/LICENSE |
| official | garak · 官网首页(「LLM vulnerability scanner」与 docs/reference 入口;直读 200,2026-11-06)garak · official site ("LLM vulnerability scanner" plus the docs/reference entry points; direct-fetched 200, 2026-11-06) | https://garak.ai/ |
| docs | garak · 文档 What is garak?(「finds holes in LLM-based tech」「identifies how your LLM can fail」;直读 200,2026-11-06)garak · docs, What is garak? ("finds holes in LLM-based tech", "identifies how your LLM can fail"; direct-fetched 200, 2026-11-06) | https://docs.garak.ai/garak/overview/what-is-garak/ |
| docs | garak · 文档 Our Features(四类输出 Screen/Report/Hit/Debug log;直读 200,2026-11-06)garak · docs, Our Features (the four output kinds: Screen/Report/Hit/Debug log; direct-fetched 200, 2026-11-06) | https://docs.garak.ai/garak/overview/our-features/ |
| docs | garak · 文档 Your first scan(python -m garak --list_probes 等命令与 PASS/FAIL 输出;直读 200,2026-11-06)garak · docs, Your first scan (python -m garak --list_probes and the PASS/FAIL output; direct-fetched 200, 2026-11-06) | https://docs.garak.ai/garak/llm-scanning-basics/your-first-scan |
| changelog | garak · Releases 最新条目(v0.17.1;直读 200,2026-11-06)garak · latest release entry (v0.17.1; direct-fetched 200, 2026-11-06) | https://github.com/NVIDIA/garak/releases/latest |
| changelog | garak · PyPI 项目页(0.17.1、pip install garak、requires-python >=3.11、Apache-2.0;直读 200,2026-11-06)garak · PyPI project page (0.17.1, pip install garak, requires-python >=3.11, Apache-2.0; direct-fetched 200, 2026-11-06) | https://pypi.org/project/garak/ |
官方口径与未核到项Official record and unverified items
本站未做端到端实测:没有运行过 python -m garak,没有打开任何 JSONL/hit log,不产出分数、成功率或排名, 也不统计探针总数。本档案只组织官方仓库首页、LICENSE、官网、docs.garak.ai 与 PyPI 上在册的说法,逐条见 sources 与核验日。
实测建议(四条,都指向官方可读页没给的东西):
- 换 target 后的可比性:同一套
--probes在 HuggingFace 本地端点与 OpenAPI 云端端点上的耗时与失败面差异 - 默认日志目录与保留行为(官方文档未逐字说明,落盘位置要自己确认)
- 是否有默认遥测(本批次未取到任何官方声明)
- Docker / CI 集成里的可复现性(官方文档未在本批次取到镜像口径)
This site has not run it end to end: no python -m garak execution, no JSONL/hit log opened, no scores, success rates or rankings produced, and no probe count tallied. This archive only organises statements on record at the official repository front page, LICENSE, garak.ai, docs.garak.ai and PyPI — item by item in sources with the verification date.
Suggested measurements (four, each pointing at something the official readable pages do not give):
- Comparability across targets: how the same
--probesset differs in wall time and failure surface between a local HuggingFace endpoint and a hosted OpenAI-style endpoint - Default log directory and retention behaviour (not spelled out in the official docs; confirm where files land)
- Whether any telemetry is on by default (no official statement captured in this pass)
- Reproducibility under Docker / CI (no official image statement captured in this pass)
变更记录说明
本对象有独立 releases 页:最新条目 v0.17.1(releases/latest 直读,标题「v0.17.1」,要点含 Python 3.14 支持 与 evaluators 侧新增 hit@k 指标口径)。本站不引用这类指标的任何数值,只记录「官方把评测指标写进了更新日志」这一事实。 PyPI 项目页记 0.17.1 的发布时间为 2026-10-16;GitHub releases 页当日抓取文本里的日期标注与 PyPI 不完全一致, 差异原因未核验,进 unknowns。仓库未被标记归档,故 lifecycle 记 active。
能力边界
按官方在册口径能确认的边界有三条:
- 它是评测工具,交付物是「失败样本 + 日志」,不是拦截动作;README 的判定表述是「the response will be marked as FAIL」。
- 它能接什么模型,等于 generators 插件面覆盖了什么;官方点名的接入见 model_access 维,其余接入方式要查 reference 文档。
- 探针名单(README 出现的 lmrc、promptinject、encoding、snowball、xss、gcg 等)说明的是测试语义的种类, 与「挡住多少攻击比例」没有关系;本站不做这类换算,也不做产品排名。
第一次怎么用
- 先确认被测端点属于哪一类 generator:官方首扫示例是
--model_type huggingface --model_name gpt2。 python -m pip install -U garak,然后用python -m garak --list_probes看探针名,不要凭印象写--probes。- 点选具体探针跑第一次扫描(文档示例形式:
--probes lmrc.Profanity),把输出文件路径记下来——默认目录未在官方文档逐字说明。 - 复核只看失败样本与命中日志:这一步是它的价值所在,也是「评测」与「防护」的分界。
- 要进 CI 就先解决 target 的凭据与限流,这两项官方文档在本批次没有给出可直接引用的口径。
相关条目Related entries
- PyRITPyRIT同为红队框架:那份的编排与攻击策略由 Python SDK 与 GUI 组织,本档案的默认入口是终端一次性扫描。Also a red-teaming framework: the PyRIT archive organises orchestration and attack strategies through a Python SDK and a GUI, while this archive's default entry point is a one-shot terminal scan.
- Promptfoopromptfoo同是能在 CI 里跑的评测工具:那份主轴是 prompt/agent 的断言与回归,本档案主轴是攻击探针。Also an evaluation tool that can run in CI: Promptfoo's main axis is prompt/agent assertions and regression, whereas this archive's main axis is attack probes.
- OllamaOllama本机推理端点:作为 garak 的一个 target 形态时才与它发生关系。A local inference endpoint: Ollama only becomes relevant to garak as one target shape among the generator plugins.
本页由This page is generated from the ai-handbook 数据层生成(CC BY 4.0)。data layer (CC BY 4.0).
方法论与坐标系定义见仓库内For the methodology and coordinate definitions, see METHODOLOGY.md.