From 0aadcfa294a7eb2e70a2b0adac2e06d5d4e54954 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 18 Nov 2026 09:45:17 +0000 Subject: [PATCH] Take Alpine's security fixes in each image build The released image still has zlib 1.3.2-r1 (CVE-2026-4738), so the Security workflow's image scan fails. Upgrade the runtime stage's packages and build that stage without the cache when publishing, as plasto and the other apps do. The scan passes once the next release is published. --- .github/workflows/ci.yml | 2 ++ Dockerfile | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b3ca27c..ec2fd80 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,6 +98,8 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha + # Run the runtime stage fresh, so each release takes Alpine's latest security fixes. + no-cache-filters: runtime cache-to: type=gha,mode=max # A signed statement of which workflow and commit built the image; check it with # `gh attestation verify oci://: --repo /`. diff --git a/Dockerfile b/Dockerfile index 32534ec..ee4c357 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,8 +22,10 @@ RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH GOARM=${TARGETVARIANT#v} \ go build -trimpath -ldflags="-s -w" -o /splitwiz . # --- runtime --- -FROM alpine:3.24@sha256:f59abe656b692d901e184be3445e084786602108599d2a51d229c0f5a48c71bf -RUN apk add --no-cache ca-certificates tzdata +FROM alpine:3.24@sha256:f59abe656b692d901e184be3445e084786602108599d2a51d229c0f5a48c71bf AS runtime +# Take Alpine's security fixes now rather than waiting for the base image to be rebuilt. +RUN apk upgrade --no-cache \ + && apk add --no-cache ca-certificates tzdata WORKDIR /app COPY --from=backend /splitwiz /app/splitwiz COPY --from=web /web/dist /app/pb_public