ci: switch from SLSA provenance to actions/attest; update provenance docs#289
Merged
ci: switch from SLSA provenance to actions/attest; update provenance docs#289
Conversation
louis-launchdarkly
approved these changes
Jul 12, 2024
kinyoklion
approved these changes
Jul 12, 2024
EvaluationDetail.reason
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requirements
N/A — CI and documentation-only changes, no application code or tests affected.
Related issues
Supports the org-wide migration to immutable GitHub releases. Reference implementation:
launchdarkly/ld-relay.Describe the solution you've provided
GitHub's immutable releases feature prevents modifying a release after it is published. This repo only uses attestation (no binary/artifact uploads to the release), so draft releases are not needed —
actions/attest@v4stores attestations via GitHub's attestation API rather than as release assets.Changes:
SLSA →
actions/attest@v4withsubject-path(both workflows): Replaced the separaterelease-provenancejob (which usedslsa-framework/slsa-github-generatorwithupload-assets: true) with inlineactions/attest@v4steps. Attestation usessubject-pathto reference the gem file directly on disk, eliminating the base64 encode/decode hash round-trip entirely.Removed hash outputs from composite action: The
gem-hashesoutput and hash computation step were removed from.github/actions/publish/action.ymlsincesubject-pathreads files directly.Removed dead
tag_nameoutput fromrelease-please.yml— no longer consumed after therelease-provenancejob was removed.Dry-run guard: Attestation steps use
format('{0}', inputs.dry_run) == 'false'to safely handle the boolean/string mismatch betweenworkflow_call(boolean) andworkflow_dispatch(string) triggers.PROVENANCE.md: Rewrote to usegh attestation verify ... --owner launchdarklyinstead ofslsa-verifier. Sample output follows the realgh attestation verifyformat including policy criteria and attestation details.README.md: Updated provenance section heading and description to reference GitHub artifact attestations instead of SLSA framework.Describe alternatives you've considered
publish-releasejob: Unnecessary sinceactions/attest@v4does not upload assets to the GitHub release.subject-checksumswith base64 round-trip: Worked but was unnecessarily complex.subject-pathis simpler since the gem is on disk in the same job.-R launchdarkly/ruby-server-sdkin verify command: Chose--owner launchdarklyfor consistency across all SDK repos.Additional context
Items for human review
subject-pathglob (launchdarkly-server-sdk-*.gem) matches the gem file produced bygem buildin the composite action, and that the file is in the expected working directory when the attest step runs.format('{0}', inputs.dry_run) == 'false'— confirm this correctly handles both boolean and string inputs across trigger types.PROVENANCE.mdsample output is representative (based on real output from ld-relay), not captured from this repo. Verify after first attested release..intoto.jsonlrelease asset or the removedtag_namejob output.Link to Devin session: https://app.devin.ai/sessions/7d5bda4d9dbe4ae0b950b30a50485e60
Requested by: @keelerm84