FEAT: Add supports_prefill capability and PrefillAttack strategy
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
調査の方向性
Start with TargetCapabilities and CapabilityName to see how existing flags are declared, then read SkeletonKeyAttack in pyrit/executor/attack/single_turn/ to see how a trailing assistant message is already used to prime a target. The open questions (one PR or two, which targets set the flag) need a maintainer decision before the work starts. Done means the flag exists and round-trips through serialization, and PrefillAttack raises on targets without PREFILL in TARGET_REQUIREMENTS.
索引モデルが issue の本文から書いたものです。
説明
Is your feature request related to a problem? Please describe.
Some targets let the caller write the first part of the model's reply: the request ends with an open assistant turn, and the model continues it. Prefill attacks rely on this, and recent work shows they're effective against current open-weight models (arXiv:2602.14689 tested more than 20 strategies). PyRIT can't test for this properly:
TargetCapabilitiesdoesn't record whether a target continues a trailing assistant message. Completion endpoints and local Hugging Face models do. Most hosted chat APIs ignore it or reject the request. Without a flag, an attack that depends on prefill can't require it.- You can end a
prepended_conversationon an assistant message, the same waySkeletonKeyAttackprimes a target, but no attack is built around it. On a target that drops the assistant turn, the model just answers the user message, and the result looks like the model resisted the attack.
Describe the solution you'd like
- Capability. Add
CapabilityName.PREFILL = "supports_prefill"andsupports_prefill: bool = FalseonTargetCapabilities. Set it for targets that continue a trailing assistant turn (completion-style and locally hosted ones) and leave it false for hosted chat APIs. - Attack. Add
PrefillAttack(PromptSendingAttack)inpyrit/executor/attack/single_turn/, next toSkeletonKeyAttack. It takes the objective and aprefill_text, ends the conversation with an assistant message carrying that text, sends it, and scores the continuation.TARGET_REQUIREMENTSrequiresPREFILL, so an unsupported target raises an error up front.
Unit tests would cover the prefill being the final assistant piece, the error on an unsupported target, scoring, and the new field round-tripping through serialization. The PR would also add a doc entry.
Describe alternatives you've considered, if relevant
- Only the capability flag. Users would build the
prepended_conversationby hand each time, and nothing would check the target. - A converter. Converters change prompt text and can't add an assistant turn.
Additional context
Hosted APIs are dropping support for caller-set assistant turns, so this mostly matters for open-weight and completion-style targets. PyRIT tests those too.
- Struppek, Gleave, Pelrine (FAR.AI), arXiv:2602.14689: https://arxiv.org/abs/2602.14689
- Dotsinski, Eustratiadis, "Sockpuppetting", arXiv:2601.13359: https://arxiv.org/abs/2601.13359
Questions:
- Do you want a
supports_prefillcapability? - One PR, or the capability first and the attack second?
- Which targets should have the flag set, beyond the obvious ones?
- 主要言語
- Python
- スター
- 4.6k
- フォーク
- 944
- 平均マージ
- 2日 18時間
- マージ済み PR(30日)
- 358
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/PyRIT のほかの issue
-
BUG: label queries only return the final conversation of an attack対応中かも @u7k4rs6 が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
microsoft/PyRIT#3095 · コメント 4 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
BUG Configuration keeps runtime-status errors after polling recovers対応中かも @joeyvictorino が 6 日前に担当しました。 オープンBug: triage GUI help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
microsoft/PyRIT#2868 · コメント 6 件 ·
メンテナーはふだん 2 日以内に返信
-
FEAT: Support PDF and file inputs via `binary_path` in OpenAI chat and response targets対応中かも @PranavD2905 が今日担当しました。 オープンfeature-request help wanted
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
microsoft/PyRIT#3274 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
feature-request
難易度 5/5 1週間以上 初心者へのやさしさ 18/100
メンテナーはふだん 2 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 34/100
メンテナーはふだん 2 日以内に返信
microsoft/PyRIT の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
cellrishi-code/claude-skills-atlas#165 ·
メンテナーはふだん 1 日以内に返信
-
bug confirmed issue
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
open-webui/open-webui#32635 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Filters: ?field:ne=null matches NULL rows instead of non-NULL ones対応中かも @rshdhere が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Netflix/metaflow-service#504 ·
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
gke-labs/kube-agents#3394 ·
メンテナーはふだん 1 日以内に返信
-
A2A audit timestamps end in +00:00Z (invalid ISO 8601)対応中かも @O1sumitkumar が今日担当しました。 オープンbug good first issue help wanted python
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信