Skip to content

build images: more fixes#19

Merged
fidencio merged 3 commits intomainfrom
topic/build-add-missing-arm64-images
Apr 14, 2026
Merged

build images: more fixes#19
fidencio merged 3 commits intomainfrom
topic/build-add-missing-arm64-images

Conversation

@fidencio
Copy link
Copy Markdown
Member

Add missing images for arm64 tests

Build multi-arch (amd64, arm64, s390x) unsigned, cosign-signed, and
cosign-signed-key2 images under test-container-image-rs, so that
kata-containers image signature tests work on all architectures
without needing per-arch tags.

A second cosign key pair (cosign2.key/cosign2.pub) is added for the
"wrong key" test case. The COSIGN_PASSWORD_KEY2 secret must be
configured in the repository.


Pin cosign to v2.6.2 for legacy .sig tag compatibility

cosign-installer v4.1.1 installs cosign v3.0.5, which defaults to
OCI 1.1 referrers for storing signatures instead of the legacy
sha256-.sig tag format. image-rs inside the confidential
guest only supports the legacy .sig tag discovery, causing signature
verification to fail with "manifest unknown".

Pin cosign to v2.6.2 (latest v2 release) to produce .sig tags that
image-rs can find.


build: Differentiate image variants to produce unique digests

All three imgrs multi-arch targets (unsigned, cosign-signed,
cosign-signed-key2) build from the same busybox Dockerfile, producing
identical layers and manifests. This means the unsigned image shares
the same digest as the signed ones, so image-rs finds valid signatures
for the "unsigned" image and the rejection test fails.

Add an IMAGE_VARIANT build-arg baked into a label so each variant
gets a distinct digest. Use --no-cache to prevent buildx from reusing
layers across variants.


Those are being tested by Kata Containers CI (including on arm64) here: https://github.com/kata-containers/kata-containers/actions/runs/24413941935 ... I'd strongly advise to wait for the tests to finish :-)

Build multi-arch (amd64, arm64, s390x) unsigned, cosign-signed, and
cosign-signed-key2 images under test-container-image-rs, so that
kata-containers image signature tests work on all architectures
without needing per-arch tags.

A second cosign key pair (cosign2.key/cosign2.pub) is added for the
"wrong key" test case. The COSIGN_PASSWORD_KEY2 secret must be
configured in the repository.

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
cosign-installer v4.1.1 installs cosign v3.0.5, which defaults to
OCI 1.1 referrers for storing signatures instead of the legacy
sha256-<digest>.sig tag format. image-rs inside the confidential
guest only supports the legacy .sig tag discovery, causing signature
verification to fail with "manifest unknown".

Pin cosign to v2.6.2 (latest v2 release) to produce .sig tags that
image-rs can find.

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
Made-with: Cursor
All three imgrs multi-arch targets (unsigned, cosign-signed,
cosign-signed-key2) build from the same busybox Dockerfile, producing
identical layers and manifests. This means the unsigned image shares
the same digest as the signed ones, so image-rs finds valid signatures
for the "unsigned" image and the rejection test fails.

Add an IMAGE_VARIANT build-arg baked into a label so each variant
gets a distinct digest. Use --no-cache to prevent buildx from reusing
layers across variants.

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
Made-with: Cursor
@fidencio
Copy link
Copy Markdown
Member Author

Copy link
Copy Markdown
Member

@fitzthum fitzthum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

might want to make an issue in guest-components regarding the second commit.

I like the build arg in the last one. Recalling the great "not actually encrypted encrypted test image" fiasco (circa 2023), it's good to have something in the image itself that we can check for in the tests.

@fidencio fidencio merged commit 4c9f0d4 into main Apr 14, 2026
2 checks passed
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.

2 participants