From 6c45f84eae1bcf4913eb5122ff29b49264162532 Mon Sep 17 00:00:00 2001 From: Sam Morrow Date: Wed, 18 Feb 2026 16:39:53 +0100 Subject: [PATCH] fix: pin Docker base images to SHA256 digests Pin all three Dockerfile base images to their SHA256 digests to resolve code scanning alerts for unpinned Docker images. Dependabot docker ecosystem is already configured and will keep these digests up to date. - node:20-alpine (alert #14) - golang:1.25.7-alpine (alert #15) - gcr.io/distroless/base-debian12 (proactive) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index cc81c5145..90c8b4007 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20-alpine AS ui-build +FROM node:20-alpine@sha256:09e2b3d9726018aecf269bd35325f46bf75046a643a66d28360ec71132750ec8 AS ui-build WORKDIR /app COPY ui/package*.json ./ui/ RUN cd ui && npm ci @@ -7,7 +7,7 @@ COPY ui/ ./ui/ RUN mkdir -p ./pkg/github/ui_dist && \ cd ui && npm run build -FROM golang:1.25.7-alpine AS build +FROM golang:1.25.7-alpine@sha256:f6751d823c26342f9506c03797d2527668d095b0a15f1862cddb4d927a7a4ced AS build ARG VERSION="dev" # Set the working directory @@ -30,7 +30,7 @@ RUN --mount=type=cache,target=/go/pkg/mod \ -o /bin/github-mcp-server ./cmd/github-mcp-server # Make a stage to run the app -FROM gcr.io/distroless/base-debian12 +FROM gcr.io/distroless/base-debian12@sha256:937c7eaaf6f3f2d38a1f8c4aeff326f0c56e4593ea152e9e8f74d976dde52f56 # Add required MCP server annotation LABEL io.modelcontextprotocol.server.name="io.github.github/github-mcp-server"