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>
This commit is contained in:
iriseye395
2026-10-29 04:39:48 +00:00
parent 18aaa11697
commit fd23eda3db
2 changed files with 10 additions and 2 deletions

View File

@@ -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

View File

@@ -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