Skip to content

K2GO-554 chore(rootfs): sign official rootfs tarballs in CI - #750

Merged
luisguzman-adfa merged 2 commits into
mainfrom
feat/K2GO-554-rootfs-signing
Nov 8, 2026
Merged

luisguzman-adfa merged 2 commits into
mainfrom
feat/K2GO-554-rootfs-signing

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

What changes

  • Add a dormant minisign signing step to the bake workflow. It signs each official dated k2go_<date>_<tier>_<sha>_<arch>.tar.gz after the path-traversal bake gate, asserts the prehashed Ed25519 form (tag "ED"), and self-verifies against the committed public key.
  • The detached <tarball>.minisig rides the existing recursive sidecar upload: a per-artifact sidecar, never a pointer.
  • Prune removes a tarball's .minisig in lockstep. A publish consistency step checks every published pointer resolves to a signed tarball.
  • promote-rootfs.sh requires the .minisig when signing is on (REQUIRE_SIG, set from the variable).
  • Commit the public key at controller/rootfs-signing.pub (key id C5E45B250781C960), document verification in controller/README.md, and add the design ADR.

Why

  • Lets the app skip the second full decompression pass on a trusted rootfs (K2GO-554): a valid signature over the exact bytes replaces the on-device re-listing.

Verifications

  • bash -n on the promote script; yaml.safe_load on both workflows; ASCII-clean on all files.
  • Two-pass review done. One gate-robustness fix folded in: fail closed if tar cannot list before signing.
  • Dormant: gated by vars.ROOTFS_SIGNING_ENABLED (default off), so PR1 merges inert. Activation is a one-switch variable change, after the app-side verifier ships to every channel (BC4).

Notes

  • The app-side verifier and the explicit BouncyCastle dependency ship separately; they are not in this PR.

Add a dormant minisign step to the bake workflow: sign each official dated
tarball after the path-traversal gate and self-verify against the committed
public key. Promote requires the .minisig when signing is on. Gated by
vars.ROOTFS_SIGNING_ENABLED (default off) for a staged rollout; the app-side
verifier and activation ship separately.
The pre-sign traversal gate piped tar to grep; under pipefail a tar read
error read as "no unsafe member" and the tarball was signed anyway. Capture
the listing first and abort on a tar error, then grep the captured output.
@luisguzman-adfa
luisguzman-adfa merged commit d9fd975 into main Nov 8, 2026
4 of 9 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the feat/K2GO-554-rootfs-signing branch November 9, 2026 05:33
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.

1 participant