Repository navigation
修复 Actions 输入安全、扫描范围绕过和报告脱敏 - #28
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修复 Actions 参数注入、Git C-quoted 路径处理、扫描范围 glob 绕过和跨规则报告脱敏。包含 inline-ignore 生效范围、hunk 文本边界与稳定 Git patch 输出修复。
Git 路径头改为线性扫描,消除 CodeQL 指出的正则回溯风险,并覆盖长路径、混合引号、空格与畸形输入。安全测试在运行时构造合成密钥与忽略标记,保持原有攻击样本和断言,避免独立扫描器误认测试源码;扫描规则、禁止 inline-ignore 及固定发布版扫描器均保留。扫描失败时也上传已生成的 SARIF。
验证(2026-11-14):本地 TypeScript 构建、83/83 测试、30/30 benchmark 通过。最终提交的 GitHub CI 在 Windows/Ubuntu × Node 20/22 全部通过,CodeQL 和 PatchBrake SARIF 检查均通过:https://github.com/RyanCoreAI/patchbrake/actions/runs/43546462626 。
工具仍是启发式 diff 扫描,不能保证发现所有密钥。脱敏内容变化可能影响 fingerprint,更新 baseline 前需复核。