HTML scenario export replaces an intentionally empty converted message with the original text
维护者通常 2 天内回复
评估
调研方向
阅读 pyrit/output/scenario_result/html.py 第 107–112 行附近的代码,了解 HTML 导出如何在转换后的值和原始值之间进行选择。在现有导出测试旁,添加针对带有 converted_value='' 的原始文本值的 HTML 集成测试。完成标准是:HTML 记录保留显式为空的转换后值,而不是显示原始文本。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
The HTML scenario report uses truthiness to choose converted content, so an intentional empty conversion is displayed as the original input and the export misrepresents what was sent.
Steps/Code to Reproduce
Build a scenario result containing original text ORIGINAL_WAS_REMOVED and converted_value='', then export HTML.
Expected Results
Render the explicit empty converted value. If original text is shown for comparison, label it separately.
Actual Results
Memory and JSON preserve converted_value='', but HTML transcript renders <div class="piece">ORIGINAL_WAS_REMOVED</div> because both text and media branches use converted_value or original_value.
Verified source reference: HTML scenario export.
Proposed fix/regression: fallback only for None/missing values; add HTML integration coverage for original text plus explicit empty converted text.
Screenshots
Not applicable; rendered snippet is inline.
Versions
Tested commit d3446e045960b5ebee4641aa70fdeb03af186587, PyRIT 1.2.0.dev0, offline real SQLite/export fixtures; no live inference or Azure SQL. Evidence: files/evidence/round7/full-report.html and export-inconsistencies.json; local paths are not attachments.
- 主要语言
- Python
- 星标
- 4.7k
- 派生
- 1k
- 平均合并
- 2 天 3 小时
- 30 天内合并 PR
- 450
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/PyRIT 的其他 Issue
-
BUG: LLMGenericTextConverter identifier changes between processes for set-valued template parameters未关闭Bug: triage
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 2 天内回复
-
Bug: triage
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 2 天内回复
-
Description-only preset edits split comma-containing exact goals into separate goals可能已有人在做 @MRX-72 于 2 天前认领。 未关闭help wanted
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 2 天内回复
-
GUI rejects valid empty-string SearchReplaceConverter settings, preventing deletion converters可能已有人在做 @Darshika140 于 1 天前认领。 未关闭help wanted
难度 2/5 1-3 小时 新手友好度 76/100
microsoft/PyRIT#3749 · 3 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
-
ReferenceField has no component tests and only 42.4% line coverage可能已有人在做 @ppcvote 今天认领。 未关闭help wanted
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 2 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
microsoft/markitdown#2820 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
yt-project/yt#5624 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
NousResearch/hermes-agent#148376 ·
维护者通常 1 天内回复