Skip to content

Add verify-signature plumbing and Temurin verification support#1060

Open
johnoliver wants to merge 3 commits into
actions:mainfrom
johnoliver:signature-4
Open

Add verify-signature plumbing and Temurin verification support#1060
johnoliver wants to merge 3 commits into
actions:mainfrom
johnoliver:signature-4

Conversation

@johnoliver

Copy link
Copy Markdown
Contributor

This pull request introduces support for signature verification of downloaded Java packages from the Temurin distribution. It adds a new option to enable signature verification, updates the documentation to reflect this feature, and extends the test data and CI workflows to validate this functionality.

Key changes:

Feature: Signature Verification for Temurin

  • Added a new verify-signature option to enable signature verification for Java packages when using the Temurin distribution. If enabled for unsupported distributions, the action will fail. (README.md)

Continuous Integration / Testing

  • Introduced a new CI job (setup-java-temurin-signature-verification) that runs signature verification tests for Temurin Java versions 17 and 21 across major operating systems. (.github/workflows/e2e-versions.yml)

Test Data Updates

Related issue:
Add link to the related issue.

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

Copilot AI review requested due to automatic review settings June 24, 2026 10:51
@johnoliver johnoliver requested a review from a team as a code owner June 24, 2026 10:51

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.

Pull request overview

This pull request adds optional GPG signature verification for downloaded Temurin JDK archives in actions/setup-java, including new action inputs, Temurin manifest plumbing for signature URLs, and CI/tests to validate the behavior.

Changes:

  • Add verify-signature (and public-key override plumbing) to installer options and enforce “unsupported distribution” failures centrally in JavaBase.
  • Implement Temurin signature verification using a bundled Adoptium public key (with an optional user-provided override key) and new signature_link manifest support.
  • Extend unit tests, Temurin test manifest data, and E2E workflow coverage to exercise signature verification.

Reviewed changes

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

Show a summary per file
File Description
src/setup-java.ts Reads new inputs and forwards signature-verification options into installer configuration.
src/gpg.ts Adds verifyPackageSignature() helper that downloads a detached signature and verifies it via gpg.
src/distributions/temurin/models.ts Extends Temurin manifest typing with optional signature_link.
src/distributions/temurin/installer.ts Plumbs signatureUrl into releases and performs verification when enabled; declares Temurin supports verification.
src/distributions/temurin/adoptium-key.ts Adds bundled Adoptium ASCII-armored public key for default verification.
src/distributions/base-models.ts Extends installer options and download release model with signature-related fields.
src/distributions/base-installer.ts Adds centralized guard to fail when verification is enabled for unsupported distributions.
src/constants.ts Adds new input name constants for signature verification.
README.md Documents the new verify-signature input (but currently misses the public-key override input).
action.yml Adds new action inputs verify-signature and verify-signature-public-key.
.github/workflows/e2e-versions.yml Adds an E2E job matrix to validate Temurin signature verification across OSes and JDK versions.
tests/gpg.test.ts Adds unit coverage for verifyPackageSignature() behavior.
tests/distributors/temurin-installer.test.ts Adds unit coverage for Temurin verification flow and key override behavior.
tests/distributors/base-installer.test.ts Adds unit coverage ensuring unsupported distributions fail when verification is enabled.
tests/data/temurin.json Adds signature_link fields to Temurin test data entries for verification tests.
dist/setup/index.js Updates bundled build output to include new inputs and verification logic.
dist/cleanup/index.js Updates bundled build output to include new constants and GPG helper.

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

Comment thread src/gpg.ts
Comment thread README.md
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

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.

Pull request overview

Copilot reviewed 15 out of 17 changed files in this pull request and generated 1 comment.

Comment thread README.md
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

3 participants