fix(deps): override nanoid to 3.3.18 to patch high-severity vulnerabi… - #1458
Merged
Conversation
Coverage reportTotal coverage
Show files with reduced coverage 🔻Reduced coverage
Report generated by 🧪jest coverage report action from c776770 |
mulahasanovic
approved these changes
Aug 10, 2026
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.
Issue
npm auditflags a high-severitynanoidvulnerability (GHSA-2v37-7h3g-55p8, and GHSA-28wg-ghj8-5hjv — both fixed innanoid@3.3.17) reachable from a production dependency chain:child-shell@5.0.0— the latest published version, already whatnode-powershell@5.0.1depends on — declares"nanoid": "^3.1.30", a range that permits anything up to (but not including)4.0.0, including every vulnerable3.xrelease. Bumpingnode-powershell/child-shelldoesn't help since both are already at their latest versions; the loose range itself is the problem, not a stale pin.Intent
Eliminate the vulnerable
nanoidresolution from@sasjs/cli's own published dependency tree without waiting on an upstreamchild-shellrelease, and without changing anynode-powershell/child-shellbehavior —nanoid's public API is unchanged between the vulnerable and patched versions within the3.xline.Implementation
nanoidentry to the existingoverridesblock inpackage.json, pinning it to3.3.18(latest3.xpatch release, well withinchild-shell's own^3.1.30range so no code changes are required):package-lock.json—npm ls nanoidnow showsnanoid@3.3.18 overriddenunderchild-shell.npm audit fixalso cleared two unrelated, freshly-disclosed advisories (brace-expansion,js-yaml) picked up in the same pass.npm auditnow reports 0 vulnerabilities.Checks
npm run lint:fix).npm test).Reviewer checks