Repository navigation
ci: replace SLSA generator with GitHub artifact attestations - #782
SoulPancake wants to merge 6 commits into
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The attestation configuration, verification constraints, and release dependencies are consistent, with no unresolved findings.
No open issues 🎉
What changed in this PR
Migrates release provenance from the SLSA generator to GitHub artifact attestations.
Changes:
- Attests release artifacts and Docker images within the release job.
- Retains
fga.intoto.jsonlfor Scorecard compatibility. - Replaces verification tools with
gh attestation verify, constrained to the workflow identity and source ref.
| File | Description |
|---|---|
.github/workflows/main.yaml |
Updates attestation generation, permissions, release dependencies, and verification. |
Review effort: Balanced
There was a problem hiding this comment.
Reviewed the workflow change, the actions/attest v4.2.2 source, and GoReleaser's upload behavior.
What checks out
- The
actions/attestSHA matches the v4.2.2 tag. checksums.txtlists the archives, SBOMs and Linux packages, so the binary attestation covers what we ship.docker.io/openfga/cliis the form the action docs ask for, and the action maps it to the right Docker Hub host and login.- Scorecard only looks at the
.intoto.jsonlfile name, so keeping that name keeps the score.
What needs work (in priority order)
- Nothing in CI checks the image attestation that gets pushed to Docker Hub. Please add the
--bundle-from-ocicheck. - The
fga.intoto.jsonlwe ship is no longer verified in CI. The old job checked it. Please bring that check back. - A failure in any new attest step now breaks
goreleaserre-runs. Consider a separateattestjob. fga.intoto.jsonlkeeps its name but changes format. People usingslsa-verifieror the old cosign command will break. Please call this out in the release notes.
Smaller items are inline.
Also: the --cert-identity value looks correct to me, but it will only get its first real check on the first release. That is one more reason to let verification block the undraft (see the inline note on undraft-release).
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe release workflow replaces SLSA provenance generation and verification with GitHub artifact attestations. It attests release artifacts and the Docker image, uploads an attestation bundle to the draft release, and verifies the artifacts and image. ChangesRelease attestations
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~15 minutes Change: Refactor Sequence Diagram(s)sequenceDiagram
participant ReleaseWorkflow
participant GitHubAttestationService
participant GitHubRelease
participant DockerRegistry
participant VerificationJobs
ReleaseWorkflow->>GitHubAttestationService: Attest release artifacts from dist/checksums.txt
GitHubAttestationService-->>ReleaseWorkflow: Return attestation bundle
ReleaseWorkflow->>GitHubRelease: Upload fga.intoto.jsonl
ReleaseWorkflow->>GitHubAttestationService: Attest published image digest
VerificationJobs->>GitHubAttestationService: Verify release artifact attestations
VerificationJobs->>GitHubAttestationService: Verify image attestation for digest and workflow identity
Suggested reviewers: Merge Risk: 🟡 Moderate · up to
|
|
All 7 review items are addressed. Two things to check before cutting the beta to test this: 1. Sync Betas are tagged on 2. A beta still publishes to Docker Hub and Homebrew, even if it stays a draft. GoReleaser runs before
Suggested fix in dockers_v2:
- tags:
- "{{ .Tag }}"
- '{{ if not .Prerelease }}latest{{ end }}'
- '{{ if not .Prerelease }}v{{ .Major }}{{ end }}'
- '{{ if not .Prerelease }}v{{ .Major }}.{{ .Minor }}{{ end }}'
# other fields unchanged
brews:
- name: "{{.ProjectName}}"
skip_upload: auto
# other fields unchanged
- name: "{{.ProjectName}}@{{.Version}}"
skip_upload: auto
# other fields unchanged
|
|
No so betas can be released from either of them ( main too ) and that is the norm too, we would only use develop when we might have something to release in main while we have something else or larger to release in beta without worrying about those. |
Yes that is the intention! |
Siddhant-K-code
left a comment
There was a problem hiding this comment.
Checked the prerelease change. Betas now push only their own Docker tag and skip both Homebrew formulas. Stable releases are unchanged. LGTM.
Siddhant-K-code
left a comment
There was a problem hiding this comment.
Checked the checksums.txt pinning. attest now fails if the draft copy differs from the build output, including when the digest is empty or the file is missing. GoReleaser does not rewrite checksums.txt after uploading it, so normal releases will pass this check. LGTM.

Closes #773
Replaces slsa-github-generator with GitHub artifact attestations (
actions/attest).goreleaserbuilds and uploads to the draft release, now without persisted git credentials or the Go cache.attestattests every file inchecksums.txtand the Docker image, pushes the image attestation to Docker Hub, and attaches the bundle asfga.intoto.jsonl.verify-binary-provenanceandverify-image-provenancecheck the attestation store, the attached bundle and the Docker Hub copy, with the signer pinned tomain.yamlat the release tag.undraft-releaseruns only after both pass..goreleaser.yaml, prereleases no longer move thelatest,vXandvX.YDocker tags or update the Homebrew formulas.Verification change
fga.intoto.jsonlkeeps its name for Scorecard, but is now a Sigstore bundle signed bymain.yaml. For new releases,slsa-verifierandcosign verify-attestationwith the slsa-github-generator identity no longer work. Use:The next release PR will add this note to the CHANGELOG.