Skip to content

Fix broken kernel.org commit links#16381

Open
YukiCodepth wants to merge 2 commits into
canonical:mainfrom
YukiCodepth:fix-kernel-links
Open

Fix broken kernel.org commit links#16381
YukiCodepth wants to merge 2 commits into
canonical:mainfrom
YukiCodepth:fix-kernel-links

Conversation

@YukiCodepth
Copy link
Copy Markdown

Summary

Fixes broken git.kernel.org links generated for CVE pages.

Changes

  • Strip version suffixes like (7.0-rc7) from commit hashes before generating kernel.org URLs
  • Prevent invalid URLs caused by extra version text appended to commit hashes

Verification

Verified that URLs generated without the version suffix open the correct kernel.org commit page instead of returning "No repositories found".

Fixes #16333

Copilot AI review requested due to automatic review settings May 25, 2026 05:21
@webteam-app
Copy link
Copy Markdown

YukiCodepth is not a collaborator of the repo

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates CVE patch-details rendering to handle kernel commit metadata strings that may include extra trailing text, ensuring generated links point to the correct commit.

Changes:

  • Extract the first whitespace-delimited token from patch.content.introduced and patch.content.fixed when building git.kernel.org links.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread templates/security/cves/cve.html Outdated
@YukiCodepth YukiCodepth requested a review from Copilot May 26, 2026 19:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment on lines +441 to +443
<a href="https://git.kernel.org/linus/{{ patch.content.introduced.split()[0] }}">{{ patch.content.introduced[:7] }}</a>,
fixed by
<a href="https://git.kernel.org/linus/{{ patch.content.fixed }}">{{ patch.content.fixed[:7] }}</a>
<a href="https://git.kernel.org/linus/{{ patch.content.fixed.split()[0] }}">{{ patch.content.fixed[:7] }}</a>
Comment on lines +441 to +443
<a href="https://git.kernel.org/linus/{{ patch.content.introduced.split()[0] }}">{{ patch.content.introduced[:7] }}</a>,
fixed by
<a href="https://git.kernel.org/linus/{{ patch.content.fixed }}">{{ patch.content.fixed[:7] }}</a>
<a href="https://git.kernel.org/linus/{{ patch.content.fixed.split()[0] }}">{{ patch.content.fixed[:7] }}</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CVE-2026-31431: the git.kernel.org link is broken

3 participants