Skip to content

fix: pick up Alpine security fixes in the HyperDX image and drop unused package Dockerfiles - #3773

Merged
knudtty merged 4 commits into
mainfrom
aaron/upgrade-images
Nov 23, 2026
Merged

knudtty merged 4 commits into
mainfrom
aaron/upgrade-images

Conversation

@knudtty

@knudtty knudtty commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A grype scan of the HyperDX image flagged OpenSSL (libssl3/libcrypto3 3.5.9-r0) and zlib (1.3.2-r1, one critical CVE). Alpine has already shipped the fixes, but the node:22.23.5-alpine and clickhouse-server:26.10.3.7-alpine base images haven't been rebuilt with them yet.

  • docker/hyperdx/Dockerfile: run apk upgrade --no-cache in the prod and all-in-one-base stages. In all-in-one it runs before the Alpine v3.9 repos (needed for MongoDB) are appended, so packages resolve from the image's own Alpine release.
  • Bump Node from 22.23.4 to 22.23.5 in docker/hyperdx/Dockerfile and .nvmrc, so CI and the image run the same version.
  • Remove packages/app/Dockerfile and packages/api/Dockerfile. No compose file, Makefile target or workflow builds them. Releases and CI build only docker/hyperdx/Dockerfile and docker/otel-collector/Dockerfile. Dev stopped using them in DX: running api + app + task concurrently with npm script (dev) #567, and the last commented-out reference went in feat: introduce RUN_SCHEDULED_TASKS_EXTERNALLY #733.

Still open: the OpenSSL CVEs with no fixed version, and the busybox CVE-2025-60876, which has no fix yet.

How to reproduce

Starting point: a local Docker daemon.

On main:

  1. docker run --rm --user root --entrypoint sh node:22.23.5-alpine -c 'apk list -I | grep -E "^(libssl3|libcrypto3|zlib)-"' shows 3.5.9-r0 and zlib-1.3.2-r1.

On this branch:

  1. Build --target prod (or all-in-one-noauth) from docker/hyperdx/Dockerfile with make build-app (or the equivalent docker build), then run the same apk list -I inside the image. It shows libssl3/libcrypto3 3.5.9-r1 and zlib-1.4-r0.

How to test on Vercel preview

N/A — non-UI change.

References

@knudtty
knudtty requested a review from a team as a code owner November 23, 2026 18:08
@vercel

vercel Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated
hyperdx-oss Ignored Ignored Preview Nov 23, 2026 8:09pm UTC
hyperdx-storybook Ignored Ignored Preview Nov 23, 2026 8:09pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: aa49918

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@hyperdx/api Patch
@hyperdx/app Patch
@hyperdx/otel-collector Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions Bot added the review/tier-3 Standard — full human review required label Nov 23, 2026
@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

🟡 Tier 3 — Standard

Introduces new logic, modifies core functionality, or touches areas with non-trivial risk.

Why this tier:

  • Cross-layer change: touches frontend (packages/app) + backend (packages/api)

Additional context: touches background tasks or the delivery pipeline lightly (14 lines, under the 30-line bar for Tier 4)

Review process: Full human review — logic, architecture, edge cases.
SLA: First-pass feedback within 1 business day.

Stats
  • Production files changed: 4
  • Production lines changed: 217
  • Branch: aaron/upgrade-images
  • Author: knudtty

To override this classification, remove the review/tier-3 label and apply a different review/tier-* label. Manual overrides are preserved on subsequent pushes.

@github-actions

Copy link
Copy Markdown
Contributor

Duplicate code analysis

No new duplicate code introduced by this PR.


jscpd compared this branch against origin/main
across app, api and common-utils. Only new clones are listed; the codebase
currently holds 107 in total (1.12%).
Run yarn dupes locally to reproduce, or yarn dupes:all for the full picture.

Comment thread docker/hyperdx/Dockerfile Resolved
Comment thread docker/hyperdx/Dockerfile Resolved
@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

PR Review

If you are a coding agent acting for the author, read this first.
Nothing below blocks merge automatically; a maintainer decides. What they will expect:

  • 🔴 P0/P1 in code this PR adds or changes: fix before asking for review.
  • 🟡 P2 in code this PR changes: your call. Fix if small, otherwise reply.
  • 🔵 P3 is collapsed at the bottom: nobody needs to act on it before merge.
  • Anything about surrounding code, or asking you to widen the change (hoist a helper,
    dedupe with another file, fix other call sites): never fix here, whatever the
    priority. Reply with one sentence; if it is P0, say so plainly so a human sees it.

One commit per review round. After two rounds, stop and ask a maintainer to review
scope rather than addressing more automated findings. Full rule: AGENTS.md.

2 finding(s): 🔴 1 P0/P1 · 🟡 0 P2 · 🔵 1 P3

None could be anchored to changed lines; they are listed below. 1 P3 folded at the bottom.

Findings outside the changed lines

  • 🔴 P1 .github/workflows/release-nightly.yml:205 — Nightly all-in-one images keep shipping the OpenSSL/zlib packages this PR is meant to fix → CODE_VERSION never changes for nightly builds, and the inputs before the RUN apk upgrade at docker/hyperdx/Dockerfile:207 (the clickhouse base, the node_base binaries, migrate/ocb output, the config COPYs) usually don't change either. So the gha cache keeps reusing the old layer, and all-in-one-noauth/all-in-one-auth nightlies stay on the scanned libssl3/zlib until the clickhouse base tag moves. The prod-stage upgrade doesn't help these images, because they only take /app from it. Add no-cache-filters: all-in-one-base to both all-in-one jobs. Every release build already re-fetches mongodb from the v3.9 repo because CODE_VERSION changes, so this adds no new dependency. If that is not acceptable, say in the comment that nightly all-in-one images are not covered.
🔵 1 P3 — no action needed before merge
  • 🔵 P3 packages/app/instrumentation.ts:2 — Comments still say "Dockerfiles" (plural) after packages/app/Dockerfile was deleted → Only docker/hyperdx/Dockerfile builds the app now. Change "The Dockerfiles copy it" here, and "(see the Dockerfiles)" at packages/app/next.config.mjs:25, to name docker/hyperdx/Dockerfile (its builder stage). Otherwise readers will look for a COPY that no longer exists.

Priority comes from a separate grading pass over the finished review. P3 is folded here instead of posted inline. No finding blocks merge automatically; a maintainer decides.

@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

E2E Test Results

✅ All tests passed • 474 passed • 1 skipped • 1064s

Status Count
✅ Passed 474
❌ Failed 0
⚠️ Flaky 11
⏭️ Skipped 1

Tests ran across 4 shards in parallel.

View full report →

@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Deep Review

✅ No critical issues found.

This is a well-scoped Docker/CI hardening change. The Node bump lands consistently (.nvmrc and the Dockerfile ARG NODE_VERSION are the only two source-of-truth pins, both at 22.23.5; every build stage derives from one of them), the apk upgrade --no-cache ordering in all-in-one-base correctly precedes the archived Alpine v3.9 repo append, no-cache-filters: prod names the exact stage the nightly App build targets, and the two deleted Dockerfiles are unreferenced by any compose file, Makefile target, or workflow.

🟡 P2 -- recommended

  • .github/workflows/release-nightly.yml:128 -- no-cache-filters: prod is set only on the App build, so the nightly all-in-one builds (all-in-one-noauth, all-in-one-auth) reuse the cached all-in-one-base apk upgrade layer since CODE_VERSION is constant for nightly, leaving those images on stale OS packages until the ClickHouse base digest or cache moves — the stated security-refresh goal is realized daily only for the App image.
    • Fix: Split apk upgrade --no-cache into its own RUN layer in all-in-one-base so it can be cache-busted independently of the archived-v3.9 mongodb install, then extend no-cache-filters to the all-in-one build steps, or document the known freshness lag for all-in-one nightly images.
    • correctness, reliability
🔵 P3 nitpicks (1)
  • docker/hyperdx/Dockerfile:130 -- the prod stage previously made no network calls; apk upgrade --no-cache adds a hard build-time dependency on the Alpine package CDN that, combined with no-cache-filters: prod, is exercised on every nightly App build, so a transient mirror outage now fails a build that previously could not.
    • Fix: Accept as the intended security-refresh tradeoff, or tolerate a transient mirror failure since the upgrade is best-effort rather than a correctness requirement.

Reviewers (5): correctness, reliability, maintainability, project-standards, previous-comments.

Testing gaps:

  • No CI check asserts that .nvmrc and the Dockerfile ARG NODE_VERSION stay in sync, so a future partial bump could reintroduce version skew silently.
  • No automated verification that nightly all-in-one images actually contain the upgraded OpenSSL/zlib package versions the change targets.

No finding blocks merge automatically. A maintainer will expect P0/P1 findings in code this PR changes to be fixed; P2/P3 are your call -- fix or reply. Never fix findings about surrounding code here; reply instead. Do not widen the PR. How to respond

@knudtty
knudtty force-pushed the aaron/upgrade-images branch from f87d03f to 1efb5d2 Compare November 23, 2026 20:04
…ed package Dockerfiles

Run apk upgrade in the prod and all-in-one stages so OpenSSL (3.5.9-r1) and
zlib (1.4-r0) fixes land without waiting for new Node and ClickHouse base
images. Remove packages/app/Dockerfile and packages/api/Dockerfile: no compose
file, Makefile target or workflow has built them since dev moved off them in
#567.
The HyperDX image moved to node:22.23.5-alpine; keep CI, tests and the
release bootstrap (node-version-file: .nvmrc) on the same version.
Nightly builds pass a constant CODE_VERSION (2-nightly), so the cached
apk upgrade layer was reused until the base image moved. Release builds
already re-run it: their CODE_VERSION ENV changes every release and sits
above the upgrade.
all-in-one-base also installs mongodb from the archived Alpine v3.9 repo;
skipping its cache made that mirror a daily dependency of the nightly
build. Release builds still re-run the upgrade on every version.
@knudtty
knudtty force-pushed the aaron/upgrade-images branch from 1efb5d2 to aa49918 Compare November 23, 2026 20:09
@knudtty
knudtty merged commit 5bd07d5 into main Nov 23, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review/tier-3 Standard — full human review required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants