Skip to content

fix(security): require patched Node 24 runtime for lambda images - #81

Merged
imperfect-fourth merged 7 commits into
mainfrom
imperfect-fourth/emudhra-connector-tls
Oct 26, 2026
Merged

imperfect-fourth merged 7 commits into
mainfrom
imperfect-fourth/emudhra-connector-tls

Conversation

@imperfect-fourth

@imperfect-fourth imperfect-fourth commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Changes

  • Image build fails unless the installed Node is 24.x >= 24.22.1 (NodeSource node_24.x stays unpinned, as on main).
  • Ubuntu ca-certificates package floor in the image build.
  • .nvmrc bumped from lts/iron (Node 20) to lts/krypton (latest Node 24 LTS) so CI/dev track the same line as the image runtime.
  • @hasura/ndc-sdk-typescript bumped to ^8.5.1 (pulls @grpc/grpc-js 1.14.6).
  • Tests: .mocharc.json sets --no-experimental-strip-types, since Node 24's native type stripping intercepts ts-node in the mocha loader (angle-bracket assertions fail). Connector runtime is unaffected (verified: a function using enums + angle-bracket assertions serves correctly on Node 24.22.1 without the flag), so no image-wide NODE_OPTIONS.
  • Nix dev shell: nodejs_20 -> nodejs_24 and flake.lock updated. nixpkgs has 24.21.0 for now, so the dev shell does not have the TLS fix yet. Run nix flake update again once nixpkgs ships 24.22.1.

No change to @hasura/ndc-lambda-sdk engines or the template's node >=20; npm consumers are unaffected.

Validation

  • Node 24.22.1: npm ci, build, 122 SDK tests passing.

Follow-ups

  • Build the image and test against the incident TLS chains.

Incident: https://emudhra.we-have-a-problem.com/

@imperfect-fourth imperfect-fourth changed the title fix(security): select patched OS trust for Node lambda images fix(security): require patched Node 24 runtime for lambda images Oct 22, 2026
@imperfect-fourth
imperfect-fourth marked this pull request as ready for review October 22, 2026 11:12
@imperfect-fourth
imperfect-fourth requested review from daniel-chambers and shahidhk and removed request for daniel-chambers October 22, 2026 11:12
@imperfect-fourth
imperfect-fourth enabled auto-merge (squash) October 22, 2026 11:18
Comment thread Dockerfile
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_24.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
&& apt-get update \
&& apt-get install -y nodejs \
&& node -e 'if (Number(process.versions.node.split(".")[0]) !== 24) process.exit(1)' \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surely we want 24 or above rather than only accepting Node 24?

Comment thread Dockerfile
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_24.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
&& apt-get update \
&& apt-get install -y nodejs \
&& node -e 'if (Number(process.versions.node.split(".")[0]) !== 24) process.exit(1)' \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
&& node -e 'if (Number(process.versions.node.split(".")[0]) !== 24) process.exit(1)' \
&& node -e 'if (Number(process.versions.node.split(".")[0]) < 24) process.exit(1)' \

Something like this?

Comment thread flake.nix
packages = [
pkgs.nixfmt
pkgs.nodejs_20
pkgs.nodejs_24

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this is the way

@imperfect-fourth
imperfect-fourth removed the request for review from shahidhk October 26, 2026 09:39
@imperfect-fourth
imperfect-fourth merged commit 281ce74 into main Oct 26, 2026
4 checks passed
@imperfect-fourth
imperfect-fourth deleted the imperfect-fourth/emudhra-connector-tls branch October 26, 2026 09:43
@github-actions github-actions Bot mentioned this pull request Oct 26, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants