Skip to content

Commit d0cdf2b

Browse files
committed
Pin Docker base image digests for supply chain security
1 parent 15165fb commit d0cdf2b

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

docker/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
ARG BUILDKIT_VERSION=v0.28.0
2+
ARG BUILDKIT_DIGEST=sha256:37539dd4d60fc70968d164d3850d903a2c56f6402214a1953fbf9fcb81ada731
23
ARG CNI_VERSION=v1.9.0
34
ARG ALPINE_RELEASE=3.23
5+
ARG ALPINE_DIGEST=sha256:25109184c71bdad752c8312a8623239686a9a2071e8825f20acb8f2198c3f659
6+
47
# Prepare dependencies
5-
FROM alpine:$ALPINE_RELEASE AS deps
8+
FROM alpine:${ALPINE_RELEASE}@${ALPINE_DIGEST} AS deps
69
ARG CNI_VERSION
710
RUN apk add --no-cache curl gettext && \
811
mkdir -p /opt/cni/bin && \
@@ -11,7 +14,7 @@ RUN apk add --no-cache curl gettext && \
1114
| tar -C /opt/cni/bin -xz ./bridge ./host-local ./loopback
1215

1316
# Final image
14-
FROM moby/buildkit:${BUILDKIT_VERSION}
17+
FROM moby/buildkit:${BUILDKIT_VERSION}@${BUILDKIT_DIGEST}
1518

1619
LABEL org.opencontainers.image.title="buildcage" \
1720
org.opencontainers.image.description="Secure Docker build environment with network access control" \

test/Dockerfile.audit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine:latest
1+
FROM alpine:3.23@sha256:25109184c71bdad752c8312a8623239686a9a2071e8825f20acb8f2198c3f659
22

33
# DNS check
44
RUN echo "=== DNS Configuration ===" && \

test/Dockerfile.restrict

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine:latest
1+
FROM alpine:3.23@sha256:25109184c71bdad752c8312a8623239686a9a2071e8825f20acb8f2198c3f659
22

33
# DNS check
44
RUN echo "=== DNS Configuration ===" && \

test/test-dns/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine:latest
1+
FROM alpine:3.23@sha256:25109184c71bdad752c8312a8623239686a9a2071e8825f20acb8f2198c3f659
22

33
RUN apk add --no-cache dnsmasq
44

test/test-server/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM nginx:alpine
1+
FROM nginx:stable-alpine3.23-slim@sha256:b33eedfdf089be1f83759ced27b4deec5b6f1b6fc2a6819ebce0ae351a4406e5
22

33
RUN apk add --no-cache openssl
44

0 commit comments

Comments
 (0)