Skip to content

feat(attestation): support direct digest input for verify and download commands - #12463

Closed
suzuki-shunsuke wants to merge 9 commits into
cli:trunkfrom
szksh-lab-2:feature/attestation-verify-digest-input
Closed

suzuki-shunsuke wants to merge 9 commits into
cli:trunkfrom
szksh-lab-2:feature/attestation-verify-digest-input

Conversation

@suzuki-shunsuke

@suzuki-shunsuke suzuki-shunsuke commented Jan 11, 2026 •

Copy link
Copy Markdown

Fixes #12462

Add support for accepting pre-computed checksums (sha256: or sha512:) as input to gh attestation verify and gh attestation download, similar to cosign verify-blob. This allows verification without downloading large artifacts when the digest is already known.

Add support for accepting pre-computed checksums (sha256:<digest> or
sha512:<digest>) as input to `gh attestation verify`, similar to
`cosign verify-blob`. This allows verification without downloading
large artifacts when the digest is already known.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@suzuki-shunsuke
suzuki-shunsuke marked this pull request as ready for review January 11, 2026 00:41
@suzuki-shunsuke
suzuki-shunsuke requested a review from a team as a code owner January 11, 2026 00:41
Copilot AI review requested due to automatic review settings January 11, 2026 00:41
@cliAutomation cliAutomation added the external pull request originating outside of the CLI core team label Jan 11, 2026

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 support for accepting pre-computed checksums (sha256: or sha512:) as direct input to the gh attestation verify command, similar to cosign's verify-blob functionality. This allows users to verify artifacts without downloading them when the digest is already known.

Changes:

  • Added support for digest reference format (sha256: and sha512:) in the verify command
  • Implemented parsing and validation logic for digest references
  • Updated logging to distinguish between loaded and provided digests

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
pkg/cmd/attestation/verify/verify.go Updated command usage documentation and added conditional logging for digest-only input
pkg/cmd/attestation/artifact/artifact.go Added digestArtifactType, implemented parseDigestReference function, and updated artifact creation logic to handle digest references
pkg/cmd/attestation/artifact/artifact_posix_test.go Added comprehensive test coverage for digest reference normalization and parsing

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

Add support for accepting pre-computed checksums (sha256:<digest> or
sha512:<digest>) as input to `gh attestation download`, matching the
functionality added to the verify command.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@suzuki-shunsuke suzuki-shunsuke changed the title feat(attestation): support direct digest input for verify command feat(attestation): support direct digest input for verify and download commands Jan 11, 2026
@BagToad

BagToad commented Jan 26, 2026

Copy link
Copy Markdown
Member

Closing due to #12462 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external pull request originating outside of the CLI core team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support SHA hash input for gh attestation verify and gh attestation download command

4 participants