From fd23eda3dbb3a1b40c9c5c868efbb5978ce10f16 Mon Sep 17 00:00:00 2001 From: iriseye395 <228796058+iriseye395@users.noreply.github.com> Date: Thu, 29 Oct 2026 04:39:48 +0000 Subject: [PATCH] fix: pin Docker Node image to security release Updates both Node stages to 22.23.4, which includes the security fix referenced by #2110, and adds a regression test preventing the vulnerable floating tag from returning. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- Dockerfile | 4 ++-- tests/scripts/test_docker_compose.py | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 759d2935a..3376bd835 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ # Run on the build platform natively (not under QEMU emulation). # The output is platform-independent static assets (JS/HTML/CSS), # so there is no need to cross-compile this stage. -FROM --platform=$BUILDPLATFORM node:22-slim AS frontend-builder +FROM --platform=$BUILDPLATFORM node:22.23.4-slim AS frontend-builder WORKDIR /app/web @@ -56,7 +56,7 @@ RUN npm run build # Provides the correctly-architected node binary for the final image. # Unlike frontend-builder (pinned to BUILDPLATFORM), this stage pulls # the node image matching each target platform (amd64 / arm64). -FROM node:22-slim AS node-runtime +FROM node:22.23.4-slim AS node-runtime # ============================================ # Stage 2: Python Base with Dependencies diff --git a/tests/scripts/test_docker_compose.py b/tests/scripts/test_docker_compose.py index 68282b296..997c0d362 100644 --- a/tests/scripts/test_docker_compose.py +++ b/tests/scripts/test_docker_compose.py @@ -184,6 +184,14 @@ def test_dockerfile_is_json_driven_without_bundle_sed() -> None: assert "export_runtime_settings_to_env" in content +def test_dockerfile_pins_node_to_security_fixed_version() -> None: + root = Path(__file__).resolve().parents[2] + content = (root / "Dockerfile").read_text(encoding="utf-8") + + assert content.count("node:22.23.4-slim") == 2 + assert "node:22-slim" not in content + + def test_supervisord_runs_as_root_with_unprivileged_children() -> None: """supervisord itself must run as root so it can open the container's stdout/stderr (``/dev/fd/1,2`` — root-owned pipes under a rootful daemon