Repository navigation
Open
Labels
Description
Describe the feature or problem you’d like to solve
Currently, gh attestation verify and gh attestation download requires the actual artifact (file or OCI image) to be present for verification.
This limitation makes it difficult to verify attestations in offline scenarios or when only the artifact's checksum is known.
Proposed solution
Add support for accepting SHA hashes directly as input to gh attestation verify, similar to how cosign verify-blob works. Users should be able to provide hashes in the format:
sha256:4f658c9258ba261019114afcf8cbc155ce1b9a1157d17cb1fc2e0a48d962d1d7sha512:abc123...
Additional context
I've implemented this feature. I'll send a pull request.
Example: Verify pinact_darwin_amd64.tar.gz (sha256:4f658c9258ba261019114afcf8cbc155ce1b9a1157d17cb1fc2e0a48d962d1d7) GitHub Release
Before: Checksums aren't supported.
$ gh version 2.83.2 (2025-12-10)
https://github.com/cli/cli/releases/tag/v2.83.2$ gh attestation verify sha256:4f658c9258ba261019114afcf8cbc155ce1b9a1157d17cb1fc2e0a48d962d1d7 \
-R suzuki-shunsuke/pinact \
--signer-workflow suzuki-shunsuke/go-release-workflow/.github/workflows/release.yaml
✗ Loading digest for sha256:4f658c9258ba261019114afcf8cbc155ce1b9a1157d17cb1fc2e0a48d962d1d7 failed
Error: failed to open local artifact: open sha256:4f658c9258ba261019114afcf8cbc155ce1b9a1157d17cb1fc2e0a48d962d1d7: no such file or directoryAfter:
$ gh attestation verify sha256:4f658c9258ba261019114afcf8cbc155ce1b9a1157d17cb1fc2e0a48d962d1d7 \
-R suzuki-shunsuke/pinact \
--signer-workflow suzuki-shunsuke/go-release-workflow/.github/workflows/release.yaml
Using provided digest sha256:4f658c9258ba261019114afcf8cbc155ce1b9a1157d17cb1fc2e0a48d962d1d7
Loaded 1 attestation from GitHub API
The following policy criteria will be enforced:
- Predicate type must match:................ https://slsa.dev/provenance/v1
- Source Repository Owner URI must match:... https://github.com/suzuki-shunsuke
- Source Repository URI must match:......... https://github.com/suzuki-shunsuke/pinact
- Subject Alternative Name must match regex: ^https://github.com/suzuki-shunsuke/go-release-workflow/.github/workflows/release.yaml
- OIDC Issuer must match:................... https://token.actions.githubusercontent.com
✓ Verification succeeded!
The following 1 attestation matched the policy criteria
- Attestation #1
- Build repo:..... suzuki-shunsuke/pinact
- Build workflow:. .github/workflows/release.yaml@refs/tags/v3.8.0
- Signer repo:.... suzuki-shunsuke/go-release-workflow
- Signer workflow: .github/workflows/release.yaml@4db55f2aeaca166b2655fa4a80658df1050dc203
Activity
github-actions commentedon Jan 11, 2026
Thank you for your issue! We have categorized it as a feature request, and it has been added to our backlog. In doing so, we are not committing to implementing this feature at this time, but, we will consider it for future releases based on community feedback and our own product roadmap.
Unless you see the help wantedContributions welcome
label, we are not currently looking for external contributions for this feature.
If you come across this issue and would like to see it implemented, please add a thumbs up! This will help us prioritize the feature. Please only comment if you have additional information or viewpoints to contribute.
suzuki-shunsuke commentedon Jan 11, 2026
[-]Support SHA hash input for `gh attestation verify` command[/-][+]Support SHA hash input for `gh attestation verify` and `gh attestation download` command[/+]suzuki-shunsuke commentedon Jan 11, 2026
Update: I found not only
gh attestation verifybut alsogh attestation downloadshould also support digest.I updated the issue and pull request.
BagToad commentedon Jan 12, 2026
@cli/package-security for visibility.
bdehamer commentedon Jan 26, 2026
Hi @suzuki-shunsuke, thank you for taking the time to open this issue and for the thoughtful PR! We really appreciate your contribution to the project.
We've discussed this feature internally, and while we understand the appeal of offline verification scenarios (and recognize that tools like
cosign verify-blob-attestationsupport this pattern), we've decided not to move forward with this feature at this time.Our primary concern is around the security implications of verifying raw digests. When you pass a file path to
gh attestation verify, the tool computes the digest and verifies that the attestation matches -- creating a tight binding between "the thing I verified" and "the thing I'm about to use."When accepting a raw digest, that binding is broken. It becomes very easy to end up in a situation where you verify one digest but actually use a different artifact. This is especially risky in automated pipelines where the digest might come from one source and the artifact from another, or where there's any opportunity for the values to drift apart.
This isn't to say we'll never support this. We may revisit it in the future if we can design appropriate guardrails that help users avoid these pitfalls. But for now, we want to err on the side of caution.
That said, we'd love to hear more about your specific use case! Understanding the real-world scenarios where this would be valuable could help us think about how to approach this more safely in the future.
suzuki-shunsuke commentedon Jan 26, 2026
Thank you for the explanation.
Let me explain our use case.
I'm a maintainer of the CLI Version Manager named
aqua.aqua supports verifying artifacts by
gh attestation verify.When verifying downloaded artifacts in CI using
gh attestation verify, there are several challenges:A practical solution to these issues is:
aqua-checksums.json)Digests can be obtained from files like checksums.txt or the GitHub Releases API without downloading large artifacts.
However, since
gh attestation verifyandgh attestation downloadcurrently cannot accept digests as arguments, downloading the artifact is still required.Supporting digest arguments would enable efficient verification in step 1.
aqua’s lock file,
aqua-checksums.json, is a file that stores checksums like the following.{ "checksums": [ { "id": "github_release/github.com/aquasecurity/trivy/v0.68.2/trivy_0.68.2_Linux-64bit.tar.gz", "checksum": "3D933BBC3685F95EC15280F620583D05D97EE3AFFB66944D14481D5D6D567064", "algorithm": "sha256" }, ... ] ]Because lock files are managed independently in the user’s environment, separate from remote artifacts, the risk of both being tampered with at the same time is low.
Even if assets in GitHub Releases were compromised, such issues can be detected using the lock file.
Lock files are a common security mechanism supported by many tools, not just aqua.
As a result, their benefits extend beyond aqua users and can also be enjoyed by users of other tools—or even by those who do not use such specialized tools at all.
Ultimately, many users will be able to benefit from the security provided by GitHub Artifact Attestations without sacrificing performance, being constrained by their execution environment, or struggling with flaky errors.
This, in turn, will promote wider adoption of GitHub Artifact Attestations and contribute to improving supply chain security across the ecosystem as a whole.
kommendorkapten commentedon Jan 27, 2026
Hi @suzuki-shunsuke
Can you please explain more about the verification step, and how Rekor is a potential source of problems? The Sigstore bundle (the attestation, certificate and other verification materials) do not depend on online access to Rekor. The bundle contains an inclusion proof from Rekor, which is verified offline, without requiring any access to Rekor.
Using the default flow with GitHub Artifact Attestations, and verifying with
gh, there should only be two network transactions (assuming the artifact to verify is already present).However, it may be possible to sign the
aqua-checksums.jsonfile if it's verified during an action workflow. Not sure if that would help you but it could be something to consider as it would potentially give you the extra layer of inversion?