Skip to content

chore: update nanoid to 3.3.18, clearing the last advisory - #20

Merged
zerotrustdavid merged 1 commit into
mainfrom
chore/nanoid-3.3.18
Aug 27, 2026
Merged

chore: update nanoid to 3.3.18, clearing the last advisory#20
zerotrustdavid merged 1 commit into
mainfrom
chore/nanoid-3.3.18

Conversation

@zerotrustdavid

@zerotrustdavid zerotrustdavid commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Closes Dependabot alert #6. Three lines in the lockfile, and npm audit goes to zero.

The alert is wrong, and its own text contains the refutation

Dependabot cannot update nanoid to a non-vulnerable version. The latest possible version that can be installed is 3.3.16 because of the following conflicting dependency:

  • @tailwindcss/postcss: requires nanoid@^3.3.16
  • next: requires nanoid@^3.3.16

Both constraints are ^3.3.16. The caret range means >=3.3.16 <4.0.0, which admits 3.3.18. The named "conflicting dependencies" do not conflict with the fix.

And 3.3.18 exists. From the registry:

3.x published: 3.3.11 … 3.3.15, 3.3.16, 3.3.17, 3.3.18
dist-tags: { legacy: 3.3.18, latest: 6.0.1 }

Nothing in the tree ever forbade it. The lockfile was simply pinned at 3.3.16, and no top-level bump existed to make Dependabot revisit the entry.

Why Dependabot said otherwise

It resolves a transitive advisory by looking for a release of the package that introduces the dependency. Neither @tailwindcss/postcss nor next has published one that raises its own nanoid floor, so it reported the update as impossible.

It is not impossible. It just is not reachable by the strategy Dependabot uses. The distinction matters, because the alert's suggested fallback was an overrides entry — a permanent, hand-maintained pin that would then need removing later. None of that is necessary.

The change

npm update nanoid --package-lock-only
package-lock.json 3 insertions, 3 deletions
package.json unchanged
overrides entry not needed
nanoid 3.3.16 → 3.3.18
npm audit 1 high → 0

Verified

Check Result
npm install --ignore-scripts clean, nanoid resolves to 3.3.18
npm run lint clean
npx tsc --noEmit clean
npm run build clean
npm run brand 15 files, byte-identical, so the #17 guard passes
npm audit found 0 vulnerabilities

What this means for the standing position

F25 was recorded as an accepted open advisory with the constraint named. That record was accurate about what the alert said and wrong about what was possible. It should be closed as resolved, not accepted.

Worth keeping as a general point: a tool reporting that it cannot fix something is a statement about the tool's strategy, not necessarily about the dependency graph. The semver ranges were readable, and reading them took less time than writing the acceptance rationale did.

Dependabot alert #6 states it "cannot update nanoid to a non-vulnerable
version", naming @tailwindcss/postcss and next as conflicting dependencies.
That is not correct, and the alert's own text contains the refutation.

Both constraints are nanoid@^3.3.16. The caret range means >=3.3.16 <4.0.0,
which admits 3.3.18. And 3.3.18 is published: the 3.x line runs to 3.3.18,
carrying the "legacy" dist-tag. Nothing in the tree ever forbade it. The
lockfile was simply pinned at 3.3.16 and no top-level bump existed to make
Dependabot revisit it.

Dependabot resolves a transitive advisory by looking for a release of the
package that introduces it. Neither @tailwindcss/postcss nor next has published
one that raises its own floor, so it reported the update as impossible. It is
not impossible; it just is not reachable by the strategy Dependabot uses.

`npm update nanoid --package-lock-only` moves the single lockfile entry from
3.3.16 to 3.3.18. Three lines. No package.json change, no dependency bump, and
no `overrides` entry, which is what the alert suggested as the fallback.

npm audit now reports 0 vulnerabilities, down from 1.

Verified
--------
Full install, lint, tsc --noEmit and build all clean. `npm run brand` writes
fifteen files byte-identical to those committed, so the CI guard passes. npm
audit reports zero.
@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
invisionsolutions Ready Ready Preview Aug 27, 2026 12:31am

@zerotrustdavid
zerotrustdavid merged commit 8c840b3 into main Aug 27, 2026
7 checks passed
@zerotrustdavid
zerotrustdavid deleted the chore/nanoid-3.3.18 branch August 27, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant