fix(repo): pin nanoid to 3.3.17 for GHSA-2v37-7h3g-55p8 - #6
Merged
Conversation
check-audit.mjs went from "0 advisories" to a blocking failure between two runs an hour apart: nanoid below 3.3.17 loops indefinitely when a custom generator is called with size 0, rated high. CI runs check:supply-chain, so this blocked every pull request, including main. The advisory reaches the tree only through vitest -> vite -> postcss, so it is dev-only and can never be shipped: packages/ai-tooling declares just ajv, json-canonicalize and jsonc-parser, and its files array carries no test tooling. It is fixed rather than ignored anyway. check-audit.mjs fails on any high advisory by design, and adding the first entry to an empty IGNORED_ADVISORIES list would spend the repository's one clean exception record on a dependency that had a patched version available the same day. The override pins exactly 3.3.17, and the exactness is the point. The first attempt used >=3.3.17 and resolved to nanoid 6.0.1 -- a major jump across an API postcss does not expect, adopted silently by a one-line override. It was caught by reading the resulting lockfile, not by any check. 3.3.18 exists, published 2026-08-07, and is still inside minimumReleaseAge; 3.3.17 cleared it on 2026-08-06. The delay steering the choice of patch version is the second time it has done real work here. The override must be dropped once vite ships a postcss that depends on a patched nanoid. An override that outlives its cause silently pins a transitive dependency forever, which is the failure mode this repository's catalog exists to prevent.
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.
What lands and why
check-audit.mjswent fromcheck-audit ok (0 advisories, 0 blocking)to a blocking failure betweentwo runs about an hour apart on 2026-08-08:
nanoid < 3.3.17loops indefinitely when a custom generator is called with size 0. CI runspnpm run check:supply-chain, so this blocked every pull request —mainincluded.Why it is fixed rather than ignored
The advisory reaches the tree only through
vitest -> vite -> postcss:So it is dev-only and can never be shipped:
packages/ai-toolingdeclares onlyajv,json-canonicalizeandjsonc-parser, and itsfilesarray carries no test tooling. Every findingin
pnpm audit --jsonreportsdev: true.It is fixed anyway.
check-audit.mjsfails on anyhighorcriticaladvisory by design, and addingthe first entry to an empty
IGNORED_ADVISORIESlist would spend the repository's one clean exceptionrecord on a dependency that had a patched version available the same day.
The override pins an exact version, and that is the point
The first attempt used
>=3.3.17and resolved tonanoid@6.0.1— a major jump across an APIpostcssdoes not expect, adopted silently by a one-line override. It was caught by reading theresulting lockfile, not by any check. The override now reads:
3.3.18exists, published 2026-08-07 16:41 UTC, and is still insideminimumReleaseAge: 4320;3.3.17was published 2026-08-03 10:39 UTC and cleared the threshold on 2026-08-06. The supply-chaindelay steering the choice of patch version is the second time it has done real work in this
repository.
How it was verified
Every command below exits
0against the committed tree, afterrm -rf node_modulesand a cleaninstall — so the package counts are the honest ones and not inflated by orphans left in the virtual
store.
The lockfile now resolves a single
nanoid@3.3.17, and the approved Phase 1 tree is untouched.Deliberately not included
No changelog fragment. A dev-only dependency pin ships no behaviour change, and
changelog.d/stays dormant until Stage 1 Phase 5 completes.
The override is temporary and must be removed. Once
viteships apostcssthat depends on apatched
nanoid, drop it. An override that outlives its cause silently pins a transitive dependencyforever, which is the failure mode the catalog exists to prevent. Recorded in
PROGRESS.md.