Skip to content

ci: publish build provenance attestations for release artifacts - #2271

Merged
TerryHowe merged 2 commits into
oras-project:mainfrom
Xerox563:release-attestations
Oct 23, 2026
Merged

TerryHowe merged 2 commits into
oras-project:mainfrom
Xerox563:release-attestations

Conversation

@Xerox563

Copy link
Copy Markdown
Contributor

Fixes #2269

This publishes GitHub artifact attestations (SLSA build provenance) for the release archives and the checksums file, as described in option A of #2006. GPG signing is unchanged.

Release workflow (release-github.yml)

  • Adds id-token: write and attestations: write to the goreleaser job.
  • After goreleaser, attests dist/*.tar.gz, dist/*.zip and dist/*_checksums.txt with actions/attest-build-provenance, pinned to the v4.2.2 commit SHA.

Release script (scripts/release.sh)

  • validate checks that gh attestation verify is available, then runs it on every archive and the checksums file in _dist/ after the checksum check. It fails if any of them has no valid attestation.
  • publish adds the gh attestation verify example to the Verification section of the release notes, next to the GPG instructions, and mentions gh attestation download and cosign verify-blob-attestation.

Docs (RELEASING.md)

  • Prerequisites: gh v2.49.0 or later, the first version with gh attestation.
  • Updated the validate and publish steps.
  • Added a "Verifying release artifacts" section for users that covers GPG with KEYS and gh attestation verify.

Testing

  • actionlint passes on the workflow, and bash -n and shellcheck show no new findings in release.sh.
  • Checked that gh attestation verify exits 0 for an attested release archive (cli/cli) and non-zero for a file without an attestation, which is what makes validate stop.
  • Rendered the new release notes text to check the formatting.
  • The attestation step itself only runs on a tag push, so it still needs a pre-release tag to confirm end to end.

Releases were only signed with GPG, so users who verify downloads with
sigstore tooling could not verify ORAS.

The release workflow now attests the archives and the checksums file with
actions/attest-build-provenance. The GPG signing stays as it is.
scripts/release.sh validate checks the attestation of every archive and
fails if one is missing, and publish adds the gh attestation verify steps
to the release notes. RELEASING.md describes the new steps and how users
can verify a download.

Fixes oras-project#2269

Signed-off-by: Amit Gangwar <[email protected]>
Comment thread scripts/release.sh Resolved
Comment thread RELEASING.md Resolved
Verify attestations against release-github.yml and the release tag,
and reject ones built on self-hosted runners. --source-ref needs gh
v2.68.0, so check for it and raise the documented minimum.

Signed-off-by: Amit Gangwar <[email protected]>

@TerryHowe TerryHowe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@codecov

codecov Bot commented Oct 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.81%. Comparing base (ed26899) to head (48ca09d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2271   +/-   ##
=======================================
  Coverage   60.81%   60.81%           
=======================================
  Files         140      140           
  Lines        6091     6091           
=======================================
  Hits         3704     3704           
  Misses       2166     2166           
  Partials      221      221           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TerryHowe
TerryHowe merged commit 5236ba2 into oras-project:main Oct 23, 2026
10 checks passed
TerryHowe pushed a commit to oras-project/oras-www that referenced this pull request Nov 11, 2026
## Summary

ORAS CLI
[v1.3.6](https://github.com/oras-project/oras/releases/tag/v1.3.6) was
released on 2026-10-24, but the 1.3 docs and the home page still point
at v1.3.5. This PR covers the oras-www checklist in the post-release
tasks of the oras `RELEASING.md` (oras-project/oras#2286).

- map `1.3` to `1.3.6` in `versions-map`. `npm run refresh-commands`
against the v1.3.6 binary leaves the command pages unchanged, because
the help text is the same as in v1.3.5
- update every pinned version on the installation page (download
snippets, `go install`, the `ghcr.io/oras-project/oras` image and the
`doras` alias) and the sample `oras version` output, taken from the
v1.3.6 release binary
- fix the Go version required for `go install`: the page said 1.24, but
every 1.3 release has needed a newer Go, and v1.3.6's `go.mod` requires
Go 1.26.7
- update the home page Linux install snippet to v1.3.6
- update the binary verification guide example to v1.3.6. The `gpg
--verify` output now shows the v1.3.6 signature time; before, it still
showed the v1.3.4 one
- add a "Verifying build provenance" section to the verification guide.
Starting with v1.3.6, release archives and the checksums file have
GitHub artifact attestations (oras-project/oras#2271), which were not
documented anywhere on the site. The section shows `gh attestation
verify` with real output and how to pin the release tag with
`--source-ref`

No blog post, since one is optional for a patch release.

## Validation

- downloaded the v1.3.6 release assets and ran each documented command
for real: `gpg --verify` on the checksums file and the archive,
`sha256sum --ignore-missing -c`, `oras version`, and `gh attestation
verify` (with and without `--source-ref`). The output in the docs comes
from those runs
- `gh attestation verify` succeeds for all 12 release archives and the
checksums file. It fails for v1.3.5 files (no attestation) and when
`--source-ref` names a different tag
- `ghcr.io/oras-project/oras:v1.3.6` exists
- `npm run refresh-commands`: no changes under `versioned_docs`
- `npm test` (30 passed), `npm run check-links`, `docusaurus build` (the
new `#verifying-build-provenance` anchor resolves)
- `vale` on the changed pages: 0 errors, 0 warnings

Signed-off-by: NopeCharon <[email protected]>
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.

ci: publish GitHub artifact attestations for release artifacts

2 participants