Skip to content

fix(release): attest and attach the SBOM before the immutable Release exists - #99

Merged
WomB0ComB0 merged 1 commit into
mainfrom
fix/release-immutable-order
Oct 3, 2026
Merged

WomB0ComB0 merged 1 commit into
mainfrom
fix/release-immutable-order

Conversation

@WomB0ComB0

Copy link
Copy Markdown
Member

Summary

The v0.4.6 release run failed at publish release:

Attach the SBOM to the Release
HTTP 422: Cannot upload assets to an immutable release.

Releases in this repo are immutable: publishing one freezes its assets. The publish job created the Release with SHA256SUMS, then tried to upload the SBOM, which GitHub refuses. Attest build provenance came after it and was skipped. This isn't specific to v0.4.6:

release assets provenance attestation for install.sh
v0.4.3 SHA256SUMS none (404)
v0.4.4 SHA256SUMS none (404)
v0.4.5 SHA256SUMS none (404)
v0.4.6 SHA256SUMS none (404)

Meanwhile the workflow comment tells users to gh attestation verify install.sh --repo resq-software/dev.

Change

The publish job now runs:

  1. Rebuild SHA256SUMS from the pin set.
  2. Generate SBOM.
  3. Attest build provenance. Attestations are stored against the repository, not the Release, so this doesn't depend on the Release existing.
  4. Create the Release with SHA256SUMS and sbom.spdx.json in the one call that publishes it.

The separate "Attach the SBOM" step is removed. On a re-run where the Release already exists, the job no longer tries to upload to it, because an immutable Release can't change. It logs the assets the Release carries and exits 0, and since attestation now runs first, a re-run still attests.

This changes only release.yml and doesn't release anything by itself, because the trigger is a VERSION change.

What was not affected

get.resq.software serves bytes pinned by digest in worker/src/index.ts (#98 for v0.4.6). I checked all seven v0.4.6 pins against the files at the v0.4.6 commit (9bac29b) and they match. Only the SBOM and the provenance attestation were missing; the installers themselves were correct.

Test plan

  • actionlint and zizmor clean on release.yml
  • Step order checked: checkout, SHA256SUMS, SBOM, attest, create
  • The next VERSION bump produces a Release with SHA256SUMS + sbom.spdx.json, and gh attestation verify install.sh --repo resq-software/dev passes

Open question

Should v0.4.6 get a provenance attestation after the fact? After this merges, a workflow_dispatch re-run would attest v0.4.6's SHA256SUMS. The provenance would name the commit the re-run ran at, not 9bac29b. The installer bytes are identical at both, but it is a backfill rather than the original build's record. The alternative is to let v0.4.7 be the first attested release.

… exists

Releases here are immutable, so publishing one freezes its assets. The publish job created the Release with SHA256SUMS, then uploaded the SBOM (HTTP 422: Cannot upload assets to an immutable release), and the attestation step behind it never ran. v0.4.3 through v0.4.6 carry SHA256SUMS only and have no provenance attestation, although the workflow told users to verify one.

Generate the SBOM and attest SHA256SUMS first, then create the Release with every asset in the one call that publishes it. A re-run against an existing Release now leaves it alone instead of trying to upload to it, and still attests.
@WomB0ComB0
WomB0ComB0 requested a review from a team as a code owner October 3, 2026 22:08
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
get-resq-software 5111a3d Oct 03 2026, 10:08 PM

@github-actions github-actions Bot added C-Bug Something isn't working A-Release Release plumbing (VERSION, pins, stamp, release workflow) A-DevOps CI, workflows, actions, and repo infra (.github) and removed C-Bug Something isn't working labels Oct 3, 2026
@coderabbitai

coderabbitai Bot commented Oct 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 41 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3441d797-5e51-4ea6-a0c1-30050678b72c
📥 Commits

Reviewing files that changed from the base of the PR and between 9bac29b and 5111a3d.

📒 Files selected for processing (1)
  • .github/workflows/release.yml
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the size/M PR size: medium (30-99 lines changed) label Oct 3, 2026
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

I have audited the changes in this pull request and found no security vulnerabilities, logic bugs, or performance issues. The workflow is well-written and follows security best practices.

Good job!

Generated by ai-auditor for #99 · gem25pro · 15.1 AIC · ⌖ 3.96 AIC · ⊞ 12.7K · ◷

@WomB0ComB0
WomB0ComB0 merged commit dedb631 into main Oct 3, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-DevOps CI, workflows, actions, and repo infra (.github) A-Release Release plumbing (VERSION, pins, stamp, release workflow) size/M PR size: medium (30-99 lines changed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants