Judge-supplied metadata can override the stored score value; extraction and rendering trust quoted JSON and unfenced role lines
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 46/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- python
- 领域
- ai, security, testing-qa
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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):
-
Metadata override (fixed in the companion PR):
normalize_score_to_floatprefers a judge-suppliedoriginal_float_valuemetadata key over the validatedscore_value. A raw float-scale scorer with a judge body ofscore_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. -
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 wasTruewith 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. -
Transcript forgery (fixed in the companion PR):
ConversationScorer's unfenced{role}: {text}rendering lets a target reply forgeUser:/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.
- 主要语言
- Python
- 星标
- 4.6k
- 派生
- 962
- 平均合并
- 2 天 16 小时
- 30 天内合并 PR
- 354
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/PyRIT 的其他 Issue
-
BUG: label queries only return the final conversation of an attack可能已有人在做 @u7k4rs6 于 5 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
microsoft/PyRIT#3095 · 4 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
-
难度 3/5 1-2 天 新手友好度 72/100
microsoft/PyRIT#3325 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 4/5 3-5 天 新手友好度 53/100
维护者通常 2 天内回复
-
BUG: Tone, Tense, Translation, Noise, ScientificTranslation and Variation converter identifiers ignore a custom prompt_template可能已有人在做 @ShivamSharma43 今天认领。 未关闭
难度 3/5 1-2 天 新手友好度 20/100
维护者通常 2 天内回复
-
BUG: DenylistConverter and TransparencyAttackConverter identifiers ignore settings that change output可能已有人在做 @ShivamSharma43 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 35/100
维护者通常 2 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 79/100
SACGF/variantgrid#2341 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 2 天内回复
-
comp/cli P3 type/security
难度 2/5 1-3 小时 新手友好度 68/100
NousResearch/hermes-agent#141420 · 1 条评论 ·
维护者通常 1 天内回复
-
CKV_GCP_18 (GKEPublicControlPlane) passes when master_authorized_networks_config is absent, control plane is internet-reachable可能已有人在做 @Varshith-Kali 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
bridgecrewio/checkov#7753 ·
维护者通常 1 天内回复