Skip to content

fix: harden image builds:#545

Open
012xx wants to merge 2 commits intomainfrom
checksum
Open

fix: harden image builds:#545
012xx wants to merge 2 commits intomainfrom
checksum

Conversation

@012xx
Copy link
Copy Markdown
Contributor

@012xx 012xx commented Apr 22, 2026

Overview

Hardened image builds by pinning base image digests and replacing same-source checksum verification with pinned checksums for downloaded artifacts.

@012xx 012xx self-assigned this Apr 22, 2026
Comment thread 22.04/ubuntu-debug/Dockerfile Outdated
Comment thread 22.04/ubuntu-debug/Dockerfile Outdated
@012xx 012xx requested a review from pddg April 23, 2026 02:13
@012xx 012xx marked this pull request as ready for review April 23, 2026 02:13
Comment thread 24.04/ubuntu/Dockerfile Outdated
FROM registry.k8s.io/pause:3.10@sha256:ee6521f290b2168b6e0935a181d4cff9be1ac3f505666ef0e3c98fae8199917a

FROM ghcr.io/cybozu/ubuntu-minimal:${TAG_MINIMAL}
FROM ghcr.io/cybozu/ubuntu-minimal:${TAG_MINIMAL}@sha256:eb18868c75bbebaa11138382cd1dad8ac008a10cdecd4476da12c777b752498c
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Typically, TAG_MINIMAL and its digest is changed at same time.
Wouldn't it be better to set both of them as ARG?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The digest for ubuntu-minimal is referenced only once, while the TAG and its corresponding digest are used twice.
https://github.com/cybozu/ubuntu-base/blob/397bc54/24.04/ubuntu-debug/Dockerfile#L3
https://github.com/cybozu/ubuntu-base/blob/397bc54/24.04/ubuntu-dev/Dockerfile#L3

It's better to avoid this inconsistency.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

@pddg pddg Apr 24, 2026

Choose a reason for hiding this comment

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

@012xx 012xx requested a review from pddg April 24, 2026 08:05
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.

3 participants