-
-
Notifications
You must be signed in to change notification settings - Fork 0
Refresh Alpine base image package pins #196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| 5b5009c66c47bd7a49a1b0eb236b526a14b2ed6c0802cb82d41eb6f9ea852a59 libsharpyuv-1.6.0-r0.apk | ||
| 808eac0eba50a5a7de86e280f4337281eace15a6b10301ee04de3d39f212cfb9 libwebp-1.6.0-r0.apk | ||
| 6a3edd924ead1fad88a69e28c5775809af3026b322f58428001cd02fedc5299e musl-1.2.5-r23.apk | ||
| 3649d55ead19c80e66fd5c210f8fdd5b20ccaf007d5ec862e6345aa54a4b5b0f tzdata-2026b-r0.apk | ||
| b274132e7e9d36985b9d3324c7e2d724b5b70610743b69f7fe5bc9082bd085aa tzdata-2026c-r0.apk | ||
| ecda4cc94fd18f90182f1d3a615889df5e0db9cf78926d11627dd23e06d2e6e8 zlib-1.3.2-r0.apk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| 68b1787f41c36e7b6d9def855c5663f2f1ab62fbcc599d38ce3487e75fc883ec libsharpyuv-1.6.0-r0.apk | ||
| 4d5303958ee38a978501c330c23b62ef98993ae3c30afcd62444723f33da2477 libwebp-1.6.0-r0.apk | ||
| 4f3c4a7bf9f51d2c91007e333b17459362ffd881b4a343e8da07b6c50c4f4a0d musl-1.2.5-r23.apk | ||
| a172f7eedda93509d0dde2f892cf1e0c135969a30c0f19535deef7556aa910a0 tzdata-2026b-r0.apk | ||
| 50fbca92f9e6c5d003a291587c67b7bd9c084cb54d1b0b0f04e0ac5715b5ab72 tzdata-2026c-r0.apk | ||
| f56dea63692059bd65854bb179b7551971a441000b0d98c5b031291ca0450b56 zlib-1.3.2-r0.apk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift
The temporary OpenSSL package bypasses the reproducible package flow.
Both images install OpenSSL from the live APK index rather than downloading and verifying the exact artefact used for the build. This weakens the stated checksum and reproducibility guarantees.
infra/docker/base-images/Dockerfile.builder#L40-L40: resolve the architecture before installation, then fetch and checksum-verifyopenssl-3.5.7-r0.apkbefore installing it by path.infra/docker/base-images/Dockerfile.runtime#L33-L33: apply the same verified installation flow and add the corresponding runtime checksum entry.🧰 Tools
🪛 Hadolint (2.14.0)
[warning] 40-40: Use WORKDIR to switch to a directory
(DL3003)
[warning] 40-40: Pin versions in apk add. Instead of
apk add <package>useapk add <package>=<version>(DL3018)
[info] 40-40: Double quote to prevent globbing and word splitting.
(SC2086)
[warning] 40-40: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check
(DL4006)
🪛 Trivy (0.72.0)
[warning] 40-104: 'RUN cd ...' to change directory
RUN should not be used to change directory: 'apk add --no-cache openssl=3.5.7-r0 && target_arch="${TARGETARCH}"; if [ -z "${target_arch}" ]; then case "$(apk --print-arch)" in aarch64) target_arch="arm64" ;; x86_64) target_arch="amd64" ;; *) echo "Unsupported Alpine arch:$(apk --print-arch)" >&2; exit 1 ;; esac; fi && case "$ {target_arch}" in arm64) apk_arch="aarch64" ;; amd64) apk_arch="x86_64" ;; ) echo "Unsupported TARGETARCH: ${TARGETARCH}" >&2; exit 1 ;; esac && mkdir -p "/tmp/local-repo/${apk_arch}" && for apk_pkg in binutils-2.45.1-r0.apk file-5.46-r2.apk fortify-headers-1.1-r5.apk g++-15.2.0-r2.apk gcc-15.2.0-r2.apk gmp-6.3.0-r4.apk isl26-0.26-r1.apk jansson-2.14.1-r0.apk libatomic-15.2.0-r2.apk libgcc-15.2.0-r2.apk libgomp-15.2.0-r2.apk libmagic-5.46-r2.apk libsharpyuv-1.6.0-r0.apk libstdc++-15.2.0-r2.apk libstdc++-dev-15.2.0-r2.apk libwebp-1.6.0-r0.apk libwebpdecoder-1.6.0-r0.apk libwebpdemux-1.6.0-r0.apk libwebp-dev-1.6.0-r0.apk libwebpmux-1.6.0-r0.apk make-4.4.1-r3.apk mpc1-1.3.1-r1.apk mpfr4-4.2.2-r0.apk musl-1.2.5-r23.apk musl-dev-1.2.5-r23.apk patch-2.8-r0.apk pkgconf-2.5.1-r0.apk zlib-1.3.2-r0.apk zstd-libs-1.5.7-r2.apk ; do wget -qO "/tmp/local-repo/${apk_arch}/${apk_pkg}" "${APK_BASE_URL}/${apk_arch}/${apk_pkg}" || exit 1; done && cd "/tmp/local-repo/${apk_arch}" && sha256sum -c "/tmp/checksums/builder-${apk_arch}.sha256" && openssl genrsa -out /tmp/apk-sign.rsa 2048 2>/dev/null && openssl rsa -in /tmp/apk-sign.rsa -pubout -out /etc/apk/keys/apk-sign.rsa.pub 2>/dev/null && apk index -q -o /tmp/APKINDEX.unsigned.tar.gz /tmp/local-repo/${apk_arch}/.apk && mkdir -p /tmp/sig && openssl dgst -sha1 -sign /tmp/apk-sign.rsa -out /tmp/sig/.SIGN.RSA.apk-sign.rsa.pub /tmp/APKINDEX.unsigned.tar.gz && tar cf /tmp/sig.tar -C /tmp/sig .SIGN.RSA.apk-sign.rsa.pub && head -c $(( $ (wc -c < /tmp/sig.tar) - 1024 )) /tmp/sig.tar | gzip -9 | cat - /tmp/APKINDEX.unsigned.tar.gz > "/tmp/local-repo/${apk_arch}/APKINDEX.tar.gz" && apk add --no-cache --no-network --repositories-file /dev/null --repository /tmp/local-repo binutils file g++ gcc make musl-dev patch pkgconf libwebp-dev && apk add --no-cache --no-network "/tmp/local-repo/${apk_arch}/fortify-headers-1.1-r5.apk" && apk del --no-cache openssl && rm -rf /tmp/local-repo /tmp/checksums /tmp/apk-sign.rsa /tmp/sig /tmp/sig.tar /tmp/APKINDEX.unsigned.tar.gz /etc/apk/keys/apk-sign.rsa.pub'. Use 'WORKDIR' statement instead.
Rule: DS-0013
Learn more
(IaC/Dockerfile)
📍 Affects 2 files
infra/docker/base-images/Dockerfile.builder#L40-L40(this comment)infra/docker/base-images/Dockerfile.runtime#L33-L33🤖 Prompt for AI Agents