fix(sign-and-attest): disable release-asset upload on image SBOM step - #32
Merged
Merged
Conversation
anchore/sbom-action's own upload-release-assets default (true) tries to attach the SBOM to a GitHub Release matching the run's tag name. This job only grants contents: read, so any tagged caller with a matching release (e.g. go-htmx's v0.1.0) gets a 403 "Resource not accessible by integration" on that step, failing the job after the image is already signed and the SBOM already generated, skipping every downstream verify/gate/scan job. The SBOM is already published as a cosign-attested OCI referrer two steps later, so the upload-artifact/upload-release-assets side effects are unnecessary here, matching the fix already applied to the binary-path sbom job in caller workflows.
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a failure mode in the reusable sign-and-attest.yml workflow where the SBOM generation step attempts to upload release assets using insufficient permissions, causing the docker-sign/attest job to fail after successful signing/SBOM generation and thereby blocking downstream jobs.
Changes:
- Disable
anchore/sbom-actionside-effect uploads (upload-artifactandupload-release-assets) for the image SBOM step. - Add inline rationale documenting why these uploads must be disabled (least-privilege
contents: readand SBOM is already published via cosign attestation).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
zircote
added a commit
to attested-delivery/go-htmx
that referenced
this pull request
Jul 13, 2026
"#32" alone resolves to this repo's own issue #32 (an unrelated tutorial task), not attested-delivery/.github#32 (the actual fix this pin bump depends on). Spell out the owner/repo.
This was referenced Jul 13, 2026
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.
Summary
sign-and-attest.yml'sdocker-sign(attest) job failed on go-htmx'sfirst tagged release (
v0.1.0, run29222949104)
after the image was already correctly signed and the SBOM already
generated, at the
anchore/sbom-actionstep:Root cause
anchore/sbom-actiondefaults toupload-release-assets: true, whichtries to attach the SBOM file to a GitHub Release matching the run's
tag name via the REST API. This job only grants
contents: read(correctly, per least-privilege), so the attach call 403s. The failure
aborts the job after the useful work (signing, SBOM generation) is
already done, and skips every downstream job in the caller's chain
(
docker-verify,gate-image,attest-container-scanin go-htmx'scase) since they all
needs:this job.The SBOM is already published as a cosign-attested OCI referrer two
steps later in the same job (
cosign attest --predicate sbom.cdx.json --type cyclonedx), so the action's own upload side effects areredundant, not just failing. Caller repos' own binary-path
sbomjobsalready disable this identical default with the identical rationale
(see e.g. go-htmx's
release.yml).Fix
Set
upload-artifact: falseandupload-release-assets: falseon theSBOM generation step, matching the established pattern.
Impact on already-tagged releases
This does not retroactively fix any run already frozen against the old
pinned SHA (reusable
uses:refs pinned by commit SHA resolve to thatexact commit regardless of what merges to
mainafterward). Any callerrepo that already hit this on a tagged release will need a new tag (or
manual completion of the missing attestation) to get a fully-attested
container image — that decision belongs to each caller repo's owner,
not this fix.
Verification
actionlint .github/workflows/sign-and-attest.ymlpasses clean.change any other job, permission, or pinned action SHA.