FEAT: OWASP LLM10 cost amplification scenario with a token usage scorer
Maintainer antworten meist innerhalb von 2 Tagen
@ashwingadhave arbeitet bereits daran.
Seit 20.10.2026.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 35/100
Rechercherichtung
Start by reading the existing RedTeamingAttack scenarios, scorer implementations, and how OpenAI and LiteLLM targets store token usage in prompt_metadata. Then check how FloatScaleThresholdScorer handles objective results and how target responses expose length and turn counts. Done means a cost amplification scenario and scorer measure token use against a baseline, provide the described fallback estimate, and enforce the proposed run limits.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
There is no scenario for OWASP LLM10 (unbounded consumption) in PyRIT today, and no open issue or PR for it. OpenAI and LiteLLM targets already save token usage in prompt_metadata, but no scorer reads it.
This is a measured risk. Prompt-only attacks raise output tokens many times over (arXiv:2512.23779, arXiv:2607.25936), and DOW-BENCH (arXiv:2609.28585) shows the cost grows across turns in agents.
I would like to add a CostAmplification scenario built on RedTeamingAttack. The adversarial chat stays polite and on topic, but asks for exhaustive answers, keeps asking for clarification, or expands every reply. A new TokenAmplificationScorer compares total tokens with the baseline run for the same objective. It scales the ratio to 0 to 1 against a cap, and FloatScaleThresholdScorer turns that into the objective result. HTTPTarget and PlaywrightTarget do not save tokens, so the scorer falls back to response length and turn count and marks the score as an estimate.
A self-ask scorer cannot see token counts, so it can only guess.
I saw the concern about expensive runs in #2533. So the scenario would be off by default, stop at a hard token budget without changing target settings, and print the maximum spend before it runs.
Would this fit PyRIT? If yes, I will share an implementation plan first.
- Vorherrschende Sprache
- Python
- Sterne
- 4.6k
- Forks
- 962
- Ø Merge
- 2 T. 13 Std.
- Gemergte PRs (30 T.)
- 417
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microsoft/PyRIT
-
BUG: Overlapping scorer-evaluation globs duplicate CSVs and change accuracyEvtl. vergeben @its-amann hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
microsoft/PyRIT#3430 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
BUG: MarkdownInjectionScorer misses shortcut-reference images with path-based exfiltration, and raw HTML <img>Evtl. vergeben @aatif101 hat das vor 2 Tagen übernommen. OffenBug: triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
microsoft/PyRIT#3343 · 2 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 2 Tagen
-
BUG: OpenAITTSTarget accepts any speed, so an out-of-range value is only sent to the API on every requestEvtl. vergeben @ShivamSharma43 hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 25/100
Maintainer antworten meist innerhalb von 2 Tagen
-
BUG: KeywordSelectionStrategy accepts a negative context, so SelectiveTextConverter duplicates or truncates the promptEvtl. vergeben @ShivamSharma43 hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 35/100
Maintainer antworten meist innerhalb von 2 Tagen
-
BUG: PackageHallucinationScorer flags Rust std paths, type names and hyphenated crates as hallucinatedEvtl. vergeben @nniiovoo hat das heute übernommen. Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
Maintainer antworten meist innerhalb von 2 Tagen
Alle Issues in microsoft/PyRIT
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
developmentseed/titiler-cmr#250 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
[Bug]: IndexHandler.post crashes with HTTP 500 on malformed payloads, missing credentials, or when login is disabledEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 6 Tagen
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
cookiecutter/cookiecutter-django#6999 ·
Maintainer antworten meist innerhalb von 1 Tag
-
fix: @_helpers.positional raises TypeError when decorating functions without default argumentsEvtl. vergeben @codeXsidd hat das heute übernommen. Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
googleapis/google-api-python-client#2845 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Bump zizmor to 1.31.1+Offengithub_actions
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
collective/icalendar#2003 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag