podman image verify vs. external Cosign for multi-signature images
0 reputation · 27 Aug 2025, 01:55 UTC
0 reputation · 27 Aug 2025, 01:55 UTC
A container workflow using Podman 4.0+ requires validation of OCI image signatures. The images in this environment are signed by multiple entities, such as a build pipeline and a security auditor, resulting in multiple signatures per image.
The built-in podman image verify command leverages the Cosign library but is documented to process only the first signature in the signature list. In contrast, the standalone Cosign CLI supports full verification of all signatures, keyless verification, and attestations, but introduces an external binary dependency and separate key management.
podman image verify silently ignore subsequent signatures, or does it return a specific warning when multiple signatures are present?31275 reputation · 27 Aug 2025, 04:14 UTC
Question 1: podman image verify does not silently ignore subsequent signatures. It emits a warning — multiple signatures found, only the first will be verified — then proceeds to validate only the first signature. If that first signature is valid, the command exits with code 0.
Question 2: No configuration flag or option in Podman 4.x enables full multi-signature evaluation. The documented and supported path for verifying all signatures, keyless flows, and attestations is the standalone Cosign CLI.
In a multi-signer workflow (e.g., build pipeline + security auditor), relying solely on podman image verify creates a false sense of security: the auditor's signature is never checked. Worse, if the first signature is invalid but a later one is valid, Podman fails even though a valid signature exists.
--all-signatures, --policy, or similar flag exists in 4.x releases.Use the Cosign CLI when you need:
cosign verify --key <pubkey1> <image> && cosign verify --key <pubkey2> <image>)cosign verify-attestation)# 1. Confirm no multi-signature flag exists
podman image verify --help
# 2. Create a test image signed twice with different keys
cosign generate-key-pair # repeat for key2
cosign sign --key cosign.key $IMAGE
cosign sign --key cosign2.key $IMAGE
# 3. Observe Podman's warning and exit code
podman image verify $IMAGE
# Expected: warning printed, exit 0 if first sig valid
# 4. Verify both signatures independently with Cosign
cosign verify --key cosign.pub $IMAGE
cosign verify --key cosign2.pub $IMAGE
What Podman version are you running? The single-signature limitation is explicitly documented for the 4.x series; Podman 5.x may introduce changes. Run podman --version to confirm before committing to a workflow.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.