跳到主要内容Skip to main content
← Safety

PyRITPyRIT

Microsoft
开源Open source MITMIT PythonPython 本地Local 终端Terminal WebUIWebUI evaleval 自托管Self-hosted partial lifecycle: active 核验Checked 2026-11-06

核验标记表示资料完整度,不是产品评分。下列未确认项可能影响选型;请按对应来源逐项确认。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

  • 是否存在官方托管执行面(与托管报告服务):未取到官方声明
  • 默认 SQLite 库文件名与路径、清理与导出命令
  • 跨会话记忆的边界与上下文压缩/截断策略
  • MCP 接入方式(官方文档未说明)
  • 是否有默认遥测、扫描记录的留存期条款
  • 0.x 到 v1.0.0 的逐条迁移面(只读到 release notes 要点)
  • CoPyRIT GUI 的 scenario catalog 与 CLI scanner 的能力差集
  • 攻击模型(identity/attack model)缺省配置时的具体行为
  • 大陆网络直连可用性与备案情况(未实测、未检索)
  • Whether any hosted execution surface (or hosted report service) exists: no official statement captured
  • Default SQLite database filename and path, plus cleanup and export commands
  • The boundary of cross-session memory and any context compaction/truncation strategy
  • MCP transport support (not described in the official docs)
  • Whether telemetry is on by default, and retention terms for scan records
  • The itemised 0.x to v1.0.0 migration surface (only the release-notes headline was read)
  • The capability gap between the CoPyRIT GUI scenario catalogue and the CLI scanners
  • What actually happens when no attack/identity model is configured
  • 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.

PyRIT 是微软那份「自己搭红队流程」的本机工具箱(MIT,已从 Azure/PyRIT 迁到 microsoft/PyRIT): 仓库首页把它写成 automated scans + adaptive multi-turn attacks + a web UI,官方文档 latest 的定义句落在 「assessing the security and safety of generative AI systems at scale」。和同大类另一份 garak 档案的分野很干脆—— garak 的默认形态是一条命令扫一个端点,PyRIT 的默认形态是你用 Python 把 targets、converters、scorers、 memory 与 attack 策略编排成一份可复跑的 assessment。

PyRIT 是微软那份「自己搭红队流程」的本机工具箱(MIT,已从 Azure/PyRIT 迁到 microsoft/PyRIT): 仓库首页把它写成 automated scans + adaptive multi-turn attacks + a web UI,官方文档 latest 的定义句落在 「assessing the security and safety of generative AI systems at scale」。和同大类另一份 garak 档案的分野很干脆—— garak 的默认形态是一条命令扫一个端点,PyRIT 的默认形态是你用 Python 把 targets、converters、scorers、 memory 与 attack 策略编排成一份可复跑的 assessment。

适合与不适合When to use it, when not to

适合:要把多轮自适应攻击(文档点名的 Crescendo、TAP)编排成可重复 assessment;需要本地 memory 后端把过程落进 你自己的 SQLite 或 Azure SQL;团队想让复核人员在 CoPyRIT 界面里逐条看结果;已经把 garak 风格探针纳入同一套扫描流程 (官方 scenario 页直接给 pyrit_scan run garak.prompt_inject 这种形式)。不适合:只想一条命令扫完就走; 要托管报告平台或合规交付物;指望工具替代红队人员的判断。

中文生态China availability 国产 / 国内可直接用 / 备案状态 · 快照domestic / direct access / CAC filing · snapshot 2026-11-06

出品属地Origin
国外出品foreign-made Microsoft 的开源项目(仓库与 PyPI 均署名 Microsoft);本批次未取到面向中国大陆的服务条款或中文文档。An open-source project of Microsoft (the repository and PyPI both credit Microsoft); no mainland-facing terms page or Chinese docs were captured in this pass.
国内使用Direct access
直连未核验direct unknown github.com、microsoft.github.io 与 PyPI 在当日从当前网络取到 200,但未在大陆网络环境做直连实测,故记未知。github.com, microsoft.github.io and PyPI returned 200 from the current network on the verification date, but no mainland-network direct-connection measurement was made, so it is recorded as unknown.
备案状态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

有两面都要模型:被红队的 target,和驱动攻击的那一面。仓库首页点名 target 覆盖「OpenAI, Anthropic, Azure OpenAI, Microsoft Foundry, Azure Machine Learning, Google Gemini, Google Vertex AI, AWS Bedrock, Hugging Face, Ollama, Groq, OpenRouter, Cohere, and GitHub Copilot」,接入协议写「HTTP, WebSockets, browser automation with Playwright, or custom targets」;文档 latest 把这一点概括为 Any Target。凭据侧官方原文:「PyRIT loads API credentials from environment variables or .env files」,示例变量是 OPENAI_CHAT_ENDPOINT / OPENAI_CHAT_KEY / OPENAI_CHAT_MODEL。

Two sides both need models: the target under red-team, and the side driving the attacks. The repository front page names targets covering "OpenAI, Anthropic, Azure OpenAI, Microsoft Foundry, Azure Machine Learning, Google Gemini, Google Vertex AI, AWS Bedrock, Hugging Face, Ollama, Groq, OpenRouter, Cohere, and GitHub Copilot", with protocols written as "HTTP, WebSockets, browser automation with Playwright, or custom targets"; the docs 'latest' page compresses this into Any Target. On credentials the official wording is "PyRIT loads API credentials from environment variables or .env files", with OPENAI_CHAT_ENDPOINT / OPENAI_CHAT_KEY / OPENAI_CHAT_MODEL as the sample variables.

运行位置Where it runs

装在自己的 Python 环境里跑:pip install pyrit(PyPI 记 requires-python =3.10,3.15,当日版本 1.1.0)。 仓库首页给三种入口——「command-line scanner」、「graphical interface」(CoPyRIT)、以及「extensible Python framework」; 文档 latest 把命令行写作 pyrit_scan 与 pyrit_shell,GUI 写作在浏览器里交互并复核结果。执行发生在你自己的机器; 是否存在官方托管执行面:未取到官方声明。

Installed into your own Python environment: pip install pyrit (PyPI records requires-python =3.10,3.15, current version 1.1.0). The repository front page offers three entry points — a "command-line scanner", a "graphical interface" (CoPyRIT), and an "extensible Python framework"; the docs spell the CLI as pyrit_scan and pyrit_shell, and the GUI as interactive exploration with results reviewed in the browser. Execution happens on your own machine; whether any hosted execution surface exists: no official statement captured.

本地文件Local files

读本机配置与 .env 凭据,写的是扫描产物与状态。文档 latest 明确「Built-in Memory」有两个后端:SQLite 与 Azure SQL—— 前者落在你机器上的库文件,后者落在你自己的数据库。默认 SQLite 文件名与路径、清理与导出方式:本批次未逐字核验。

It reads local configuration and .env credentials, and writes scan artefacts and state. The docs page states "Built-in Memory" has two backends, SQLite and Azure SQL — the first lands in a database file on your machine, the second in your own database. Default SQLite filename and path, plus cleanup and export methods: not verified word for word in this pass.

关机后的任务Tasks after shutdown

长任务的本机语义齐全:自适应多轮攻击与 scenario 都在本地进程里推进,结果可在 CoPyRIT 界面复核(仓库首页 「Explore AI systems interactively and review results in your browser」)。「关机后在别处续跑」这类托管队列语义: 官方未说明——它不是托管服务。

Local semantics for long tasks are all present: adaptive multi-turn attacks and scenarios advance inside local processes, and results can be reviewed in the CoPyRIT interface (repository front page: "Explore AI systems interactively and review results in your browser"). A hosted queue that "keeps running after shutdown": not stated by the vendor — it is not a managed service.

工具与扩展Tools & extensions

组件面按文档 latest 在册的有:Automated Red Teaming(点名的策略含 Crescendo、TAP)、Scenario Framework、 Any Target、Built-in Memory、Flexible Scoring,另有 targets/converters/scorers/memory/orchestrators 这一层模块划分。 与同大类另一份档案的直接接口:文档专页写明 Garak scenario family「implements probes inspired by the Garak framework」, 运行形式是 pyrit_scan run garak.prompt_inject --target openai_chat。MCP 接入:官方文档未说明,记未知。

Component surface on record in the docs: Automated Red Teaming (Crescendo and TAP named), Scenario Framework, Any Target, Built-in Memory, Flexible Scoring, plus the targets/converters/scorers/memory/orchestrators module split. The direct interface with another archive in this category: a dedicated docs page says the Garak scenario family "implements probes inspired by the Garak framework", run as pyrit_scan run garak.prompt_inject --target openai_chat. MCP support: not described in the official docs, recorded as unknown.

上下文与记忆Context & memory

自适应多轮攻击靠的就是可回溯的会话状态,状态存在上述 memory 后端里;文档 latest 把「adaptive multi-turn attacks」 与 scenario 目录并列在册。跨会话记忆的边界、上下文压缩或截断策略:本批次未取到逐条官方正文,记未知。

Adaptive multi-turn attacks depend on revisitable conversation state, and that state lives in the memory backends above; the docs list "adaptive multi-turn attacks" alongside the scenario catalogue. The boundary of cross-session memory, and any compaction or truncation strategy: no itemised official text captured in this pass, recorded as unknown.

权限与限制Permissions & limits

许可面:MIT,版权方 Microsoft(LICENSE 正文直读)。归属面要记一条事实:原 Azure/PyRIT 仓库页写着 「PyRIT has moved! Please see https://github.com/microsoft/PyRIT!」,本档案按迁移后仓库建档。 数据流向:探针与攻击 prompt 发往你配置的 target 端点与攻击模型端点,凭据从环境变量或 .env 载入(官方原文见 model_access 维),扫描记录落在你自己的 SQLite/Azure SQL。是否有默认遥测、留存期条款:未取到官方声明,进 unknowns。 它是评测与取证工具,不做阻断,因此本站不写任何「拦下多少」的比例,也不引用 scenario 报告的数值。

Licence: MIT, copyright holder Microsoft (LICENSE read directly). Ownership needs one recorded fact: the original Azure/PyRIT repository page states "PyRIT has moved! Please see https://github.com/microsoft/PyRIT!", and this archive files the post-migration repository. Data flow: probe and attack prompts go to the target endpoint and the attack-model endpoint you configured, credentials are loaded from environment variables or .env (see the model_access axis), and run records land in your own SQLite/Azure SQL. Whether telemetry is on by default, and retention clauses: no official statement captured, moved to unknowns. It is an evaluation and forensics tool that does not block, so this site writes no "what share it stops" ratio and cites no scenario-report numbers.

适合什么任务Best for

适合:要把多轮自适应攻击编排成可重复的 assessment、需要 Python 侧自己组合 targets/converters/scorers、 要让非工程同学也在本地 GUI 里复核结果、团队已经把 garak 风格探针纳入同一套扫描流程。不适合:只想一条命令扫一个 端点就走(那是 garak 的默认形态)、要托管报告与合规交付物、指望它替人做红队判断。

Fits: orchestrating multi-turn adaptive attacks (Crescendo, TAP) into a repeatable assessment; needing to compose targets/converters/scorers yourself in Python; letting non-engineering reviewers go through results in a local GUI; teams already folding garak-style probes into one scan pipeline. Not a fit: wanting a single command that scans one endpoint and ends there (that is garak's default shape); needing hosted reports and compliance deliverables; expecting it to replace human red-team judgement.

头号误解Top misconception

  • 以为跑 Garak scenario 要先装 garak——官方口径是把探针实现搬进 pyrit_scan
  • 只配被测端点的 key:驱动攻击的模型端点与凭据同样要配(env/.env 口径在册)
  • 把 scenario 报告当成防护结论:它不做阻断,本站也不把它的数值当拦截率

证据来源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
migrationAzure/PyRIT · 原仓库页(迁移公告「PyRIT has moved!」与 MIT 标注;直读 200,2026-11-06)Azure/PyRIT · original repository page (the "PyRIT has moved!" notice and the MIT label; direct-fetched 200, 2026-11-06)https://github.com/Azure/PyRIT
repomicrosoft/PyRIT · 仓库首页(自我定位句、三种入口、target 与协议清单、24 个 releases;直读 200,2026-11-06)microsoft/PyRIT · repository front page (self-description line, three entry points, target and protocol lists, 24 releases; direct-fetched 200, 2026-11-06)https://github.com/microsoft/PyRIT
docsmicrosoft/PyRIT · LICENSE(MIT 正文与 Microsoft 版权行;直读 200,2026-11-06)microsoft/PyRIT · LICENSE (MIT text and the Microsoft copyright line; direct-fetched 200, 2026-11-06)https://github.com/microsoft/PyRIT/blob/main/LICENSE
docsPyRIT · 官方文档 latest(定义句、pip install pyrit、Automated Red Teaming/Scenario Framework/Any Target/Built-in Memory/Flexible Scoring、pyrit_scan/pyrit_shell/CoPyRIT;直读 200,2026-11-06)PyRIT · official docs, latest (definition sentence, pip install pyrit, Automated Red Teaming/Scenario Framework/Any Target/Built-in Memory/Flexible Scoring, pyrit_scan/pyrit_shell/CoPyRIT; direct-fetched 200, 2026-11-06)https://microsoft.github.io/PyRIT/latest/
docsPyRIT · 文档 Garak scenarios(probes inspired by Garak、pyrit_scan run garak.prompt_inject --target openai_chat;直读 200,2026-11-06)PyRIT · docs, Garak scenarios (probes inspired by Garak, pyrit_scan run garak.prompt_inject --target openai_chat; direct-fetched 200, 2026-11-06)https://microsoft.github.io/PyRIT/latest/scanner/garak
docsPyRIT · 文档 Populating secrets(OPENAI_CHAT_ENDPOINT/KEY/MODEL 与「loads API credentials from environment variables or .env files」;直读 200,2026-11-06)PyRIT · docs, Populating secrets (OPENAI_CHAT_ENDPOINT/KEY/MODEL and "loads API credentials from environment variables or .env files"; direct-fetched 200, 2026-11-06)https://microsoft.github.io/PyRIT/latest/getting-started/populating-secrets
changelogmicrosoft/PyRIT · Releases(v1.1.0 / v1.0.1 / v1.0.0 / v0.14.0 / v0.13.0 序列;直读 200,2026-11-06)microsoft/PyRIT · Releases (the v1.1.0 / v1.0.1 / v1.0.0 / v0.14.0 / v0.13.0 sequence; direct-fetched 200, 2026-11-06)https://github.com/microsoft/PyRIT/releases
changelogPyRIT · PyPI 项目页(1.1.0、pip install pyrit、requires-python =3.10,3.15、MIT;直读 200,2026-11-06)PyRIT · PyPI project page (1.1.0, pip install pyrit, requires-python =3.10,3.15, MIT; direct-fetched 200, 2026-11-06)https://pypi.org/project/pyrit/

官方口径与未核到项Official record and unverified items

本站未做端到端实测:没有执行过 pyrit_scan 或 CoPyRIT 会话,不产出攻击成功率、通过率或任何排名, 也不清点 scenario 总数。本档案只组织仓库首页、LICENSE、官方文档 latest、两个文档专页、releases 与 PyPI 在册的说法。

实测建议(四条):

  • 只配 target 不配攻击模型时会发生什么(凭据口径在册,缺省行为未在册)
  • SQLite 与 Azure SQL 两个 memory 后端的可复核差异(默认文件位置与清理方式未逐字核验)
  • Garak scenario 家族与原生 garak 探针输出的可比性(官方说明是移植实现,不是调用 garak)
  • CoPyRIT 界面与 pyrit_scan 的能力差集(GUI scenario catalog 在 v1.1.0 更新日志在册,覆盖面未清点)

This site has not run it end to end: no pyrit_scan execution and no CoPyRIT session, so no attack success rate, pass rate or ranking is produced, and the scenario count is not tallied. This archive only organises statements on record at the repository front page, LICENSE, the docs 'latest' page, two dedicated docs pages, releases and PyPI.

Suggested measurements (four):

  • What happens when only the target is configured and no attack model is (the credential surface is on record; default behaviour is not)
  • Revisability differences between the SQLite and Azure SQL memory backends (default file location and cleanup method not verified word for word)
  • Comparability between the Garak scenario family and native garak probe output (the official framing is a ported implementation, not a garak call)
  • The capability gap between the CoPyRIT interface and pyrit_scan (the GUI scenario catalogue is on record in the v1.1.0 notes; coverage not tallied)

变更记录说明

本对象有独立 releases 页:当日在册序列为 v1.1.0(CoPyRIT 功能、Best-of-N scanners、GUI scenario catalog)、 v1.0.1、v1.0.0(新 registry 与组件构造、identity models)、v0.14.0(迁移到 Pydantic v2、流式支持)、 v0.13.0(TargetConfiguration 重构)。PyPI 记 1.1.0 发布于 2026-09-04,与 releases 页标注同日。 v1.0.0 的大版本改动意味着 0.x 的写法不必然继续可用——迁移面本批次未逐条清点,进 unknowns。 仓库未标记归档,故 lifecycle 记 active。

能力边界

  • 它是红队与取证工具:产出是攻击过程与可复核记录,不做运行时阻断,因此「拦住多少比例」这个问题对它不成立。
  • 它需要两类端点(被测 target + 驱动攻击的模型),两类都要你自己给凭据;官方只给配置口径,不给托管端点。
  • scenario 与探针家族的名字(含 garak 移植家族)说明的是测试语义,不是覆盖面证明,本站不做任何换算或排名。

第一次怎么用

  1. pip install pyrit(注意 PyPI 的 Python 区间 =3.10,3.15)。
  2. 按官方 secrets 页把凭据放进环境变量或 .env:至少要有能驱动攻击的模型端点三件套,再加被测 target。
  3. 选一个 scenario 家族跑第一轮(pyrit_scan run garak.prompt_inject --target openai_chat 是官方在册示例形式), 先确认 memory 后端把过程写到了哪里。
  4. 需要人工复核时再起 CoPyRIT;要把流程固化进发布门禁,就把这轮 run 的参数与记录一起版本化。
  5. 从 0.x 升上来的项目,先读 v1.0.0 的 release notes 再改代码。

相关条目Related entries

  • garakgarak同为红队框架:那份是终端单命令扫描器,本档案是 SDK/GUI/CLI 三入口的编排框架,且官方把 garak 探针移植进了本框架。Also a red-teaming framework: that archive is a terminal one-command scanner, this one is an orchestration framework with SDK/GUI/CLI entry points — and the official docs port garak's probes into this framework.
  • LakeraLakera红队的另一面:本档案交付你自己跑的评估流程,那份交付托管的防护 API 与红队服务。The other face of red teaming: this archive delivers an assessment pipeline you run yourself, Lakera delivers a hosted prevention API plus a red-team service.
  • OllamaOllama本机端点:官方 target 清单里出现 Ollama,红队全程可以不出本机网络边界。A local endpoint: Ollama appears in the official target list, so a whole red-team run can stay inside your own network boundary.

本页由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.