Repository navigation
fix: enforce patched Node versions at startup and HTTP requests - #27
Merged
Merged
Conversation
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.
PR #26 is merged, but its Node requirement (
>=22.23.4) also admits vulnerable early 24.x/26.x releases, and both lockfiles still advertise Node 20. Package engine declarations alone also do not stop an already-installed application from running on an old executable.This follow-up enforces
^22.23.4 || ^24.22.1 || ^26.12.1in both packages and lockfiles, enables npm engine enforcement, and checks the running Node version at Next.js startup and before all inspected outbound fetch calls. The checks cover direct Next.js invocation and HTTP clients invoked without npm lifecycle hooks. Unsupported majors and prereleases fail with an actionable error.CI retains the patched 22.23.4 pin, uses
npm ci, and now runs on pushes to the actual default branch (master). The compressed-request guard remains in place; its comments now explain that handler-level rejection cannot protect decoding performed earlier by a framework/proxy or by outbound fetch.Validation in an isolated workspace using the official Node 22.23.4 Linux binary, verified against its published SHA-256:
eval/: npm run ci: 40 cases load, ESM check passes, 76/76 tests pass.agentic-eval/: npm test: 31/31 tests pass.claude.jsis preserved.No model API evaluations or deployment changes were performed. Existing deployments still need the patched Node executable installed, services restarted, and containers rebuilt/recreated. After this change, an old runtime will intentionally fail startup or outbound requests.
Reference: https://nodejs.org/en/blog/vulnerability/october-2026-security-releases