Visitar URL original
Fix JetBrains Runtime hotfix version selection by Copilot · Pull Request #1321 · actions/setup-java · GitHub
Skip to content

Fix JetBrains Runtime hotfix version selection - #1321

Open
brunoborges with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-vulnerable-jbr-25-selection
Open

brunoborges with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-vulnerable-jbr-25-selection

Conversation

Copilot AI commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Description:
Four-component JBR versions were rejected as invalid SemVer, causing java-version: '25' to select vulnerable 25.0.4+508.27 instead of patched 25.0.4.1+635.79.

  • Normalization: Convert hotfix versions to SemVer-compatible metadata while preserving archive and checksum URLs.
  • Precedence: Compare Java patch fields before JBR build numbers for both remote selection and cache lookup.
  • Matching: Support patch-only and exact-build requests while preserving early-access separation.

Related issue:
Linked automatically.

Check list:

  • Ran npm run check locally (format, lint, build, test) and all checks pass.
  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

Copilot AI linked an issue Nov 11, 2026 that may be closed by this pull request
4 of 5 tasks
Copilot AI changed the title [WIP] Fix vulnerable JBR 25 version selection in setup-java Fix JetBrains Runtime hotfix version selection Nov 11, 2026
Copilot AI requested a review from brunoborges November 11, 2026 04:26
@brunoborges
brunoborges marked this pull request as ready for review November 13, 2026 02:36
@brunoborges
brunoborges requested a review from a team as a code owner November 13, 2026 02:36
Copilot AI balanced review requested due to automatic review settings November 13, 2026 02:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues remain for the JetBrains Runtime hotfix-selection update.

No open issues 🎉

What changed in this PR

Fixes JetBrains Runtime hotfix selection so requests such as java-version: '25' prefer patched releases like 25.0.4.1+635.79, addressing issue #1317.

Changes:

  • Normalizes hotfix versions while preserving archive and checksum URLs.
  • Prioritizes Java patch fields before JBR build numbers for downloads and cache lookup.
  • Adds coverage for patch-only and exact-build requests, early-access separation, and cached hotfix selection.
File Description
src/​distributions/​jetbrains/​installer.ts Adds hotfix normalization, matching, and version ordering.
dist/​setup/​282.index.js Updates the bundled action with the installer changes.
tests/​distributors/​jetbrains-installer.test.ts Adds hotfix selection, comparison, and cache regression tests.

Review effort: Balanced

This branch has not been deployed

No deployments
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.

A vulnerable JBR 25 version is selected

4 participants