Skip to content

Fix release signing: SBOM egress + chart OCI push error handling - #82

Merged
nickmarden merged 1 commit into
mainfrom
fix-release-signing
Jul 27, 2026
Merged

Fix release signing: SBOM egress + chart OCI push error handling#82
nickmarden merged 1 commit into
mainfrom
fix-release-signing

Conversation

@nickmarden

Copy link
Copy Markdown
Contributor

Fixes the two signing failures from the v0.4.9 release. Image signing itself worked (cosign sign succeeded); these are the two downstream steps that didn't.

1. Image SBOM step (blocked egress)

Generate SBOM failed with:

getaddrinfo EAI_AGAIN raw.githubusercontent.com

harden-runner (block mode) was denying raw.githubusercontent.com, which anchore/sbom-action needs to fetch syft. The allowlist had release-assets/objects but not raw. Fix: added raw.githubusercontent.com:443 to the release-image allowlist. (Block mode doing its job, catching a real missing endpoint.)

2. Chart OCI push (masked failure + real 403)

helm push of the OCI chart actually failed:

PUT .../charts/ballast/manifests/0.4.9: 403 denied: permission_denied: write_package

but the | tee pipe swallowed the non-zero exit, so the step "passed" with an empty digest, and cosign sign then failed on ghcr.io/tight-line/charts/ballast@. Fix: set -o pipefail + a digest guard, so a failed push fails the step directly with the real error.

⚠️ The 403 also needs an org-side action (not code)

The image pushes fine because ghcr.io/tight-line/ballast already exists and is linked to the repo. ghcr.io/tight-line/charts/ballast is a brand-new package, and the repo's GITHUB_TOKEN was denied permission to create it. This code change makes the failure legible but won't make the push succeed on its own, the package needs a one-time creation + repo link (details in the PR discussion / follow-up).

CHANGELOG

Corrected the just-released [0.4.9] entry: it claimed SBOM + provenance + signed OCI chart, but 0.4.9 only signed the image. Moved those to [Unreleased]. Flagging this since it edits a released entry, revert that part if you'd rather leave the record as-is.

Validation

Same tag-only caveat: release.yml isn't exercised on this PR. Once this merges and the GHCR package permission is sorted, the next release should produce: signed image + SBOM + provenance, and signed OCI chart + provenance.

Two failures surfaced on the v0.4.9 release (image signing itself worked):

- SBOM step failed with `getaddrinfo EAI_AGAIN raw.githubusercontent.com`:
  harden-runner blocked raw.githubusercontent.com, which anchore/sbom-action
  needs to fetch syft. Added it to the release-image allowlist.

- Chart OCI `helm push` got 403 permission_denied (new-package write), but the
  `| tee` pipe masked the failure so the step passed with an empty digest and
  cosign then failed on `ghcr.io/.../ballast@`. Added `set -o pipefail` and a
  digest guard so a push failure fails the step loudly at the push.

Also corrects the [0.4.9] CHANGELOG entry: that release signed the image but
did not publish the SBOM/provenance or the OCI chart; moved those to
[Unreleased]. The chart OCI push additionally needs a one-time GHCR
package-creation/link step (org-side), tracked separately.
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

Copy link
Copy Markdown

Docker Image Built

docker pull ghcr.io/tight-line/ballast:pr-82-fa49c73

Helm (values override)

image:
  repository: ghcr.io/tight-line/ballast
  tag: "pr-82-fa49c73"

Image expires ~15 days after PR closes.

@nickmarden
nickmarden merged commit 5b0044d into main Jul 27, 2026
10 checks passed
@nickmarden
nickmarden deleted the fix-release-signing branch July 27, 2026 23:14
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