Skip to content

fix(deps): pin nanoid to ^3.3.18 (GHSA-2v37-7h3g-55p8) - #62

Merged
skipbit merged 1 commit into
mainfrom
fix/nanoid-advisory
Aug 20, 2026
Merged

fix(deps): pin nanoid to ^3.3.18 (GHSA-2v37-7h3g-55p8)#62
skipbit merged 1 commit into
mainfrom
fix/nanoid-advisory

Conversation

@skipbit

@skipbit skipbit commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Closes Dependabot alert #4nanoid high (GHSA-2v37-7h3g-55p8, CVSS 5.9): customAlphabet/customRandom loop forever when size is 0.

Why an override

nanoid reaches the tree only through postcss, and Dependabot's security-update job runs with update-subdependencies: false. It cannot raise a transitive dependency, so instead of opening a PR it has been erroring out on every run (e.g. run 32355327201) — silently, because a failed updater job posts no PR. The override pins the patched 3.3.18, the same lever already used for sharp and postcss.

Lockfile note

Regenerated with npm install --package-lock-only under node:22 (npm 10.9.8) — the same major as .nvmrc, CI's setup-node, and the node:22-bookworm-slim Dockerfile base. That drops the npm 11-only libc hints from four optional native packages; they are glibc/musl pairs npm 10 resolves by os/cpu regardless, and the 33 @emnapi entries are intact. npm ci was verified in a clean container and resolves nanoid@3.3.18.

Out of scope

npm audit still reports 3 high findings from prisma → @prisma/config → deepmerge-ts (<8.0.0). GitHub auto-dismissed that alert (#5) and the only npm audit fix --force path is a downgrade to prisma@6.12.0, so it waits on an upstream @prisma/config release.

nanoid reaches the tree only through postcss, so Dependabot's security
update job cannot raise it — update-subdependencies is off — and has been
failing on every run instead of opening a PR. An override pins the patched
3.3.18, matching how sharp and postcss are already held.

The lockfile was regenerated under node:22 (npm 10, same as CI and the
Dockerfile), which drops the npm 11-only `libc` hints from four optional
native packages. Both are glibc/musl pairs npm 10 selects by os/cpu anyway,
and `npm ci` was verified green in a clean container.
@skipbit
skipbit merged commit def0a68 into main Aug 20, 2026
2 checks passed
@skipbit
skipbit deleted the fix/nanoid-advisory branch August 20, 2026 09:54
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