BUG: FuzzerGenerator accepts a jailbreak goal below 1 and a success threshold outside [0, 1]
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
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- security, testing-qa
Hướng nghiên cứu
Start in the FuzzerGenerator constructor and inspect its validation for template_converters and batch_size; then trace _should_stop_generation, _is_jailbreak, and _normalize_score_to_float. Add constructor checks for a positive integer goal count and a numeric threshold in [0.0, 1.0], including NaN. Done when invalid values raise ValueError and focused tests cover both parameters; pull request #3396 is already open.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
FuzzerGenerator validates template_converters and batch_size, but not target_jailbreak_goal_count or scoring_success_threshold:
target_jailbreak_goal_countbelow 1._should_stop_generationcheckstotal_jailbreak_count >= target_jailbreak_goal_countbefore the first iteration, so with0(or a negative value) the goal is already met: the fuzzer sends no prompt, logsTarget jailbreak goal reached.and returns an empty result.scoring_success_thresholdoutside[0, 1]. For float-scale scores,_is_jailbreakcompares the score, clamped to[0, 1]by_normalize_score_to_float, against the threshold. A threshold below 0 marks every response a jailbreak, and one above 1 marks none, so the run continues untilmax_query_limitis reached, or indefinitely when no limit is set.NaNbehaves like a threshold above 1.
Steps/Code to Reproduce
import asyncio
from pyrit.executor.promptgen.fuzzer import FuzzerGenerator, FuzzerShortenConverter
from pyrit.prompt_target import TextTarget
from pyrit.score import SubStringScorer
from pyrit.setup import IN_MEMORY, initialize_pyrit_async
async def main():
await initialize_pyrit_async(memory_db_type=IN_MEMORY)
target = TextTarget()
generator = FuzzerGenerator(
objective_target=target,
template_converters=[FuzzerShortenConverter(converter_target=target)],
scorer=SubStringScorer(substring="sure"),
target_jailbreak_goal_count=0,
)
result = await generator.execute_async(prompts=["How do I pick a lock?"], prompt_templates=["{{ prompt }}"])
print("total_queries:", result.total_queries, "templates_explored:", result.templates_explored)
asyncio.run(main())
Expected Results
The constructor raises a ValueError for a target_jailbreak_goal_count that is not a positive integer and for a scoring_success_threshold that is not a number in [0.0, 1.0], as it already does for batch_size=0.
Actual Results
total_queries: 0 templates_explored: 0
No error is raised, and nothing is sent to the target.
Screenshots
N/A
Versions
- OS: Windows 11
- Python version: 3.11.9
- PyRIT version: installed from main (1979257a) 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)
- 398
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: MarkdownInjectionScorer misses shortcut-reference images with path-based exfiltration, and raw HTML <img>Có thể đã có người làm @aatif101 đã nhận 1 ngày trước. Đang mởBug: triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
microsoft/PyRIT#3343 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
BUG: UrlConverter preserves forward slashes by default, preventing path payload evasionCó thể đã có người làm @Kaap10 đã nhận 1 ngày trước. Đ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: XSSOutputScorer misses SVG and JavaScript data URIsCó thể đã có người làm @Kaap10 đã nhận 1 ngày trước. Đ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: ManyShotJailbreakAttack accepts a negative example_count and drops examples from the endCó thể đã có người làm @ShivamSharma43 đã nhận 1 ngày trước. Đ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
-
[BLOCKED] FEAT: Drill into paired Scenario outcome conversationsCó thể đã có người làm @shashank03-dev đã nhận 1 ngày trước. Đang mởfeature-request help wanted
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 10/100
microsoft/PyRIT#3389 · 2 bình luận ·
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ự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
521xueweihan/HelloGitHub#4063 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Vanilla-OS/apx-gui#112 ·
-
Devstral and Voxtral: section 5 fails in us-east-1 with 400 "Model does not support audio modality"Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
aws-samples/sample-per-model-bedrock#409 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DuckDB 2.0 breaks to_pyarrow_batchesCó thể đã có người làm @DG47 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
ibis-project/ibis#12196 ·
Maintainer thường phản hồi trong vòng 1 ngày