[FIX] Fix Security Vulnerabilities via Dependency Overrides#407
[FIX] Fix Security Vulnerabilities via Dependency Overrides#407sapiderman wants to merge 1 commit into
Conversation
kevinhermawan
left a comment
There was a problem hiding this comment.
Review
High Concern
1. file-type forced across 8 major versions (>=13.x → >=21.3.1 <22.0.0)
file-type dropped CommonJS support at v17. Any package requiring file-type@^13 or ^16 will break at runtime in a CJS context. Please verify no consumer in the monorepo uses require('file-type').
2. vite forced from v7 → v8 (major version jump)
The lockfile shows @vitejs/plugin-react and vitest now resolve against vite@8.0.11 instead of 7.3.1. Vite 8 has breaking changes (new default configs, plugin API changes, dropped Node.js 18 support). Please confirm this is intentional and that all apps using Vite have been tested against v8.
3. fast-xml-parser — redundant v4 entry is dead code
"fast-xml-parser@>=4.0.0-beta.3 <4.5.5": ">=4.5.5", // never applied
"fast-xml-parser@<5.7.0": ">=5.7.0" // subsumes the aboveThe first entry is fully covered by the second (any <4.5.5 also satisfies <5.7.0), so v4 consumers still get forced to v5.7.0. Remove the first entry to make the intent explicit.
Medium Concern
4. Massive redundancy — ~36 of 72 entries are covered by later, more restrictive ones
Examples (only the last entry is actually applied):
| Package | Redundant entries | Effective entry |
|---|---|---|
hono |
8 entries | hono@<4.12.16: >=4.12.16 |
tar |
6 entries | tar@<=7.5.10: >=7.5.11 |
basic-ftp |
4 entries | basic-ftp@<=5.3.0: >=5.3.1 |
fastify |
3 entries | fastify@>=5.3.2 <=5.8.4: >=5.8.5 |
lodash |
3 entries | lodash@>=4.0.0 <=4.17.23: >=4.18.0 |
handlebars |
3 entries | handlebars@>=4.0.0 <4.7.9: >=4.7.9 |
minimatch |
6 entries | 4 entries (one per major) |
flatted |
2 entries | flatted@<=3.4.1: >=3.4.2 |
h3 |
3 entries | h3@<1.15.9: >=1.15.9 |
node-forge |
2 entries | node-forge@<1.4.0: >=1.4.0 |
This appears to be intermediate CVE advisories appended in order rather than consolidated into a final range. Please collapse to one entry per package.
5. UUID description mismatch
PR description states forced to >=14.0.0, but the actual overrides are >=11.1.1 and >=13.0.1. Please clarify which is correct.
6. postcss appears in both the "fixed" and "remaining" lists
The overrides include postcss@<8.5.10: >=8.5.10, yet postcss also appears in the "remaining 9 vulnerabilities" table. Please clarify whether the override is effective for packages/hermes/env.
Low Concern
7. No mention of CI smoke-test or manual testing
Given that vite, effect, hono, ajv, and fast-xml-parser all jumped major versions, it would increase confidence to note which apps were smoke-tested or confirmed passing in CI.
8. Missing trailing newline in package.json
Line 134 of the diff shows \ No newline at end of file.
PR
Branch:
remove-vulnerabilities→mainSummary
This PR adds targeted
pnpm.overridesin the rootpackage.jsonto force secure versions of vulnerable transitive dependencies, and updates the lockfile and workspace catalog accordingly.Vulnerability Count
main)remove-vulnerabilities)Remaining 9 Vulnerabilities (out of scope — deeper transitive deps of
netlify-cliandpostcss)tarnetlify-cli > @netlify/edge-bundler > tarminimatchnetlify-cli > @netlify/build > minimatchpicomatchnetlify-cli > @netlify/images > ipx > unstorage > anymatch > picomatchpostcss</style>packages/hermes/env > postcssThese 9 are pinned within
netlify-cli's deep dependency tree or in a workspace package that requires a source-level upgrade rather than an override, and should be addressed in a follow-up PR.Changes
package.json— Added 72pnpm.overridesentries forcing secure versions of:honolodash_.templatehandlebarsminimatchbrace-expansiontarpicomatchnode-forgebasic-ftpfast-xml-parserfile-typefollow-redirectsviteserver.fs.denybypassrolluph3fastify@fastify/static@hono/node-serverdefuflattedsvgoeffectqspath-to-regexpip-addressuuidtmpyamlpostcss</style>cookie-essemverajv$dataoptionpnpm-workspace.yaml— Sorted catalog alphabetically; bumpedhonoto^4.12.18.pnpm-lock.yaml— Full lockfile regeneration reflecting all overrides.Verification
Risk Assessment
pnpm.overrides(no source code changes).netlify-cli(a dev/build tool only) andpackages/hermes/env > postcss, none of which affect production runtime.netlify-clipublishes an update with patched deps.