BUG: DenylistConverter and TransparencyAttackConverter identifiers ignore settings that change output
メンテナーはふだん 2 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 35/100
調査の方向性
Read the identifier-building code for DenylistConverter and TransparencyAttackConverter, along with the shared behavior noted in #3287. Check how denylist, convergence_threshold, and convergence_patience affect output and are represented in identifiers; use the reproduction steps to verify each pair gets distinct identifiers and both denylist configurations register successfully.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
Two converters leave settings that change their output out of their identifiers, so differently configured instances share one hash:
DenylistConverter:denylist. It does not override_build_identifier(), so it inherits theLLMGenericTextConverteridentifier, which hashes the system prompt template but not thedenylistthat is rendered into it. The denylist also decides whether the LLM is called at all.TransparencyAttackConverter:convergence_thresholdandconvergence_patience. Both control when the optimization loop stops early, but onlybenign_image_path,size,stepsandlearning_rateare included.
Because the default registry name comes from that hash, registering a second configuration without a custom name raises a duplicate-name error, and memory and analytics cannot tell the configurations apart. This is the same problem as #3287, for these two converters.
Steps/Code to Reproduce
import asyncio
import tempfile
from pathlib import Path
from PIL import Image
from pyrit.converter import DenylistConverter, TransparencyAttackConverter
from pyrit.prompt_target import OpenAIChatTarget
from pyrit.registry import ConverterRegistry
from pyrit.setup import IN_MEMORY, initialize_pyrit_async
asyncio.run(initialize_pyrit_async(memory_db_type=IN_MEMORY))
target = OpenAIChatTarget(endpoint="https://example.invalid/openai/v1", api_key="unused", model_name="gpt-4o")
benign = Path(tempfile.mkdtemp()) / "benign.jpg"
Image.new("L", (150, 150), color=200).save(benign, "JPEG")
pairs = [
(
DenylistConverter(converter_target=target, denylist=["bomb"]),
DenylistConverter(converter_target=target, denylist=["password", "exploit"]),
),
(
TransparencyAttackConverter(benign_image_path=benign, convergence_threshold=1e-6),
TransparencyAttackConverter(benign_image_path=benign, convergence_threshold=0.1),
),
(
TransparencyAttackConverter(benign_image_path=benign, convergence_patience=10),
TransparencyAttackConverter(benign_image_path=benign, convergence_patience=1),
),
]
for first, second in pairs:
print(first.get_identifier().unique_name, second.get_identifier().unique_name)
registry = ConverterRegistry()
registry.instances.register(DenylistConverter(converter_target=target, denylist=["bomb"]))
registry.instances.register(DenylistConverter(converter_target=target, denylist=["password"]))
Expected Results
Each pair has two different identifiers, and both DenylistConverter instances register.
Actual Results
DenylistConverter::0085bebb DenylistConverter::0085bebb
TransparencyAttackConverter::438424a1 TransparencyAttackConverter::438424a1
TransparencyAttackConverter::438424a1 TransparencyAttackConverter::438424a1
ValueError: Instance 'DenylistConverter::0085bebb' already exists
Screenshots
N/A
Versions
- OS: Windows 11
- Python version: 3.11.9
- PyRIT version: installed from main (f277fedd) in editable mode
- 主要言語
- Python
- スター
- 4.6k
- フォーク
- 962
- 平均マージ
- 2日 16時間
- マージ済み PR(30日)
- 354
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/PyRIT のほかの issue
-
Bug: triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 2 日以内に返信
-
BUG: Video scorers block the event loop while decoding frames and audio対応中かも @Shizoqua が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
メンテナーはふだん 2 日以内に返信
-
BUG: HTTPTarget turns CRLF into LF in the request body対応中かも @nniiovoo が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
メンテナーはふだん 2 日以内に返信
-
BUG: multimodal router drops media metadata when forwarding seeds and responses対応中かも @Shizoqua が今日担当しました。 オープンBug: triage
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
メンテナーはふだん 2 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 2 日以内に返信
microsoft/PyRIT の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
mihai-vlc/sublime-jsfmt#56 ·
-
comp/cli comp/plugins P2 type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
NousResearch/hermes-agent#141917 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Go device SDK: Whisper transcriber keeps buffering and transcribing audio appended after Stop()対応中かも @apoorvdarshan が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
BasedHardware/omi#22770 ·
メンテナーはふだん 1 日以内に返信
-
bug needs-acceptance wg/router-models-inference-runtime
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
vllm-project/semantic-router#5295 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
huggingface/huggingface_hub#5210 ·
メンテナーはふだん 1 日以内に返信