STAC-25595 GH action to scan, sign and push docker images - #24
Conversation
bda5464 to
b8894e1
Compare
viliakov
left a comment
There was a problem hiding this comment.
Reviewed alongside StackVista/stackstate#367.
Blocking
Arches other than amd64/arm64 are pushed unscanned. The gate is two hardcoded steps behind contains(inputs.arches, 'amd64') / 'arm64'. With any other value in arches, no scan step runs, but load → push → assemble → sign all still do — so the README's "the registry never sees bytes that have not passed the secret gate first" no longer holds. Fail fast on an unrecognised arch, or drive the scan from the arch loop.
Regressions vs. the actions this replaces
Manifest-integrity check dropped. merge-multiarch does imagetools create --dry-run, re-fetches the pushed manifest, and compares canonicalised sha256 before signing. Here the signed digest comes from imagetools inspect "$first_ref" — a mutable tag, read after the push. Two runs re-pointing the same moving tag can make you sign a manifest you did not assemble. Worth keeping the byte-for-byte comparison in the one action whose job is signing.
Binary-arch verification dropped. push-single-arch has Verify binary architecture matches linux/<arch> (STAC-25033), which extracts the entrypoint and files it. #367's backend path builds arm64 under QEMU on an amd64 runner — the exact mislabelling case that check was added for.
fail-on-existing-tags defaults to false. merge-multiarch refuses to overwrite unconditionally. Prefer defaulting safe and letting branch builds opt out — #367 does not set it, so immutability rests entirely on the caller's own pre-existing tag check.
Other
sig-handle-<run>-<attempt>-<arch>tags are never cleaned up — two permanent quay tags per image per build. Deleting them later is not obviously safe either (manifest-list child GC), so this wants a cleanup step or an explicit retention decision rather than a README note.tarballmode has no caller. #367 loads the tarballs itself and callssource-mode: local, duplicating thedocker load | awklogic. Either let the frontend passsource-mode: tarballand drop the loader there, or removetarball-dir/tarball-prefixhere.- No test.
action-ci.ymlonly triggers onscan-image/**. The empty-target-registry-userescape hatch is documented for "an unauthenticated local registry in tests", but no such test exists — aregistry:2assemble+sign smoke test would be cheap. (push-single-arch/merge-multiarchare untested too, so this is a gap rather than an inconsistency.) - Please add a description with the STAC-25595 link and how this was validated.
|
Thanks for the review — all points addressed. Summary:
On #3 — why config-level rather than the full entrypoint
|
viliakov
left a comment
There was a problem hiding this comment.
Two blocking items; the rest of my notes are non-blocking and I've left them out.
91c66a1 to
451414a
Compare
scan-sign-push — gate, publish, and cosign-sign multi-arch images
Jira: STAC-25595
What
Adds the
scan-sign-pushcomposite action. From per-arch inputs (tarballs or already-loaded local images) it scans each arch (secrets fail-closed, CVEs inform-only), pushes the per-arch manifests, assembles a multi-arch manifest list under every tag, then keyless-signs and verifies the assembled digest against the caller's GitHub Actions OIDC identity. The registry never sees bytes that have not passed the secret gate first.This closes the signing gap for the core product images that ship in the
suse-observabilitychart unsigned because they are published outsideimage-pipeline.Key behaviour
tarball(loadimage-<arch>.tar) andlocal(images already in the daemon,<prefix><arch>).fail-on-existing-tagsdefaults totrue(immutable-release safe); branch builds opt out.Review fixes included
amd64/arm64have a scan step; anything else is rejected before load/push/sign, so nothing is published unscanned..Architecturemust match the declared arch (guards QEMU cross-build mislabelling).fail-on-existing-tagsdefaults safe (true).sig-handle-*/-listtags cleaned up after signing (best-effort, quay.io).Validation
action-ci.yml,scan-sign-push-smoke): builds two per-arch tarballs, runs the action against a registry:2service, asserts both tags resolve to a single signed manifest list with two children. Triggers now includescan-sign-push/**`.StackVista/stackstate, STAC-25595): backend images (server/receiver/correlate/kafka-to-es) via local mode and the frontend via tarball-loaded local mode produce signed multi-arch images on quay;cosign verifypasses against the workflow OIDC identity, and OCI labels match a pre-change build byte-for-byte (only per-build values differ).Notes for reviewers
scan-imageis pinned to@6284a6fc…(main); bump when scan-image changes..Architecture), not entrypoint-binaryfileextraction — flag if the stricter STAC-25033 check is wanted here.