fix(deps): resolve both open Dependabot alerts (nanoid, js-yaml) - #497
Merged
Conversation
Resolves the two open Dependabot alerts, both transitive in the root lockfile: - GHSA-2v37-7h3g-55p8 (high, CVSS 5.9) — nanoid custom generators can loop indefinitely when size is zero. Pulled in by postcss (nanoid@^3.3.16); lockfile resolved 3.3.16, patched at 3.3.17. - GHSA-5p4m-2wfm-xmqj (high, CVSS 7.5, CVE-2026-59870) — js-yaml quadratic CPU consumption in !!omap resolution. Pulled in by @eslint/eslintrc and cosmiconfig; lockfile resolved 4.3.0, patched at 4.3.1. Both advisories also cover a second major line (nanoid 4.x–5.1.5, js-yaml 3.x), neither of which is present in the tree, so caret floors on the resolved lines are sufficient and cannot drag a consumer across a major. Raising the `overrides` floors rather than letting resolution drift, so the alerts cannot silently reopen on the next resolve. Lockfile regenerated with npm 10 (`packageManager`/CI version); the only entries that moved are js-yaml 4.3.0 -> 4.3.1 and nanoid 3.3.16 -> 3.3.18, nothing added or removed. mcp-server/ has neither package, so its lockfile is untouched.
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
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 two remaining open Dependabot alerts (#81, #80). Both are transitive dependencies in the root
package-lock.json; no direct dependency changes.nanoidjs-yamlnanoid— custom generators can loop indefinitely when size is zero. Sole consumer ispostcss(nanoid@^3.3.16).js-yaml— quadratic CPU consumption in!!omapresolution. Consumers are@eslint/eslintrc(^4.1.1) andcosmiconfig(^4.1.0).Approach
Raised the floors in
overridesrather than relying on lockfile resolution —overridesis this repo's security-floor mechanism (postcss,js-yaml,sharp,brace-expansionentries are all floors), and without it the alerts silently reopen on the next resolve.Both advisories also cover a second major line (
nanoid4.0.0–5.1.5,js-yaml3.x). Neither is present in the tree, so plain caret floors on the resolved lines are sufficient and cannot drag a consumer across a major — no version-scoped override keys needed here.Lockfile regenerated with
npx npm@10 install --package-lock-only, matchingpackageManagerand CI's Node 20 npm.Verification
Programmatic before/after diff of every lockfile entry — only two entries changed, nothing added or removed:
@swc/helpersoccurrence count still 7 — the nested optional-peer entry thatnpm cirequires is intact.All four CI steps run locally on the branch:
npm ci(npm 10)found 0 vulnerabilitiesnpm run lintmain)npm run typechecknpm testnpm run buildInstalled tree confirmed: single copy of each package,
nanoid@3.3.18andjs-yaml@4.3.1, no nested duplicates.Notes
mcp-server/(not covered by CI) has neither package in its lockfile — verified, untouched.next/dist/compiled/nanoidis a vendored copy inside Next's prebuilt output. It isn't a lockfile entry, isn't in the dependency graph Dependabot scans, and can't be reached byoverrides; it clears only when Next itself rebuilds against a patched nanoid.🤖 Generated with Claude Code