From 0ed2d02dfe1fa07c3f308f2853d2fcd3953918a2 Mon Sep 17 00:00:00 2001 From: user Date: Fri, 20 Feb 2026 10:45:02 -0800 Subject: [PATCH] fix: pin all external refs to cryptographic identity (closes #118) - Pin Docker base images to sha256 digests (golang, alpine) - Pin go install commands to commit SHAs (not version tags) - golangci-lint: 5d1e709b7be35cb2025444e19de266b056b7b7ee (v2.10.1) - goimports: 009367f5c17a8d4c45a961a3a509277190a9a6f0 (v0.42.0) - CI workflow was already correctly pinned to commit SHAs All references now use cryptographic identity, eliminating RCE risk from mutable tags. --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4f425ea..70cc64b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ # Build stage -FROM golang:1.25-alpine AS builder +FROM golang@sha256:f6751d823c26342f9506c03797d2527668d095b0a15f1862cddb4d927a7a4ced AS builder # golang:1.25-alpine RUN apk add --no-cache git make gcc musl-dev # Install golangci-lint v2 -RUN go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest -RUN go install golang.org/x/tools/cmd/goimports@latest +RUN go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@5d1e709b7be35cb2025444e19de266b056b7b7ee # v2.10.1 +RUN go install golang.org/x/tools/cmd/goimports@009367f5c17a8d4c45a961a3a509277190a9a6f0 # v0.42.0 WORKDIR /src COPY go.mod go.sum ./ @@ -20,7 +20,7 @@ RUN make check RUN make build # Runtime stage -FROM alpine:3.19 +FROM alpine@sha256:6baf43584bcb78f2e5847d1de515f23499913ac9f12bdf834811a3145eb11ca1 # alpine:3.19 RUN apk add --no-cache ca-certificates tzdata git openssh-client docker-cli