From 41a12724f62ba214861b333fed031b5a82ce4011 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=27=C3=A9lectron=20rare?= <108685187+electron-rare@users.noreply.github.com> Date: Thu, 9 Jul 2026 12:40:21 +0200 Subject: [PATCH] build: pin docker base images by digest Floating tags node:22-alpine and nginx:1.27-alpine let upstream swap image contents without review. Pin both FROM lines to their current digest per the supply-chain policy, keeping the tag as a trailing comment for readability. --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index d8df271..fa321f7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,12 @@ -FROM node:22-alpine AS build +FROM node:22-alpine@sha256:16e22a550f3863206a3f701448c45f7912c6896a62de43add43bb9c86130c3e2 AS build +# node:22-alpine WORKDIR /app COPY package.json package-lock.json ./ RUN npm ci COPY . . RUN npm run build -FROM nginx:1.27-alpine +FROM nginx:1.27-alpine@sha256:65645c7bb6a0661892a8b03b89d0743208a18dd2f3f17a54ef4b76fb8e2f2a10 +# nginx:1.27-alpine COPY nginx.conf /etc/nginx/conf.d/default.conf COPY --from=build /app/dist /usr/share/nginx/html