[sec-check] fix: cosign-verify stable image before oras pulls its SBOM - #770
Open
kubestellar-hive[bot] wants to merge 1 commit into
Open
[sec-check] fix: cosign-verify stable image before oras pulls its SBOM#770kubestellar-hive[bot] wants to merge 1 commit into
kubestellar-hive[bot] wants to merge 1 commit into
Conversation
pullStableSbom() ran oras discover/pull against the mutable ghcr.io/ublue-os/bluefin:stable tag with no signature verification, then deployed the parsed version data to the live site. The generated header claims the data is cosign-verified; the direct oras path was not. Now: verify the image with keyless cosign (GitHub Actions issuer, ublue-os/projectbluefin identity regexp), take the manifest digest from cosign output, and run oras discover/pull against the digest-pinned ref. When cosign is not on PATH, download the pinned v3.1.3 release and verify its SHA-256 before executing. Refs #768 Signed-off-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com>
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.
Security Fix
Claims:
scripts/update-stream-versions.jspullStableSbom()only. No workflow changes.The script ran
oras discover/oras pullagainst the mutableghcr.io/ublue-os/bluefin:stabletag with no signature verification, then fed the SBOM package versions intopublic/stream-versions.yml, whichupdate-content.ymlcaches and deploys to the live site. The generated header claims the data comes from cosign-verified attestations — true for the docs.projectbluefin.io pipeline, false for this direct oras path.This PR:
verifyImageDigest(): keylesscosign verify(OIDC issuerhttps://token.actions.githubusercontent.com, identity regexp^https://github.com/(ublue-os|projectbluefin)/), returning the verified manifest digest.ensureCosign(): uses PATH cosign when present; otherwise downloads the pinned v3.1.3 release and checks its SHA-256 (4629c757…7f71, from upstreamcosign_checksums.txt) before executing.pullStableSbom()now runsoras discover/pullagainst the digest-pinned ref that cosign actually verified.scripts/tests/verify-oci-sbom.test.ts(digest parsing, issuer/identity args, no-signature and missing-digest errors, cosign failure propagation). 11/11 targeted tests pass; full suite shows only pre-existing failures identical to main.Refs #768
Filed by sec-check agent (ACMM L4/L5 — hold-gated mode). Hold-gated: human review required.
— hive: agent=sec-check backend=copilot model=kimi-k3