BUG: OpenAITTSTarget accepts any speed, so an out-of-range value is only sent to the API on every request
I maintainer di solito rispondono entro 2 giorni
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 25/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Python
- Stelle
- 4.6k
- Fork
- 962
- Merge medio
- 2g 13h
- PR unite (30g)
- 417
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/PyRIT
-
BUG: Overlapping scorer-evaluation globs duplicate CSVs and change accuracyForse già presa @its-amann l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
microsoft/PyRIT#3430 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
BUG: MarkdownInjectionScorer misses shortcut-reference images with path-based exfiltration, and raw HTML <img>Forse già presa @aatif101 l’ha presa 2 giorni fa. ApertaBug: triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
microsoft/PyRIT#3343 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
BUG: KeywordSelectionStrategy accepts a negative context, so SelectiveTextConverter duplicates or truncates the promptForse già presa @ShivamSharma43 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
I maintainer di solito rispondono entro 2 giorni
-
BUG: PackageHallucinationScorer flags Rust std paths, type names and hyphenated crates as hallucinatedForse già presa @nniiovoo l’ha presa oggi. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 2 giorni
-
BUG: LetterBijectionConverter accepts a negative fixed_size and then leaves the prompt unchangedForse già presa @ShivamSharma43 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di microsoft/PyRIT
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
volcengine/OpenViking#6445 ·
I maintainer di solito rispondono entro 1 giorno
-
BUG:Edit Album strips spaces from the password so albums with a leading/trailing space in the password can't be editedForse già presa @ManyaJain111 l’ha presa oggi. Apertabug enhancement possible-duplicate
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
AOSSIE-Org/PictoPy#1637 · 4 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
deepspeedai/DeepSpeed#8884 ·
I maintainer di solito rispondono entro 3 giorni
-
Flaky: test_advisor_live_calibrates_an_unmeasured_circuit ranks engines by a 1.8ms sleep marginAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
flagos-ai/FlagQuantum#718 ·
I maintainer di solito rispondono entro 1 giorno
-
bug CI-failure high priority
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
vllm-project/afd-plugin#483 ·
I maintainer di solito rispondono entro 1 giorno