Scenario objective previews can split supplementary Unicode during truncation
维护者通常 2 天内回复
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 82/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- frontend
调研方向
从 objectivePreview 辅助函数开始,它按 UTF-16 代码单元进行截断。先查看那里的截断位置,然后在指定的版本上运行聚焦测试 attackAttemptFormatting,观察索引 94 处孤立的高位代理项。完成的标准是:预览永远不会以未配对的代理项结尾,94 个 a 的用例显示省略号,且完整 emoji 的对照用例仍然通过。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
objectivePreview truncates JavaScript strings by UTF-16 code unit. If the boundary falls between the two code units of a supplementary Unicode character, the preview contains an unpaired surrogate. The scenario run table renders the corrupted preview. This is presentation-only; the test does not show that stored objectives are changed.
Steps/Code to Reproduce
const objective = `${'a'.repeat(94)}😀 trailing text`
const preview = objectivePreview(objective, 'seed-boundary')
Run the focused attackAttemptFormatting test at revision 01ce6ca66a315770b36c7dca1f320668c0d92d7c.
Expected Results
Truncate without splitting a Unicode scalar, for example 94 a characters followed by an ellipsis. No lone surrogate should appear in the preview.
Actual Results
The helper returns a string whose code unit at index 94 is 0xD83D, an unmatched high surrogate. JSON serialization shows \ud83d…; Jest renders it as �. A complete-emoji boundary control passes.
Screenshots
N/A. The exact returned string and code unit are asserted in the focused test.
Versions
Linux; Node 26.12.1; npm 11.20.0; Jest 30.5.2; frontend at revision 01ce6ca66a315770b36c7dca1f320668c0d92d7c. Pure TypeScript Jest run; no browser or backend.
- 主要语言
- Python
- 星标
- 4.7k
- 派生
- 1k
- 平均合并
- 2 天 3 小时
- 30 天内合并 PR
- 450
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/PyRIT 的其他 Issue
-
URLDataTypeSerializer treats mixed-case HTTP(S) schemes as local paths可能已有人在做 @akhil9tiet 今天认领。 未关闭Bug: triage help wanted
难度 2/5 1-3 小时 新手友好度 72/100
microsoft/PyRIT#3861 · 1 条评论 ·
维护者通常 2 天内回复
-
Parameter required status is lost after wire round-trip可能已有人在做 @its-amann 今天认领。 未关闭Bug: triage help wanted
难度 2/5 1-3 小时 新手友好度 72/100
microsoft/PyRIT#3854 · 1 条评论 ·
维护者通常 2 天内回复
-
BUG: LLMGenericTextConverter identifier changes between processes for set-valued template parameters未关闭Bug: triage
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 2 天内回复
-
BUG: SelfAskGeneral scorers leave their output keys out of the identifier可能已有人在做 @Hrushikesh-ramilla 于 1 天前认领。 未关闭Bug: triage
难度 2/5 1-3 小时 新手友好度 72/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 天内回复
相似的 Issue
-
bump patch
难度 2/5 1-3 小时 新手友好度 72/100
autowarefoundation/autoware_carla_scenario#1321 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 78/100
QuantConnect/Documentation#2838 ·
维护者通常 1 天内回复
-
get_all_subclasses must deduplicate by class identity可能已有人在做 @Gambit-Checkmate 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 15 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
awslabs/route53-dynamic-dns-with-lambda#67 · 1 条评论 ·