Repository navigation
feat(ci): sign v2 images + build the signed greffer-updater (self-update v2) - #85
Merged
Merged
Conversation
…ate v2)
Wires the v2 image-provenance pipeline (managed cosign key, offline verify, no
Rekor) so the manager-triggered remote update has signed artifacts to verify.
docker-publish.yml:
- Stamp org.opencontainers.image.version on greffer / greffer-nginx /
tunnel-sidecar (the label the updater reads for the floor + cohesion check).
- Build + push greffon/greffer-updater (new, multi-arch) from Dockerfile.updater,
baking cosign.pub (build secret from the COSIGN_PUBLIC_KEY variable) + the
min_supported baseline.
- Sign all four greffon/* images by digest with a per-repo annotation
(-a repo=<repo>), --tlog-upload=false, and immediately round-trip each with the
updater's EXACT verify command so a cosign flag/behaviour drift fails the
release here, not silently in production.
- Set-closure guard: assert every greffon/* image the shipped compose template
renders is in the enumerated signed set (a new service can't ship unsigned).
- All signing + the updater build are gated on the key material being provisioned
(COSIGN_PRIVATE_KEY secret + COSIGN_PUBLIC_KEY variable), so main stays green
until ops sets them; node images still publish meanwhile (unsigned).
Dockerfile.updater: python + greffer_cli wheel + docker-cli/buildx/compose +
cosign (pinned ko image), bakes /etc/greffer/{cosign.pub,min_supported_baseline}.
No ENTRYPOINT (the greffer spawns the full `python -m greffer_cli.updater <tag>`).
Verify-side fix (the contract this signing must match): provenance.cosign_verify
and floor.verify_blob now pass --insecure-ignore-tlog=true (the offline managed
-key model has no tlog; without it cosign v2 requires one and fails every genuine
image), and use the short -a annotation flag (cosign has no singular
--annotation). Tests assert both.
docs/release-signing.md: ops handoff (keygen, CI secrets/variable, per-host
opt-in + digest pin, manifest sign-blob + publish, baseline policy, rotation).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
What
The final greffer self-update v2 piece: the release-pipeline signing the manager-push path verifies against. Managed cosign key, offline verify (no Rekor/tlog), per the merged trust model (
docs/features/greffer-self-update/v2-image-provenance-and-trust-model.md).Pairs with the merged v2 code: greffer#83, manager#120, manager-front#50.
Pipeline (
docker-publish.yml)org.opencontainers.image.versionon greffer / greffer-nginx / tunnel-sidecar (the label the updater reads for themin_supportedfloor + cohesion check, never the tag).greffon/greffer-updaterimage (Dockerfile.updater, multi-arch): the detached container the greffer spawns. python + thegreffer_cliupdater + docker-cli/buildx/compose + cosign (pinned ko image), baking/etc/greffer/cosign.pub(build secret from theCOSIGN_PUBLIC_KEYvariable) +min_supported_baseline. No ENTRYPOINT (the greffer supplies the fullpython -m greffer_cli.updater <tag>).greffon/*images by digest with a per-repo annotation (-a repo=<repo>),--tlog-upload=false, then round-trip each: the updater's exactcosign verifyand a pull +docker inspectversion-label read, so a cosign flag/behaviour drift or a missing label fails the release here, not silently in production.greffon/*image the shipped compose template renders is in the enumerated signed set (a new service can't ship unsigned).COSIGN_PRIVATE_KEY(secret) +COSIGN_PUBLIC_KEY(variable) are provisioned, somainstays green until ops sets them; node images keep publishing (unsigned) meanwhile.Verify-side fix (the contract the signing must match)
The merged greffer verify had two latent bugs that would have made every v2 verify fail closed:
--insecure-ignore-tlog, so against the offline--tlog-upload=falsesignatures cosign v2 would demand a Rekor entry and refuse. Added toprovenance.cosign_verify+floor.verify_blob.--annotation(not a cosign flag — cosign has-a/--annotations). Switched both sides to-a. The CI round-trip runs the greffer's exact command, so this is now self-validating.Tests assert both (
-a repo=+--insecure-ignore-tlog=trueon the image and blob paths). Full cli suite 203 green.Ops handoff (
docs/release-signing.md)Keygen, the three CI entries, per-host opt-in + updater digest pin (
GREFFER_UPDATER_IMAGE=...@sha256:), signing + publishing the version manifest.sig, themin_supportedbaseline policy, and key rotation. The CI round-trip also enforces that the public key actually pairs with the private key.Review
3-lens independent review to convergence (cosign-semantics, CI/Docker, contract-consistency): cosign flags verified correct, contract clean across all 8 checks. Round 1 caught a P1 (the root
.dockerignoreallowlist strippedcli/+min_supported_baselinefrom the updater'scontext: .build — fixed with a scopedDockerfile.updater.dockerignore) and a P2 (extend the smoke to the label-read path) + P3s. Round 2 converged clean.CI note
docker-publishruns on push-to-mainonly (not PRs), so this PR can't exercise the signing path here; it goes live once merged + keys provisioned. Thecli-releasePR check does validate thegreffer_clichanges.🤖 Generated with Claude Code