BUG: FuzzerGenerator accepts a jailbreak goal below 1 and a success threshold outside [0, 1]
メンテナーはふだん 2 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- python
- 領域
- security, testing-qa
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Python
- スター
- 4.6k
- フォーク
- 962
- 平均マージ
- 2日 15時間
- マージ済み PR(30日)
- 398
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/PyRIT のほかの issue
-
BUG: MarkdownInjectionScorer misses shortcut-reference images with path-based exfiltration, and raw HTML <img>対応中かも @aatif101 が 1 日前に担当しました。 オープンBug: triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
microsoft/PyRIT#3343 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
BUG: UrlConverter preserves forward slashes by default, preventing path payload evasion対応中かも @Kaap10 が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
メンテナーはふだん 2 日以内に返信
-
BUG: XSSOutputScorer misses SVG and JavaScript data URIs対応中かも @Kaap10 が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
メンテナーはふだん 2 日以内に返信
-
BUG: ManyShotJailbreakAttack accepts a negative example_count and drops examples from the end対応中かも @ShivamSharma43 が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
メンテナーはふだん 2 日以内に返信
-
[BLOCKED] FEAT: Drill into paired Scenario outcome conversations対応中かも @shashank03-dev が 1 日前に担当しました。 オープンfeature-request help wanted
難易度 5/5 1週間以上 初心者へのやさしさ 10/100
microsoft/PyRIT#3389 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
microsoft/PyRIT の issue をすべて見る
似ている issue
-
Uninstall guide omits the CloudWatch log groups AWS CodeBuild creates for useCodeBuild pipelinesオープンbug documentation
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
awslabs/visual-asset-management-system#552 ·
メンテナーはふだん 1 日以内に返信
-
netbox status: needs triage type: documentation
難易度 1/5 1時間未満 初心者へのやさしさ 76/100
netbox-community/netbox#23460 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
awslabs/threat-composer#362 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ansys/pyansys-common-mcp#213 ·
メンテナーはふだん 3 日以内に返信