diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d8edade..465b92c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,6 +14,14 @@ - **Describe the change.** State the problem, the behavior change and what you tested. A pull request with no description is a request for changes. - **Provider support stays generic.** Any OpenAI- or Anthropic-compatible endpoint works through a model profile; provider convenience goes in as a neutral preset (name and base URL) or a docs recipe, with no vendor logos, promotional codes, baked vendor endpoints, or vendor-specific environment variables. A new wire format needs a schema migration, a profile save/load test, and a live connection test. +## Updating Docker image pins + +The Dockerfile and the PostgreSQL service in `docker-compose.yml` use a readable tag followed +by a digest. Review these pins regularly for upstream security updates. When refreshing a pin, +run `docker buildx imagetools inspect :` and use the top-level index digest. Check +that the index includes `linux/amd64` and `linux/arm64` before proposing the update. Record the +old and new digests in the PR so reviewers can verify the change. + ## Issues - One problem per issue. Include the version or commit, what you ran and what you expected. diff --git a/Dockerfile b/Dockerfile index 749e64d..d9fabf4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ # ---------------------------------------------------------------- frontend --- # Pinned to the Node 22 line the CI/release workflows use. On the build platform # only; the frontend static export is architecture-independent. -FROM --platform=$BUILDPLATFORM node:22-bookworm-slim AS web +FROM --platform=$BUILDPLATFORM node:22-bookworm-slim@sha256:e9f565d32859f0cbfb52125eafe8be39390f24dac302dc3cdf566e8ba3ab21ee AS web ENV NEXT_TELEMETRY_DISABLED=1 WORKDIR /src/web COPY web/package.json web/package-lock.json ./ @@ -26,7 +26,7 @@ RUN npm run build:static # GOTOOLCHAIN=local, so a floating 1.26 tag that lags go.mod fails the build; # bump this together with the go line in go.mod. The binary is CGO-free, so this # stage runs on the build platform and cross-compiles to $TARGETARCH without QEMU. -FROM --platform=$BUILDPLATFORM golang:1.26.11-bookworm AS build +FROM --platform=$BUILDPLATFORM golang:1.26.11-bookworm@sha256:dc40a13b61304647ed7e5d581d246b86413dfc29d63c6d018310feb93cd98fc0 AS build WORKDIR /src COPY go.mod go.sum ./ RUN go mod download @@ -67,7 +67,7 @@ RUN ARTEX_SKIP_FRONTEND=1 \ # # sqlmap has no release binaries: it is a shallow clone of a pinned tag, checked # against the expected commit, which is the same idea. -FROM --platform=$BUILDPLATFORM debian:bookworm-slim AS tools +FROM --platform=$BUILDPLATFORM debian:bookworm-slim@sha256:734a72b3d6142a71993b4bc580ca01d8ca687f77a2c422d96a961d3376b179bc AS tools ARG TARGETARCH ARG NUCLEI_VERSION=v3.11.1 ARG NUCLEI_SHA256_AMD64=ea63d4ae232808cd7c6bc00d0142428e231fab59dae01042246097d195835ab6 @@ -158,7 +158,7 @@ RUN set -eux; \ test "$count" -gt 10000 # ---------------------------------------------------------------- runtime --- -FROM python:3.12-slim-bookworm +FROM python:3.12-slim-bookworm@sha256:935c3c5b12357a7e10caa9c1e6ca5692344d97cf229832ef584be2cec9fc03df ARG TARGETARCH # Common tools: ripgrep / curl / vim, plus a set of recon staples (add/remove as needed). RUN apt-get update && apt-get install -y --no-install-recommends \ diff --git a/docker-compose.yml b/docker-compose.yml index be89a5d..4ef1548 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ services: postgres: - image: postgres:16-alpine + image: postgres:16-alpine@sha256:f2f98726820d0342055351c6e9d36e705f5bfffb3dd53ff556325114b08afb6d environment: POSTGRES_USER: ${POSTGRES_USER:-artex} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Please set POSTGRES_PASSWORD in .env}