BUG: DenylistConverter and TransparencyAttackConverter identifiers ignore settings that change output
Maintainer thường phản hồi trong vòng 2 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Python
- Star
- 4.6k
- Fork
- 962
- Merge trung bình
- 2 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 390
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/PyRIT
-
Bug: triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 2 ngày
-
BUG: Video scorers block the event loop while decoding frames and audioCó thể đã có người làm @Shizoqua đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 2 ngày
-
BUG: HTTPTarget turns CRLF into LF in the request bodyCó thể đã có người làm @nniiovoo đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 2 ngày
-
BUG: multimodal router drops media metadata when forwarding seeds and responsesCó thể đã có người làm @Shizoqua đã nhận hôm nay. Đang mởBug: triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của microsoft/PyRIT
Issue tương tự
-
bug documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
awslabs/visual-asset-management-system#514 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
backend bug spec:REQ-053
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
nolte/kamerplanter#2547 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
EleutherAI/lm-evaluation-harness#4425 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Gemini: respect PLANNING_DISABLED=1 in lifecycle context hooksCó thể đã có người làm @AmariAugustin đã nhận hôm nay. Đang mởbug good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 87/100
OthmanAdi/planning-with-files#329 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
wr.dynamodb.read_items returns [{}] for a single partition value that does not existCó thể đã có người làm @auraseb đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
aws/aws-sdk-pandas#3520 ·
Maintainer thường phản hồi trong vòng 2 ngày