BUG: OpenAITTSTarget accepts any speed, so an out-of-range value is only sent to the API on every request
メンテナーはふだん 2 日以内に返信
@ShivamSharma43 がすでに取り組んでいます。
2026年10月22日 から。
評価
調査の方向性
The issue identifies OpenAITTSTarget.__init__ and _send_prompt_to_target_async; locate those entry points in the PyRIT source and check how OpenAIVideoTarget validates duration. Add coverage for the listed invalid speed values and for None and valid boundary values. Done when invalid speeds raise ValueError at construction while None remains accepted; linked pull request #3447 is already open.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
OpenAITTSTarget.__init__ documents speed as "Select a value from 0.25 to 4.0", which is the range of the OpenAI speech API's speed parameter, but stores whatever is passed. _send_prompt_to_target_async then puts it in every request body (if self._speed is not None: body_parameters["speed"] = self._speed).
So speed=10, speed=-1.0, speed=0, speed=float("nan") or speed=True all construct a target without error, and the mistake only surfaces when each request reaches the API. The value is also recorded in the target's identifier as if it were valid. OpenAIVideoTarget already rejects an unsupported duration at the target instead of leaving it to the API.
Steps/Code to Reproduce
import asyncio
from pyrit.setup import IN_MEMORY, initialize_pyrit_async
asyncio.run(initialize_pyrit_async(memory_db_type=IN_MEMORY))
from pyrit.prompt_target import OpenAITTSTarget
for speed in (10, -1.0, 0, float("nan"), True):
target = OpenAITTSTarget(model_name="tts-1", endpoint="https://api.openai.com/v1", api_key="sk-test", speed=speed)
print(repr(speed), "-> accepted, will send speed =", repr(target._speed))
Expected Results
A speed that is not a finite number from 0.25 to 4.0 raises a ValueError when the target is created. None keeps the API default.
Actual Results
10 -> accepted, will send speed = 10
-1.0 -> accepted, will send speed = -1.0
0 -> accepted, will send speed = 0
nan -> accepted, will send speed = nan
True -> accepted, will send speed = True
Screenshots
N/A
Versions
- OS: Windows 11
- Python version: 3.11.9
- PyRIT version: installed from main (898b3bdc) in editable mode
- 主要言語
- Python
- スター
- 4.6k
- フォーク
- 962
- 平均マージ
- 2日 13時間
- マージ済み PR(30日)
- 423
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/PyRIT のほかの issue
-
BUG: Overlapping scorer-evaluation globs duplicate CSVs and change accuracy対応中かも @its-amann が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
microsoft/PyRIT#3430 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
BUG: MarkdownInjectionScorer misses shortcut-reference images with path-based exfiltration, and raw HTML <img>対応中かも @aatif101 が 3 日前に担当しました。 オープンBug: triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
microsoft/PyRIT#3343 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
Detect Azure SAS tokens, SharedAccessKey connection strings, and Databricks PATs in CredentialLeakScorer対応中かも @nithin42 が今日担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
メンテナーはふだん 2 日以内に返信
-
BUG: LetterBijectionConverter accepts a negative fixed_size and then leaves the prompt unchanged対応中かも @ShivamSharma43 が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
microsoft/PyRIT#3434 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
BUG: get_jailbreak_templates(num_templates=0) returns every template and the Jailbreak scenario accepts num_jailbreaks below 1対応中かも @ShivamSharma43 が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
microsoft/PyRIT#3417 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
microsoft/PyRIT の issue をすべて見る
似ている issue
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
sergey-miryanov/gcmon#230 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Azure-Samples/azure-search-openai-demo#3249 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] Failed archive extraction deletes the dataset cache対応中かも @dajiaohuang が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
alibaba/GraphScope#4674 ·