Repository navigation
fix(docker): rebuild image on patched base images to clear Wiz HIGH (c0df3804) - #151
Merged
Merged
Conversation
Bump the build and runtime base images off EOL releases to patched, actively-maintained tags and refresh OS packages during build, clearing the OS/package vulnerabilities Wiz flagged (issue c0df3804) on the internet-facing heimdall image. - golang:1.25.0 -> golang:1.27.2 (Go 1.25 reached EOL 2026-08-19; the Go toolchain is also copied into the runtime stage, so this patches the shipped image too) - node:20-bookworm / node:20-bookworm-slim -> node:24-* (Node 20 reached EOL 2026-04-30 and is unpatched; 24 is the active LTS) - add `apt-get upgrade -y` to both apt-using stages so installed Debian bookworm packages are upgraded to current security-patched versions Pinning style is preserved (explicit patch tag for golang, major tag for node, matching the prior convention). Entrypoint, exposed ports, and runtime behavior are unchanged; no application logic changed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Reviewed Dockerfile at a08e6b0: golang:1.25.0 → 1.27.2, node:20-bookworm(-slim) → node:24-bookworm(-slim), and apt-get upgrade -y in the builder and runtime stages.
What I checked:
go.moddeclaresgo 1.25.0with notoolchainline, so Go 1.27.2 builds it with the same language semantics and GODEBUG defaults.- The unsuffixed
golangtag is trixie-based for both the old and new versions. The builder OS and glibc are therefore unchanged relative to the bookworm runtime. - Node 24 still bundles corepack, so
corepack prepare pnpm@10.28.2keeps working in the web-builder and runtime stages. - The entrypoint, CMD, runtime layout and copied artifacts are unchanged.
- Version pinning is preserved: a patch tag for Go, a major tag for Node.
- The changes meet the acceptance criteria for the requested scope (patched base images plus package upgrades) with no app logic changes.
Nothing to flag. The CI setup-go 1.25.0 mismatch is already called out in the PR as a follow-up.
Ankur Gupta (ankur-pattern)
previously approved these changes
Oct 13, 2026
The base-image bump does not touch the Next.js app the container serves. next@16.1.6 is affected by the unauthenticated image-optimization RCE fixed in 16.3.3 (GHSA-2xp9-vwfh-vxw4). Pin Next and eslint-config-next to 16.3.8 so the rebuilt image no longer ships that vulnerability.
Mayuresh Pawar (Mayureshpawar29)
requested a review
from Ankur Gupta (ankur-pattern)
October 13, 2026 07:14
Ankur Gupta (ankur-pattern)
approved these changes
Oct 13, 2026
There was a problem hiding this comment.
Re-reviewed at 0e7c0be. Two commits are new since the last Argus pass (a08e6b0): 0dd9c6c bumps Next.js and 0e7c0be removes apt-get upgrade.
- Next.js bump (
0dd9c6c) looks correct. GHSA-2xp9-vwfh-vxw4 is a critical unauthenticated RCE affectingnext >=16.0.0 <16.3.3, so16.3.8clears it. The lockfile resolvesnextandeslint-config-nextto16.3.8with no16.1.xleft. Its transitivesharp0.34→0.35 bump requires node>=20.9.0, which Node 24 satisfies. Changing the version from^16.1.6to an exact pin tightens pinning rather than loosening it. - The PR description is out of date. It still lists "
apt-get upgrade -yadded to both apt-using stages" as a change, which0e7c0bereverted. It also does not mention the Next.js RCE fix, which is the most security-relevant change in the PR. Please update the Summary/Changes so reviewers and the Wiz ticket reflect what actually ships. - See the inline comment on
Dockerfile:38about removing the package upgrade.
Contributor
Author
|
Thanks for the re-review @argus-pattern. Addressed the PR-description points:
Inline thread on |
prasadlohakpure
approved these changes
Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rebuilds the internet-facing
heimdallcontainer image on patched, actively-maintained base images and patches a critical Next.js RCE, clearing the OS/package and application vulnerabilities Wiz flagged as HIGH (issuec0df3804, due ~Nov 6) that enable initial access.The build definition is a single multi-stage
Dockerfile. The runtime stage copies the Go toolchain out of the builder (COPY --from=go-builder /usr/local/go), so thegolangbase version is part of the shipped image surface, not just a build-time concern.Changes
golang:1.25.0→golang:1.27.2— Go 1.25 reached end-of-life on 2026-08-19 and no longer receives security fixes; 1.27.2 (2026-10-08) is current. go.mod declaresgo 1.25.0with notoolchaindirective, so 1.27.2 builds it with no source changes.node:20-bookworm/node:20-bookworm-slim→node:24-bookworm/node:24-bookworm-slim— Node 20 reached EOL on 2026-04-30 and is now unpatched; 24 is the active LTS. Next 16 / React 19 / pnpm 10.28.2 all support Node 24.^16.1.6→ exact16.3.8(bothnextandeslint-config-nextinweb/package.json) — clears GHSA-2xp9-vwfh-vxw4, a critical unauthenticated RCE affectingnext >=16.0.0 <16.3.3. The lockfile resolvesnextandeslint-config-nextto16.3.8with no16.1.xremaining; the transitivesharp0.34→0.35 bump requires node>=20.9.0, satisfied by Node 24. Moving from a caret range to an exact pin tightens pinning rather than loosening it.OS package freshness (no blanket
apt-get upgrade)An earlier revision added
apt-get upgrade -yto the apt-using stages; it was deliberately removed (commit0e7c0be, "avoid blanket package upgrades") to avoid pulling in unrelated, non-security package changes at build time that make the image non-reproducible and widen the diff beyond the flagged CVEs. The base images are pinned to current, in-support tags (node:24-bookworm{,-slim},golang:1.27.2), which already carry the patched Debian bookworm packages as published.Base-image freshness is guaranteed by rebuilds:
docker-image.ymlrebuilds and pushes on every push tomainand onv*/latesttags, and each build re-pulls the base image tags, so a merge (or re-tag) picks up newer bookworm security packages without a blanket in-image upgrade. If future Wiz scans flag a bookworm package CVE that is patched upstream but not yet in the base tag, the narrower remediation is toapt-get install --only-upgradethe specific affected packages rather than reintroduce a blanket upgrade.Pinning / behavior
golang, major tag fornode, exact version fornext— matching or tightening the repo's existing convention (not loosened)./usr/local/bin/entrypoint.sh), exposed port (9090), and runtime behavior unchanged. No application logic changed beyond the base-image bumps and the Next.js version pin.Follow-up: CI Go version (out of scope here)
.github/workflows/build.ymlstill pinssetup-goto the now-EOL1.25.0. Aligning it to1.27.2would be consistent with this change, but theoly-agents[bot]App lacksworkflowspermission, so it is left for a human to update.On the "admin path / cleartext cloud key" question
The Slack request asked whether the Wiz admin-privilege path is real, noting it's "often a cleartext cloud key on the box." I checked: no cloud credentials are baked into this image or repo.
configs/local.yaml(shipped to/etc/heimdall/heimdall.yaml) contains only DB/plugin/command config and no secrets; AWS credentials are supplied purely via environment variables at runtime (docker-compose.yaml), and.dockerignoreexcludes**/.env,**/*.pem, and**/.aws. So within this repo there is no cleartext cloud key to remediate. If Wiz still reports a reachable admin path after this rebuild, it is likely rooted in the deployment environment (instance/task role, env injection) rather than the image contents, and should be triaged there.Validation
This environment has no Docker, Go, or Node toolchain, so I could not run the image build or test suite locally. The changes are self-consistent (compatible version directives, preserved pnpm/corepack setup, lockfile resolves the pinned Next.js). Build + test run in CI (
build.yml→./build.sh --go --ui --test) and the image build indocker-image.yml; please confirm both pass before merge.Oly run: https://oly.pattern.com/runs/01a132c9-68fe-7739-871b-3029f35cf8db
Requested by: mayuresh.pawar@pattern.com
🤖 Generated with Claude Code