banger/scripts
Thales Maciel 3d748b87c8
publish-script: fix pubkey extraction and cosign v3 compatibility
Two bugs found while dry-running the publish flow end-to-end:

1. The awk pipeline that pulled BangerReleasePublicKey out of
   verify_signature.go didn't strip Go's raw-string-literal wrapping
   (`var ... = ` + backtick on the BEGIN line, trailing backtick on
   the END line). The "verify against embedded pub key" step thus
   compared sigs against a malformed PEM. Replaced with a sed pair
   that yields a clean PEM block byte-identical to cosign.pub.

2. cosign v3.x defaults sign-blob to a new bundle format and
   pushes signatures to Rekor; both are incompatible with banger's
   "embedded pub key, raw ASN.1 DER signature" trust model.
   Add --use-signing-config=false / --tlog-upload=false /
   --new-bundle-format=false to opt out, and --insecure-ignore-tlog
   on verify-blob. These flags also work on cosign v2.x, so the
   script is forward- and backward-compatible across the v2→v3
   boundary.

Validated by an end-to-end dry-run on this machine: built binaries,
tarred, sha256summed, cosign-signed, verified against the embedded
pub key, then re-verified through internal/updater's
crypto/ecdsa.VerifyASN1 path — all green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 13:23:09 -03:00
..
make-generic-kernel.sh supply chain: verify signatures and pins across image + kernel builds 2026-04-21 19:38:13 -03:00
make-golden-bundle.sh scripts: bundle-based golden image pipeline 2026-04-17 15:38:04 -03:00
publish-banger-release.sh publish-script: fix pubkey extraction and cosign v3 compatibility 2026-04-29 13:23:09 -03:00
publish-golden-image.sh publish-golden-image: content-addressed tarball names 2026-04-18 15:26:57 -03:00
publish-kernel.sh Phase 5: kernel catalog publish flow + docs 2026-04-16 15:56:56 -03:00
repro-restart-bug.sh daemon: fix vm start (on a stopped VM) + regression coverage 2026-04-23 12:01:46 -03:00
smoke.sh smoke: smol VMs by default + JOBS auto-detects nproc 2026-04-27 17:36:17 -03:00