Repository navigation
[Deps] Security: enforce patched Node per major in engines - #1144
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eeec45d056
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| }, | ||
| "engines": { | ||
| "node": ">=22.23.4" | ||
| "node": "^22.23.4 || ^24.22.1 || >=26.12.1" |
There was a problem hiding this comment.
Align
pascal doctor with the secured Node range
When the CLI runs on a newly excluded runtime such as Node 23.x, 24.15.0, 25.x, or 26.12.0, packages/cli/src/diagnostics.ts:23-27 still treats every major above 22 as supported and reports a passing Node check. Because the CLI can remain installed or be installed despite an engine warning, pascal doctor can falsely approve the vulnerable runtime this change is intended to reject; update the diagnostic predicate and message from the same version policy as this range.
Useful? React with 👍 / 👎.
What does this PR do?
Follow-up to #1142, addressing its Codex review comment.
engines.node: ">=22.23.4"still allowed vulnerable Node 24.x below 24.22.1, vulnerable 26.x below 26.12.1, and the end-of-life 23 and 25 lines.This PR sets
engines.nodeto^22.23.4 || ^24.22.1 || >=26.12.1in the rootpackage.jsonand inpackages/cli/package.json. The top major stays open; the range is not capped at<27.No other files change.
pascal doctorand the docs are left to Tooling. Nothing in the repo parsesengines: only the twopackage.jsonfiles declare it. The CLI'spascal doctoruses its own hardcoded check and never readsengines, and publishing just passes the field through to npm.Range check (
semver7.8.5, readingengines.nodefrom each file)Versions that must fit the range
ci.ymlandmcp-ci.yml, pinnednode-version: '22.23.4'ci.ymlandrelease.yml,node-version: 22withcheck-latest(latest 22.x on nodejs.org/dist is v22.23.4)node:22.23.4-alpinenodejs>=24.22.1-r0(Alpine 3.24mainAPKINDEX currently has24.22.1-r0)How to test
npx -p semver@7 semver -r '^22.23.4 || ^24.22.1 || >=26.12.1' 22.23.4 24.22.1 26.12.1 27.0.0 22.23.3 23.11.0 24.22.0 25.0.0 26.12.0. Only 22.23.4, 24.22.1, 26.12.1 and 27.0.0 are printed.bun install --frozen-lockfile. It succeeds, and the lockfile is unchanged (I ran this locally).cd packages/cli && npm pack --dry-run. It packs normally (I ran this locally).Screenshots / screen recording
N/A — non-visual change
Checklist
bun devbun checkto verify)mainbranchNote
Low Risk
Metadata-only
enginesupdates with no application logic changes; CI and Docker pins already satisfy the new range.Reviewed by Cursor Bugbot for commit eeec45d. Bugbot is set up for automated code reviews on this repo. Configure here.