Markdown report does not escape bare URLs, so GitHub renders them as links
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 82/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- github-actions, go
调研方向
从 internal/report/markdown.go:145-157 及其契约注释开始,然后检查 mdInline 的报告测试和 golden 文件。为 https://、http:// 和 www. 输入添加覆盖,并更新受影响的 golden 文件。这些输入不再渲染为自动链接且测试通过后,即算完成。
由索引模型根据 Issue 内容生成。
描述
Summary
The markdown renderer escapes markdown punctuation but leaves www., http:// and https:// intact, and GitHub-flavored Markdown turns those into links. The renderer's own contract is that text from the target is never written raw.
Where
internal/report/markdown.go:8(contract comment)internal/report/markdown.go:145-157(mdInline)internal/report/doc.go:229,internal/engine/run.go:535(notes with target paths)action.yml:264(report appended to the job summary)
Details
The escaped set covers \, backtick, *, _, brackets, angle brackets, |, #, ~, !, &, $ and @. None of ., : or / is escaped, so GFM extended autolinks still match. No test in internal/report mentions autolinks. Checked against the GFM specification, not in a browser.
Impact
A file name, finding title or note taken from scanned content can appear as a clickable link in the markdown report and in the job summary. No markup or script is involved; the effect is limited to links.
Steps to reproduce
- Commit a file larger than 1 MiB named
www.example.organd runspackle scan . --format markdown. - The report contains a "Not read: www.example.org" note, which GitHub renders with the name as a link.
Suggested fix
In mdInline, break the autolink triggers: write www\. for a www. at a word start and \: for the colon of :// (a backslash before ASCII punctuation is dropped by the renderer and stops the autolink match).
Acceptance criteria
- A test with
https://,http://andwww.inputs asserts the output does not autolink - Golden files are updated and the diff is explained
Related: #45, #129
Getting started
- Relevant files: action.yml, internal/report/doc.go, internal/report/markdown.go
- How to run tests:
make test-short(Unix) or.\make.ps1 test-short(Windows PowerShell);make lintbefore you call it done - Related docs: CONTRIBUTING.md, docs/ARCHITECTURE.md
Filed by repo-audit/full-audit at 50e92ec. Severity: low. Effort: S. audit-key: bug|internal/report/markdown.go|mdInline
- 主要语言
- Go
- 星标
- 0
- 派生
- 1
- 平均合并
- 8 小时 14 分钟
- 30 天内合并 PR
- 3
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TMHSDigital/Spackle 的其他 Issue
-
ci good first issue severity: low
难度 2/5 1-3 小时 新手友好度 77/100
TMHSDigital/Spackle#206 ·
维护者通常 1 天内回复
-
ci severity: low
难度 2/5 1-3 小时 新手友好度 78/100
TMHSDigital/Spackle#205 ·
维护者通常 1 天内回复
-
bug good first issue severity: low
难度 2/5 1-3 小时 新手友好度 87/100
TMHSDigital/Spackle#195 ·
维护者通常 1 天内回复
-
documentation good first issue severity: medium
难度 1/5 1 小时以内 新手友好度 90/100
TMHSDigital/Spackle#188 ·
维护者通常 1 天内回复
-
documentation good first issue severity: medium
难度 2/5 1-3 小时 新手友好度 84/100
TMHSDigital/Spackle#187 ·
维护者通常 1 天内回复
查看 TMHSDigital/Spackle 的全部 Issue
相似的 Issue
-
bug effort:s impact:med raised-by:worker risk:low to:worker
难度 2/5 1-3 小时 新手友好度 78/100
medici-finance/assay#8120 · 1 条评论 ·
维护者通常 1 天内回复
-
factory:subtask
难度 1/5 1 小时以内 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
agent-substrate/substrate#4308 ·
维护者通常 2 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
celestiaorg/celestia-app#8877 ·
维护者通常 1 天内回复
-
sweep
难度 1/5 1 小时以内 新手友好度 84/100
bketelsen/truenas-mcp#112 ·
维护者通常 1 天内回复