Skip to content

Fix release: stop SBOM action attaching to the GitHub release - #86

Merged
nickmarden merged 1 commit into
mainfrom
fix/release-sbom-upload-release-assets
Jul 28, 2026
Merged

Fix release: stop SBOM action attaching to the GitHub release#86
nickmarden merged 1 commit into
mainfrom
fix/release-sbom-upload-release-assets

Conversation

@nickmarden

Copy link
Copy Markdown
Contributor

The bug

The first OCI-only release (v0.5.0, running the workstream-F workflow) failed in the release-image job:

--------------------- Attaching SBOMs to release: 'v0.5.0' ---------------------
Error: Resource not accessible by integration

anchore/sbom-action defaults to upload-release-assets: true, which attaches the generated SBOM as a GitHub release asset and needs contents: write. The release-image job is deliberately contents: read (least-privilege, workstream C).

Why it only surfaced now

Under the old chart-releaser flow, the GitHub release was named ballast-<version>, which never matched the git tag v<version> — so anchore/sbom-action found no release for the tag and silently skipped the upload. The OCI-only workflow (#85) now creates a release named for the tag (v<version>), so the action finds it and tries to upload, hitting the permission wall.

Impact on v0.5.0

The failing step aborted the job before the Attest SBOM and Attest SLSA build provenance steps. Verified state of what shipped:

Artifact Signed SBOM Provenance
image (ghcr.io/tight-line/ballast:v0.5.0) ❌ missing ❌ missing
chart (ghcr.io/tight-line/charts/ballast:0.5.0) n/a

So v0.5.0's image is signed but missing the two attestations. A re-release (v0.5.1) is needed once this merges.

The fix

Set upload-release-assets: false on the Generate SBOM step. The SBOM is already attested into the OCI referrers store (actions/attest-sbom, verifiable via cosign verify-attestation / gh attestation verify) and kept as a workflow artifact, so the release asset was redundant. This keeps release-image at contents: read rather than widening it to contents: write just to attach a duplicate.

Validation

  • make lint — clean
  • make test-coverage-check — passed (no Go changes)
  • release.yml — valid YAML

Tag-only workflow, so it can't be exercised on this PR; it gets its first real run on the v0.5.1 re-release after merge.

anchore/sbom-action defaults to upload-release-assets: true, which
attaches the SBOM as a GitHub release asset and needs contents: write.
The release-image job is deliberately contents: read (least-privilege).

Under the old chart-releaser flow the release was named ballast-<ver>,
which never matched the git tag v<ver>, so the action found no release
and silently skipped the upload. The OCI-only workflow now creates a
release named for the tag (v<ver>), so the action finds it and fails
with "Resource not accessible by integration" — which aborted the job
before the Attest SBOM and Attest SLSA build provenance steps ran.

v0.5.0's image was pushed and signed but shipped WITHOUT its SBOM and
provenance attestations as a result. Set upload-release-assets: false;
the SBOM is already attested into the OCI referrers store
(actions/attest-sbom) and kept as a workflow artifact, so the release
asset was redundant. Keeps the job at contents: read.
@nickmarden
nickmarden force-pushed the fix/release-sbom-upload-release-assets branch from 6bfdaf2 to 67f6f37 Compare July 28, 2026 18:56
@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown

Docker Image Built

docker pull ghcr.io/tight-line/ballast:pr-86-67f6f37

Helm (values override)

image:
  repository: ghcr.io/tight-line/ballast
  tag: "pr-86-67f6f37"

Image expires ~15 days after PR closes.

@nickmarden
nickmarden merged commit 3edf982 into main Jul 28, 2026
9 checks passed
@nickmarden
nickmarden deleted the fix/release-sbom-upload-release-assets branch July 28, 2026 18:58
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants