Skip to content

fix: recursively sign promoted container images - #544

Open
ardentperf wants to merge 1 commit into
cloudnative-pg:mainfrom
ardentperf-labs:dev/484-recursive-signing
Open

ardentperf wants to merge 1 commit into
cloudnative-pg:mainfrom
ardentperf-labs:dev/484-recursive-signing

Conversation

@ardentperf

Copy link
Copy Markdown
Contributor

Add --recursive to production image signing so Cosign signs each architecture-specific manifest as well as the multi-architecture index.

This is a one-line change to the production promotion action.

Validation: tested the actual signing step with Cosign v3.1.4 and a local OCI registry. Before the change, only the index verified; afterward, the index and both amd64 and arm64 manifests verified. YAML parsing, shell syntax, and git diff --check passed. GitHub OIDC and Harbor enforcement were not tested.

Fixes #484.

AI assistance: OpenAI Codex assisted with implementation and local validation.

Signing artifact...
Pushing signature to: 127.0.0.1:15484/postgresql
BEFORE: index signed, child manifests unsigned
PASS signed: 127.0.0.1:15484/postgresql@sha256:d09eb6bc1e863d8cb8d56c0224bd6916dd64263a7af1af910684c543e4a54ef9
PASS unsigned: 127.0.0.1:15484/postgresql@sha256:3966454e23feafe42cd4fe7a998a20e705d67a76e02151dbed884b782bbddde5
PASS unsigned: 127.0.0.1:15484/postgresql@sha256:20242c8610789f4896683080cdd59fe6f3cc1599cbf209a804e24eca3a19bc9c
Signing 127.0.0.1:15484/postgresql@sha256:d09eb6bc1e863d8cb8d56c0224bd6916dd64263a7af1af910684c543e4a54ef9
Signing artifact...
Pushing signature to: 127.0.0.1:15484/postgresql
Pushing signature to: 127.0.0.1:15484/postgresql
Signing artifact...
Signing artifact...
Pushing signature to: 127.0.0.1:15484/postgresql
AFTER: index and both child manifests signed
PASS signed: 127.0.0.1:15484/postgresql@sha256:d09eb6bc1e863d8cb8d56c0224bd6916dd64263a7af1af910684c543e4a54ef9
PASS signed: 127.0.0.1:15484/postgresql@sha256:3966454e23feafe42cd4fe7a998a20e705d67a76e02151dbed884b782bbddde5
PASS signed: 127.0.0.1:15484/postgresql@sha256:20242c8610789f4896683080cdd59fe6f3cc1599cbf209a804e24eca3a19bc9c
ALL TESTS PASSED

Add --recursive to the production image signing command so cosign signs the architecture-specific manifests as well as the multi-architecture index. This allows consumers enforcing signatures on individual manifests, such as Harbor, to verify the promoted images.

Validated with Cosign v3.1.4 and a local OCI registry: child manifests fail verification before the change and both amd64 and arm64 manifests verify after running the updated signing step. GitHub OIDC and Harbor enforcement were not exercised.

Fixes: cloudnative-pg#484

Assisted-by: OpenAI Codex
Signed-off-by: Jeremy Schneider <[email protected]>
@ardentperf
ardentperf requested a review from a team as a code owner November 14, 2026 23:14
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.

Cosign architecture-specific images too?

1 participant