FEAT: OWASP LLM10 cost amplification scenario with a token usage scorer
Mantenedores costumam responder em até 2 dias
@ashwingadhave já está trabalhando nisso.
Desde 20/10/2026.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 35/100
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Python
- Estrelas
- 4.6k
- Forks
- 962
- Merge médio
- 2d 15h
- PRs com merge (30d)
- 398
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Sem guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de microsoft/PyRIT
-
BUG: Overlapping scorer-evaluation globs duplicate CSVs and change accuracyTalvez já em andamento @its-amann assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
microsoft/PyRIT#3430 · 1 comentário ·
Mantenedores costumam responder em até 2 dias
-
BUG: MarkdownInjectionScorer misses shortcut-reference images with path-based exfiltration, and raw HTML <img>Talvez já em andamento @aatif101 assumiu há 1 dia. AbertaBug: triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
microsoft/PyRIT#3343 · 2 comentários · 1 responsável ·
Mantenedores costumam responder em até 2 dias
-
BUG: OpenAITTSTarget accepts any speed, so an out-of-range value is only sent to the API on every requestTalvez já em andamento @ShivamSharma43 assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 25/100
Mantenedores costumam responder em até 2 dias
-
BUG: KeywordSelectionStrategy accepts a negative context, so SelectiveTextConverter duplicates or truncates the promptTalvez já em andamento @ShivamSharma43 assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 35/100
Mantenedores costumam responder em até 2 dias
-
BUG: PackageHallucinationScorer flags Rust std paths, type names and hyphenated crates as hallucinatedTalvez já em andamento @nniiovoo assumiu hoje. Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 35/100
Mantenedores costumam responder em até 2 dias
Todas as issues de microsoft/PyRIT
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
-
[Bug]: Queen's own Ollama model loses num_ctx when a running session switches to itTalvez já em andamento @anasamin26 assumiu hoje. Abertabug enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
aden-hive/hive#7508 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
llm translation
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
BerriAI/litellm#47884 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
bug 🐛
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
netalertx/NetAlertX#1856 · 1 reação ·
Mantenedores costumam responder em até 1 dia