From fc7d311b70b65b3ba0381d88ecd5c2c029fe0879 Mon Sep 17 00:00:00 2001 From: "Steve Griffing, PE(CSE), CISSP-ISSEP, CEH" Date: Sun, 30 Aug 2026 20:23:26 -0400 Subject: [PATCH] fix(deps): pin nanoid >= 3.3.18 in archives/serenity (GHSA-2v37-7h3g-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 --- archives/serenity/package-lock.json | 7 +++---- archives/serenity/package.json | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/archives/serenity/package-lock.json b/archives/serenity/package-lock.json index f9016510..052025bb 100644 --- a/archives/serenity/package-lock.json +++ b/archives/serenity/package-lock.json @@ -11085,16 +11085,15 @@ } }, "node_modules/nanoid": { - "version": "3.3.17", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.17.tgz", - "integrity": "sha512-xQLf0A3HOMlgHq0n247/LRuAOYmB7dXJ/DvAxGvsSBij45XtBSmQycu+F8ODbHwns/XyFZagyL1+J0Offw1E0g==", + "version": "3.3.18", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz", + "integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==", "funding": [ { "type": "github", "url": "https://github.com/sponsors/ai" } ], - "license": "MIT", "bin": { "nanoid": "bin/nanoid.cjs" }, diff --git a/archives/serenity/package.json b/archives/serenity/package.json index 3863f664..3c461f05 100644 --- a/archives/serenity/package.json +++ b/archives/serenity/package.json @@ -28,7 +28,8 @@ "@tootallnate/once": "^2.0.1", "http-proxy-middleware": "^3.0.6", "svgo": "^2.8.3", - "webpack-dev-server": "^5.2.6" + "webpack-dev-server": "^5.2.6", + "nanoid": "^3.3.18" }, "eslintConfig": { "extends": [