Repository navigation
chore: require Node.js patched for CVE-2026-111497 - #64
Conversation
The CLI ships no Brotli package, but fetch (undici) decompresses Content-Encoding: br responses with Node's bundled Brotli decoder, which CVE-2026-111497 (out-of-bounds write) affects. Raise engines to the first patched release of each supported line and drop Node 20, which is EOL and never received the fix. CI now tests on Node 22 and 24. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Pull Request Overview
The runtime requirement is documented but not enforced: npm engine constraints can be ignored, and direct CLI execution remains possible on unsupported Node.js versions. Add an early startup guard before network initialization and test supported and rejected boundaries.
The lockfile synchronization requirement also appears unaddressed, and the specified installation, CI runtime, and lockfile checks are missing. These gaps should be resolved before merging.
Test suggestions
- Verify the package engine constraint accepts only the specified patched Node.js release ranges.
- Verify installation on an unsupported Node.js release emits an EBADENGINE warning, while installation on a patched release does not.
- Run CI build, smoke test, and test suite on Node.js 22 and 24.
- Verify the lockfile root version is synchronized with the package version.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify the package engine constraint accepts only the specified patched Node.js release ranges.
2. Verify installation on an unsupported Node.js release emits an EBADENGINE warning, while installation on a patched release does not.
3. Run CI build, smoke test, and test suite on Node.js 22 and 24.
4. Verify the lockfile root version is synchronized with the package version.
TIP How was this review? Give us feedback
| "license": "ISC", | ||
| "engines": { | ||
| "node": ">=20" | ||
| "node": "^22.23.4 || ^24.22.1 || >=26.12.1" |
There was a problem hiding this comment.
🔴 HIGH RISK
Add an early startup check for the supported patched Node.js ranges before network or API initialization. The engines field is advisory and does not prevent execution on a vulnerable runtime; the guard should emit a clear upgrade message and exit nonzero for unsupported versions.
TIP React 👍 if this review is right, or reply with what's wrong and how it could be better to help improve the reviewer.
There was a problem hiding this comment.
Not adding a guard in this PR, on purpose: a runtime version check was considered and left out. engines is meant to be advisory here. A hard exit would break the CLI for everyone on an unpatched 22/24 point release, and the realistic exposure (a malicious br body from app.codacy.com / cveawg.mitre.org over verified TLS) is low. If we want enforcement later, a warn-only check is the likely shape, in a separate PR.
🤖 Generated by /pr-fixup command
|
Re the Codacy review:
🤖 Generated by /pr-fixup command |
Summary
fetch(undici) decompressesContent-Encoding: brresponses through that decoder, so the runtime is the exposure.enginesgoes from>=20to^22.23.4 || ^24.22.1 || >=26.12.1, the first patched release of each line. Node 20 is EOL and was never patched, so it is dropped. The CI matrix moves from[20, 22]to[22, 24].minor:enginesonly warns on install and does not block it. Say so if you'd rather ship this asmajor.version(1.9.0→1.14.0).Test plan
npm installon Node < 24.22.1 (24.x) shows anEBADENGINEwarning; on a patched Node it doesn't🤖 Generated with Claude Code