Repository navigation
fix(deps): build on node 22.23.4 to reject the compromised eMudhra intermediates - #5707
Conversation
…termediates User transformations call out through node-fetch with Node's bundled CA store, which up to 22.23.3 trusts certificates issued under the eMudhra intermediates whose private keys were compromised. 22.23.4 rejects them. The official image ships 22.23.x only on alpine3.23 and alpine3.24, so the base moves to alpine3.24. Its digest is left as a RESOLVE marker until the tag is published. The UT image installs Node from NodeSource's setup_22.x, so its build now fails when that installs anything older than 22.23.4.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #5707 +/- ##
========================================
Coverage 92.29% 92.29%
========================================
Files 731 731
Lines 40633 40633
Branches 9441 9440 -1
========================================
Hits 37501 37501
Misses 2948 2948
Partials 184 184 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Looks right from the eMudhra side. Two optional suggestions, nothing blocking. [nit]
What I checked
|
Pins ubuntu:22.04 by its index digest, and runs apt-get upgrade with an explicit ca-certificates in the first RUN, so the system bundle that curl and other tools read carries the Ubuntu eMudhra fix too.
NodeSource's setup_22.x installs whatever 22.x NodeSource has, which is still 22.23.3, so the UT image could not be pinned to the patched 22.23.4. Node now comes from node:22.23.4-bookworm-slim, the same release the main image runs, and Dependabot keeps the pin current. Its digest is a RESOLVE marker until the tag lists amd64 and arm64. python3 is installed explicitly for node-gyp; the NodeSource package used to pull it in. The version guard goes, since the pinned tag now sets the version.
|
Reviewed from the DT side (main
Ping me once it's undrafted and green, and I'll approve. Post-deploy, I'll verify from a DT pod that |
lvrach
left a comment
There was a problem hiding this comment.
Reviewed for the eMudhra fix. No functional issues. I'm holding approval only on the upstream images, like Sudip.
Checked
- amd64: isolated-vm 6.2.0 builds from source and runs on
node:22.23.3-alpine3.24under amd64 emulation. With your arm64 run, both arches of the Alpine 3.24 move are covered. - Node copied into jammy: the official v22.23.4 binary needs glibc ≤ 2.28 and GLIBCXX ≤ 3.4.21. Jammy has 2.35 and 3.4.30. npm, npx, corepack, the headers and node-gyp are all present.
- Dropped roots (145 → 116): every fixed HTTPS host in
src/that resolves completes a TLS handshake on 22.23.4 exactly as on 22.22.3. That's 243 hosts via Node and 306 via OpenSSL with each bundle, with zero changes. A chain that ends only at an old root does fail, for exampleglobal-root-ca.chain-demos.digicert.com. Customer-configured endpoints are the remaining unknown, and Sudip's post-deploy watch on TLS errors covers them. - The fix itself: the 22.23.4 binary rejects both test hosts with
CERT_REVOKED. 22.22.3 gets HTTP 200.
[praise] Copying Node from the official image, instead of using NodeSource, ties both images to one pinned release and lets Dependabot move them together. That's cleaner than a version guard.
[fyi · pre-existing] The ut- image's HEALTHCHECK calls wget, which ubuntu:22.04 doesn't ship. NodeSource didn't install it either, and Kubernetes ignores Docker's HEALTHCHECK.
🤖 Context for AI review
- Head reviewed: b77bc12, base develop.
- Lanes: Opus blind, Opus adversarial, Codex gpt-6-astra adversarial, Style/Dockerfile. No functional findings. All lanes flagged the expected draft blockers:
node:22.23.4-alpine3.24andnode:22.23.4-bookworm-slimreturn{"manifests":[]}(index sha256:eb37f586…). Do not pin that digest. - Root diff method:
tls.rootCertificatessubjects on Node 22.22.3 vs 22.23.4. Removed: AffirmTrust ×4, COMODO Certification Authority, Certigna, DigiCert Assured ID Root CA, DigiCert Global Root CA, DigiCert High Assurance EV Root CA, Entrust ×3, FIRMAPROFESIONAL CA ROOT-A WEB, GLOBALTRUST 2020, GTS Root R2, QuoVadis Root CA 2 and 3, Secure Global CA, SecureSign Root CA12, SecureTrust CA, SwissSign Gold CA - G2, TeliaSonera Root CA v1, Trustwave ×3, certSIGN, emSign ×3. None added. - Host probe: hosts grepped from
src/v0/destinations,src/cdk,src/v1/destinationsandsrc/featureson develop, tests excluded.tls.connectwith the default CA on each Node version gave 236/243 OK on both, and the same 7 fail on both (DNS or dead hosts). - amd64:
docker run --platform linux/amd64 node:22.23.3-alpine3.24, thenapk add make g++ python3, thennpm i [email protected] --build-from-source, which exited 0, then an Isolate ran6*7and returned 42.
Both tags now list linux/amd64 and linux/arm64, so the RESOLVE markers are replaced with their index digests.
|
|
@ItsSudip @lvrach it's out of draft and green. Both Locally, both final images run Node v22.23.4, and a UT |
lvrach
left a comment
There was a problem hiding this comment.
LGTM. Both digests match the published indexes (amd64 + arm64), all four image builds are green, and the nits are addressed.
Also checked locally on this head: both images build. Node 22.23.4 rejects both eMudhra test hosts with CERT_REVOKED in each image, and /health returns 200.



What are the changes introduced in this PR?
Moves both images to Node 22.23.4, the first 22.x release that rejects certificates issued under the eMudhra intermediates whose private keys were compromised (https://emudhra.we-have-a-problem.com/).
.nvmrc- 22.22.3 to 22.23.4, so CI runs on the patched release.Dockerfile-node:22.22.3-alpine3.22tonode:22.23.4-alpine3.24. The official image publishes 22.23.x only on alpine3.23 and alpine3.24, so the Alpine version has to move too; 3.24 is the one that stays supported longest.Dockerfile-ut-func- Node now comes from the officialnode:22.23.4-bookworm-slimimage (COPY --fromofnode, its headers andnode_modules, plus thenpm,npxandcorepacklinks) instead of NodeSource'ssetup_22.x. NodeSource still serves 22.23.3, andsetup_22.xinstalls whatever it has, so the UT image could not be pinned to a patched release that way. The version is now the pinned tag, the same release the main image runs, and Dependabot keeps it current.python3is installed explicitly because node-gyp needs it and the NodeSource package used to pull it in.Dockerfile-ut-func(review suggestions) -ubuntu:22.04is pinned by index digest, and the firstRUNaddsapt-get upgrade -yand an explicitca-certificates, so the system bundle thatcurlreads carries the Ubuntu fix too.The main image (destination transformations) moves too, because both images and CI share
.nvmrc.What is the related Linear task?
Part of https://linear.app/rudderstack/issue/SEC-607
Please explain the objectives of your changes below
fetchandfetchV2in user transformations go throughnode-fetchon anhttps.Agentwith nocaoption (src/util/ivmFactory.js,src/util/utils.js). Nothing sets--use-openssl-ca,--use-system-caorNODE_EXTRA_CA_CERTS: not this repo, not rudderstack-operator, not rudder-devops, whereNODE_OPTIONSis only--no-node-snapshot. Node's bundled root store therefore decides what is trusted, and a patched systemca-certificatesdoes not help.How this was verified:
*-emudhra.we-have-a-problem.comtest hosts, usinghttps.getwith the default CA store. 22.22.3 (what ships today) and 22.23.3 both trust the six emSign-chained hosts. 22.23.4 rejects all twelve withCERT_REVOKED.node:22.23.3-alpine3.24as a stand-in until 22.23.4 is published: theproductiontarget builds (includingisolated-vm),/healthis up, and a/transformation/testrun withfetchV2works. That run also trusteddv-g3b-emudhra.we-have-a-problem.comwhile the image hadca-certificates-bundle-20261020-r0installed, which confirms the system store is not on this path. Apart fromNODE_VERSION, the image config (Env,Entrypoint,Cmd,WorkingDir) of the old and stand-in bases is identical.node:22.23.3-bookworm-slimas a stand-in: theproductiontarget builds, withisolated-vm6.2.0 compiled from source through node-gyp andpython3.node,npm,npxandcorepackresolve from/usr/local/binfor thenodeuser,ca-certificatesis20260816ubuntu0.22.04.1,/healthis up, and a/transformation/testrun withfetchV2works./transformation/testrun withfetchV2in each gets200fromhttps://example.com/andCERT_REVOKEDfromhttps://dv-g3b-emudhra.we-have-a-problem.com/. The arm64 manifests in both pinned indexes are the same images that rejected all twelve test hosts..nvmrc.Both bases are pinned by index digest. When Docker Hub adds the remaining architectures to these tags, the tags move to new indexes and Dependabot will offer the new digests; the pinned indexes already carry
linux/amd64andlinux/arm64.Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?
Node 22.23.x also ships Mozilla's earlier root removals: the bundled store drops from 145 to 116 roots between 22.22.3 and 22.23.4, including
DigiCert Global Root CA,DigiCert Assured ID Root CAandGTS Root R2. A transformation that calls an endpoint whose chain still ends only at one of those roots will start failing TLS. The matching rudder-pytransformer change (https://github.com/rudderlabs/rudder-pytransformer/pull/145) drops the same roots through certifi, so JS and Python transformations keep trusting the same set.In the UT image,
node,npmandnpxmove from/usr/binto/usr/local/bin, which comes first on the defaultPATH.Any new dependencies introduced with this change?
N/A
Any new generic utility introduced or modified. Please explain the changes.
N/A
Any technical or performance related pointers to consider with the change?
Alpine 3.22 to 3.24 changes the musl and g++ toolchain that builds
isolated-vm; the stand-in build above covers it on arm64 only.Developer checklist
My code follows the style guidelines of this project
No breaking changes are being introduced.
All related docs linked with the PR?
All changes manually tested?
Any documentation changes needed with this change?
Is the PR limited to 10 file changes?
Is the PR limited to one linear task?
Are relevant unit and component test-cases added in new readability format?
Reviewer checklist
Is the type of change in the PR title appropriate as per the changes?
Verified that there are no credentials or confidential data exposed with the changes.