ci: switch from SLSA provenance to actions/attest with subject-path#118
ci: switch from SLSA provenance to actions/attest with subject-path#118
Conversation
🤖 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:
|
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.
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.
| needs: ['release-please'] | ||
| permissions: | ||
| id-token: write # Needed for OIDC to get release secrets from AWS. | ||
| attestations: write # Needed for actions/attest. |
There was a problem hiding this comment.
Unused tag-name outputs left after provenance job removal
Low Severity
The four *-tag-name outputs in the release-please job (package-server-ai-tag-name, package-server-ai-langchain-tag-name, package-server-ai-openai-tag-name, package-server-ai-optimization-tag-name) are now dead code. Their only consumers were the *-provenance jobs (e.g., release-server-ai-provenance) which used them for upload-tag-name, and those jobs were all removed in this PR. No other workflow or job references these outputs.


Requirements
N/A — CI-only changes (plus updated documentation), no application code or tests affected.
Related issues
Supports the org-wide migration to immutable GitHub releases. Reference implementation:
launchdarkly/ld-relay(branchv8).Describe the solution you've provided
GitHub's immutable releases feature prevents modifying a release after publishing. The old SLSA provenance generator (
slsa-framework/slsa-github-generator) usedupload-assets: trueto upload.intoto.jsonlfiles as release assets, which would fail under immutable releases. 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, so release-please can publish directly.This PR makes changes across all 4 packages (
server-ai,server-ai-langchain,server-ai-openai,optimization):Replaced SLSA provenance with
actions/attest@v4usingsubject-path— Removed all 4 separate*-provenancejobs that usedslsa-framework/slsa-github-generator. Attestation is now an inline step in each release job usingactions/attest@v4withsubject-pathpointing directly to the built distribution files (e.g.packages/sdk/server-ai/dist/*). Addedattestations: writepermission. Removedpackage-hashesoutputs from each release job since they are no longer needed.Removed base64 hash round-trip from build action — The composite build action (
.github/actions/build/action.yml) no longer computes base64-encoded SHA256 hashes or exposes apackage-hashesoutput. The old pattern (hash → base64 encode → output → base64 decode → checksums file →subject-checksums) is replaced bysubject-path, which letsactions/attest@v4read artifacts directly from disk.Removed unnecessary
contents: writepermission — The old*-provenancejobs neededcontents: writefor uploading assets to the release. Sinceactions/attest@v4only requiresattestations: write(andid-token: writefor OIDC),contents: writehas been removed from all 4 release jobs.Removed unnecessary
fetch-depth: 0— All 4 release jobs hadfetch-depth: 0on checkout, which fetches full git history. This is not needed since the jobs only build and publish packages — they don't perform any git operations that require history.Fixed
dry_runcondition for boolean/string compatibility — The callable workflow'sdry_runconditions now useformat('{0}', inputs.dry_run) != 'true'instead ofinputs.dry_run != true. Whenworkflow_callpasses a booleantrue, GitHub Actions'==operator uses loose string coercion that can silently mismatch.format()stringifies the value first, ensuring consistent string-to-string comparison regardless of whether the caller isworkflow_call(boolean) orworkflow_dispatch(string).Updated
PROVENANCE.md— Replacedslsa-verifierinstructions withgh attestation verifycommands and updated sample output to reflect the new GitHub artifact attestation format.release-please-config.json— Cosmetic reformatting only (inlineextra-filesarrays expanded to multi-line). No functional config changes (draftandforce-tag-creationare intentionally not set — they are only needed for repos that upload artifacts to releases).Updates since last revision
contents: writepermission from all 4 release jobs (flagged by Cursor Bugbot — only needed by the now-deleted SLSA provenance jobs, not byactions/attest@v4).fetch-depth: 0from all 4 release job checkout steps (flagged by Cursor Bugbot — full git history is not needed for build/publish).dry_runconditions in the callable workflow to useformat('{0}', inputs.dry_run) != 'true'for reliable boolean/string handling across bothworkflow_callandworkflow_dispatchtriggers.PROVENANCE.mdto usegh attestation verifywith sample output matching the new GitHub artifact attestation format.skip-github-pull-request/skip-github-releasewith inline tag creation) that was briefly added. This pattern is only needed for repos that upload artifacts to releases (which require draft releases). Since this repo is attestation-only, the standard single-pass release-please is correct.subject-pathglob patterns match the actual build output for each package (e.g.packages/sdk/server-ai/dist/*,packages/ai-providers/server-ai-langchain/dist/*, etc.). If the build step produces files outsidedist/, they won't be attested.package-hashesoutput from the build action. The only consumers were the now-deleted*-provenancejobs and the removed "Generate checksums file" steps, but confirm no external workflows or callers depend on it.actions/attest@v4does not requirecontents: write. Per its docs it needsid-token: writeandattestations: write, both of which are present. If any attestation step actually needscontents: write, the release jobs will fail.release-*jobs). The callable manual publish workflow does not include an attest step — manual publishes will not generate attestations. Confirm this is acceptable.format('{0}', inputs.dry_run) != 'true'pattern works correctly for bothworkflow_call(boolean input) andworkflow_dispatch(string input) triggers. A real dry-run test of the manual publish workflow would confirm this.PROVENANCE.mdsample output and verify the build/signer workflow paths are accurate for this repo (currently showsrelease-please.yml).packages/sdk/server-ai/PROVENANCE.mdis modified in this PR. Confirm whether the other 3 packages (server-ai-langchain,server-ai-openai,optimization) also need their ownPROVENANCE.mdfiles or if the single file is intentional.extra-filesarrays inrelease-please-config.jsonwere reformatted from inline to multi-line — this is cosmetic only but could cause merge conflicts with concurrent PRs.Describe alternatives you've considered
An earlier revision used
subject-checksumswith a base64 decode step to produce a checksums file. This was simplified to usesubject-pathdirectly since the built artifacts are always on disk in the same job where attestation runs, making the hash round-trip redundant.For
dry_runconditions,fromJSON(inputs.dry_run)was considered but there is no documentation confirmingfromJSON()handles an already-boolean value safely.format()is documented to stringify any type, making it the safer choice.A split release-please pattern (two-pass: releases first, then PRs) was briefly applied but reverted — it is only necessary for repos that upload artifacts to releases and need draft releases. This repo is attestation-only.
Additional context
These workflow changes can only be fully validated by an actual release run — they cannot be exercised by CI on a feature branch.
Link to Devin session: https://app.devin.ai/sessions/7d5bda4d9dbe4ae0b950b30a50485e60
Requested by: @keelerm84