Skip to content

Commit 086870f

Browse files
committed
Compare full platform tuple in manifest verification, not just arch
architecture and digest live in separate parts of an index descriptor, so comparing only {arch, digest} can't distinguish a digest attached to the wrong os/variant within the same architecture. Include os and variant in the comparison key so the check can't pass on a partial match. Signed-off-by: Abrar Shivani <ashivani@nvidia.com>
1 parent e89d63f commit 086870f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/precompiled.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ jobs:
501501
REMOTE_RAW=$(skopeo inspect --raw --authfile "${REGISTRY_AUTH_FILE}" "docker://${IMAGE}")
502502
503503
if echo "$LOCAL_RAW" | jq -e '.manifests' >/dev/null 2>&1; then
504-
JQ_FILTER='[.manifests[] | select(.platform.architecture and .platform.architecture != "unknown") | {arch: .platform.architecture, digest: .digest}] | sort_by(.arch)'
504+
JQ_FILTER='[.manifests[] | select(.platform.architecture and .platform.architecture != "unknown") | {os: .platform.os, arch: .platform.architecture, variant: (.platform.variant // null), digest: .digest}] | sort_by(.os, .arch, .variant)'
505505
LOCAL=$(echo "$LOCAL_RAW" | jq -c "$JQ_FILTER")
506506
REMOTE=$(echo "$REMOTE_RAW" | jq -c "$JQ_FILTER")
507507
else

0 commit comments

Comments
 (0)