Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Judge-supplied metadata can override the stored score value; extraction and rendering trust quoted JSON and unfenced role lines

Abierto
#3,323 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
46/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python

Línea de trabajo

Start with the scorer paths named in the issue: normalize_score_to_float, ConversationScorer, and the sibling metadata stripping in true_false_score_aggregator.py and true_false_inverter_scorer.py. Review the JSON handling precedent in decision_scorer.py and the existing retry boundary, then reproduce each reported case with mocked LLM transport. Done means quoted JSON and forged role lines cannot alter the verdict, and metadata cannot override the validated score.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Judge-supplied metadata can override the stored score value; extraction and rendering trust quoted JSON and unfenced role lines

Summary

Three verdict-integrity defects in the scorer stack, each demonstrated end to end against real scorers (LLM transport mocked, everything else real):

  1. Metadata override (fixed in the companion PR): normalize_score_to_float prefers a judge-supplied original_float_value metadata key over the validated score_value. A raw float-scale scorer with a judge body of score_value: "0.0" + metadata: {"original_float_value": "1.0"} stores 0.0 while every consumer computes 1.0, and a 7.5 escapes [0,1]. TAP's success gate and Crescendo's feedback prompt consume the raw float.

  2. Earliest-JSON-wins extraction (fixed in the companion PR): a judge reply quoting a target-embedded JSON object before its own verdict has the decoy parsed as the verdict. Repro: judge authored score_value: false, persisted Score was True with the attacker's rationale verbatim. No injection needed. Eleven judge prompts instruct JSON but none forbid quoting, and the refusal prompts' few-shot rationales quote the reply.

  3. Transcript forgery (fixed in the companion PR): ConversationScorer's unfenced {role}: {text} rendering lets a target reply forge User:/Assistant: turns in the judge's view. Control refusal scored False. The same conversation with two embedded role lines scored True.

Context

The judged text is by design the adversary's output (the tool exists to grade hostile content), so the structural defenses (parse-time key strip, ambiguity rejection, turn fencing) carry the load that prompt-level instructions cannot. Each fix follows an in-repo precedent: the sibling metadata strips (true_false_score_aggregator.py:153, true_false_inverter_scorer.py:132), the decision scorer's JSON-encoding of target text (decision_scorer.py:208-236), and the existing retry boundary.

Repros available on request. Each is self-contained and exits 0 with the exploit confirmed at HEAD and blocked on the fix branches.

Lenguaje dominante
Python
Estrellas
4.6k
Forks
962
Merge medio
2 d 15 h
PR fusionados (30 d)
398

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de microsoft/PyRIT

Todos los issues de microsoft/PyRIT

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.