Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

BUG SelfAskScaleScorer crashes on an out-of-range judge score instead of retrying

未关闭 适合新手
#2,809 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
82/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
python
领域
security

调研方向

从 SelfAskScaleScorer、SelfAskGeneralFloatScaleScorer 以及 TrueFalseResponseHandler 旁边的 response-handler 实现开始。跟踪解析后的分数在哪里进入 Score 构造,然后验证超出范围的 judge 值会在重试路径中得到处理,而有效值会正常继续执行。

由索引模型根据 Issue 内容生成。

描述

On the default TAP 1–10 scale, if the judge answers 0 or 11, SelfAskScaleScorer fails after one call instead of retrying:

RuntimeError: Error in scorer SelfAskScaleScorer: ... Float scale scorers must have a score value between 0 and 1. Got -0.1111111111111111

The response handler only checks that the value is a finite float. The range check happens later, when the Score is built, which is outside the JSON retry. So one sloppy answer ends the attack, and this is the default scorer for TAP and Crescendo. SelfAskGeneralFloatScaleScorer has the same problem. Likert and the true/false scorers already validate their score domain inside the parser, so a bad value there just gets retried.

Suggested fix: a small NumericRangeResponseHandler wrapper next to TrueFalseResponseHandler, used by both scale scorers.

主要语言
Python
星标
4.5k
派生
896
平均合并
3 天 8 小时
30 天内合并 PR
191

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/PyRIT 的其他 Issue

查看 microsoft/PyRIT 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。