ci: switch from SLSA provenance to actions/attest with subject-path#46
Open
ci: switch from SLSA provenance to actions/attest with subject-path#46
Conversation
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Contributor
|
@cursor review |
Since actions/attest@v4 stores attestations via GitHub's attestation API (not as release assets), repos that only use attestation don't need draft releases. Release-please can publish the release directly. Changes: - Remove draft:true from release-please-config.json - Remove create-tag job/steps (force-tag-creation handles this) - Remove publish-release job (release is published directly) - Remove publish_release input from manual workflows
force-tag-creation only operates in conjunction with draft releases. Since this repo does not use draft releases (attestation-only, no artifact uploads to the release), force-tag-creation is not needed.
The attest step was already guarded, but the checksums file generation was not. Now both steps are skipped during dry runs.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
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-only and documentation changes, no application code or tests modified.
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. The old SLSA provenance generator uploaded
.intoto.jsonlfiles as release assets (viaupload-assets: true), which would fail under immutable releases if the release was already published. Since this repo only uses attestation (no binary/artifact uploads to the release), draft releases are not needed —actions/attest@v4stores attestations via GitHub's attestation API, not as release assets.This PR makes the following changes:
SLSA →
actions/attest@v4withsubject-path(both workflows): Replaced the separaterelease-provenancejob (which usedslsa-framework/slsa-github-generatorwithupload-assets: true) with inlineactions/attest@v4steps in the build job. Attestation usessubject-path: 'dist/*'to reference built distribution files directly on disk, eliminating the previous base64 encode/decode round-trip throughsubject-checksums.Removed hash-related outputs and steps: The
package-hashesoutput and "Hash build files for provenance" step are removed from the composite build action (.github/actions/build/action.yml), and thepackage-hashesjob output is removed from workflows. No checksums file generation is needed sincesubject-pathreads artifacts directly.Removed orphaned job outputs (
release-please.yml): Therelease-createdandupload-tag-nameoutputs were only consumed by the now-removedrelease-provenancejob. They have been removed to avoid dead declarations.attestations: writepermission (both workflows): Added to the build job to supportactions/attest@v4.release-please-config.json: Cosmetic formatting only (array elements moved to separate lines). Nodraftorforce-tag-creationoptions are needed since this repo does not upload artifacts to the release.Dry-run guards on attestation (
manual-publish.yml): The attest step is gated onformat('{0}', inputs.dry_run) == 'false'to safely handle the boolean/string coercion difference betweenworkflow_dispatch(string) andworkflow_call(boolean) triggers.Updated
PROVENANCE.md: Rewrote verification instructions to usegh attestation verify ... --owner launchdarklyinstead ofslsa-verifierwith downloaded.intoto.jsonlfiles. Sample output follows the realgh attestation verifyoutput format including policy criteria and attestation details.Updated
README.md: Changed the provenance section heading and description from "SLSA framework" to "GitHub artifact attestations" with a link to GitHub's attestation docs.Describe alternatives you've considered
subject-checksumswith a checksums file (base64-decoded from the build action output). This was simplified tosubject-pathsince the built artifacts are always on disk in the same job and the base64 round-trip was inherited from the old SLSA generator pattern.force-tag-creationand apublish-releasejob. This was removed since this repo only uses attestation (not artifact uploads), so draft releases are unnecessary.taginput tomanual-publish.ymlfor org-wide consistency. This was removed since it had no consumers and its description referenced "draft release" which doesn't apply here.PROVENANCE.mdoriginally used-R launchdarkly/python-server-sdk-otelbut was changed to--owner launchdarklyto match real observed output.inputs.dry_run == false(bare boolean comparison), but this silently fails whenworkflow_callpasses a real boolean vs.workflow_dispatchpassing a string. Theformat('{0}', ...)pattern normalizes both to a string before comparison.Additional context
Human review checklist — things worth verifying:
subject-path: 'dist/*'glob correctly matches the output ofpoetry build(typically*.tar.gzand*.whl). Ifdist/is empty or missing at attest time, the step will fail.manual-publish.ymlhascontents: readwhilerelease-please.ymlhascontents: write. Verifyactions/attest@v4does not requirecontents: write— if it does, the manual publish workflow's attestation step will fail silently.format('{0}', inputs.dry_run) == 'false'to normalize boolean/string. Confirm this works for bothworkflow_dispatch(string'false') andworkflow_call(booleanfalse).release-please.yml, the attest step is gated onsteps.release.outputs.releases_created(plural). Verify this is the correct output name — release-please also emitsrelease_created(singular, for the root package). Both should work for a single-package repo, but confirm they are equivalent here..intoto.jsonlprovenance file that was previously uploaded as a release asset.release-createdorupload-tag-namejob outputs fromrelease-please.yml.PROVENANCE.mdsample output is representative (based on realgh attestation verifyoutput from another repo), not captured from an actual run of this repo. Verify it matches reality after the first attested release.Link to Devin session: https://app.devin.ai/sessions/7d5bda4d9dbe4ae0b950b30a50485e60
Requested by: @keelerm84
Note
Medium Risk
Release/publish workflows now generate provenance via
actions/attestand drop the separate SLSA generator job, so misconfiguration (permissions,dist/*glob, or dry-run gating) could impact publishing or provenance availability.Overview
Build provenance generation is migrated from the SLSA generator to GitHub Artifact Attestations. Both
manual-publish.ymlandrelease-please.ymldrop the separaterelease-provenancejob and instead runactions/attest@v4in the build job againstsubject-path: 'dist/*', addingattestations: writepermissions.The composite build action removes the
package-hashesoutput and thesha256sumhashing step, and the workflows remove related job outputs and switch dry-run checks toformat('{0}', inputs.dry_run) == 'false'.Docs in
PROVENANCE.mdare updated to verify provenance viagh attestation verify(no.intoto.jsonldownload), andrelease-please-config.jsonis reformatted only.Written by Cursor Bugbot for commit 9f48de6. This will update automatically on new commits. Configure here.