fix(deps): pin nanoid >= 3.3.18 in archives/serenity (GHSA-2v37-7h3g-55p8, Dependabot #37) - #196
Merged
Merged
Conversation
…55p8) Dependabot alert #37, high. nanoid < 3.3.18 can loop indefinitely when a custom generator is called with size zero. The archived Create React App under archives/serenity/ pulled in nanoid 3.3.17 transitively through postcss 8.5.25 (which asks for ^3.3.16), so the direct dependency list never named it. Fixed the way this package.json already handles ten other transitive pins -- an `overrides` entry -- rather than by touching postcss, which is itself already overridden to a current version and is not the vulnerable package. "nanoid": "^3.3.18" Lockfile regenerated with `npm install --package-lock-only`; nanoid moves 3.3.17 -> 3.3.18. `npm audit --audit-level=high` then reports 0 vulnerabilities. Two notes for the reviewer: - The regeneration dropped the `"license": "MIT"` metadata line from the nanoid entry, because npm 9.2.0 does not write that field. It is a lockfile metadata artifact, not a licensing change -- nanoid is still MIT -- and the file is already mixed on this point (only 90 of 1,328 package entries carry the field, written by a newer npm). No other content changed. - archives/serenity/ is an ARCHIVED front-end prototype, not flight or ground software, so the practical exposure here is low. It is still on the default branch and still scanned, so it is still an open high alert; the fix is cheap and correct, so it is taken rather than argued about. If the archive is meant to be out of scope for scanning, that is a separate decision about where archived code lives -- not a reason to leave a known-vulnerable pin in a tracked lockfile. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Closes the repository's one open Dependabot alert — #37, high severity.
The vulnerability
GHSA-2v37-7h3g-55p8 —
nanoidbefore 3.3.18 can loop indefinitely when a custom generator is invoked withsizezero.nanoid(npm)archives/serenity/package-lock.json< 3.3.18It is transitive, not direct —
postcss@8.5.25asks fornanoid: ^3.3.16, so nothing in the dependency list names it and it cannot be fixed by editingdependencies.The fix
archives/serenity/package.jsonalready carries anoverridesblock with ten transitive pins (nth-check,postcss,serialize-javascript,js-yaml,uuid,underscore,@tootallnate/once,http-proxy-middleware,svgo,webpack-dev-server). This is an eleventh, in the same place and the same form:postcssitself is untouched — it is already overridden to a current version and is not the vulnerable package.Lockfile regenerated with
npm install --package-lock-only.npm audit --audit-level=highnow reports 0 vulnerabilities.Two notes for the reviewer
The nanoid entry lost its
"license": "MIT"line. That is an artifact of npm 9.2.0, which does not write that field — not a licensing change, and nanoid is still MIT. The lockfile is already mixed on this point: only 90 of 1,328 package entries carry it, written by a newer npm. No other content changed; the diff is 3 insertions / 4 deletions across both files.archives/serenity/is an archived front-end prototype, not flight or ground software, so practical exposure is low. It is still on the default branch and still scanned, so it is still an open high alert — and the fix costs one line, so it is taken rather than argued about. If the archive is meant to be outside the scanning scope, that is a separate decision about where archived code lives; it is not a reason to leave a known-vulnerable pin in a tracked lockfile.Scope
Branched from
main, independent of PR #195 (Rev T1c airframe work), so the two can merge in either order. Touches onlyarchives/serenity/; no airframe, avionics, tooling or specification file is affected.