Security: fix critical and high CVEs in transitive dependencies#485
Open
rickalee wants to merge 1 commit into10up:developfrom
Open
Security: fix critical and high CVEs in transitive dependencies#485rickalee wants to merge 1 commit into10up:developfrom
rickalee wants to merge 1 commit into10up:developfrom
Conversation
- Bump copy-webpack-plugin from ^11 to ^14 - Bump image-minimizer-webpack-plugin from ^3 to ^5 - Downgrade @linaria/* from ^5 to ^4.5.4 in 10up-theme (removes happy-dom CVE) - Add npm overrides for: cross-spawn, flatted, form-data, immutable, minimatch, node-forge, path-to-regexp, picomatch, rollup, serialize-javascript, simple-git, svgo, tar-fs, ws Reduces from 60 vulnerabilities (7 critical, 24 high) to 9 (0 critical, 0 high). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 6ccd16a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
10 tasks
fabiankaegy
added a commit
that referenced
this pull request
May 5, 2026
The plugin bumps from #484/#485 (copy-webpack-plugin@^14, image-minimizer-webpack-plugin@^5) require Node >=20.9 — they call Array.prototype.toSorted which is Node 20+. Bump engines.node to >=20.9.0 across the root and toolkit package.json, and update the CI matrix to test on Node 20 + 22 only (was 16/18/20/22). This is a breaking change — bump the changeset to major. Other fixes uncovered by getting CI green: - Override stylelint-declaration-strict-value to ~1.10.11. The newer 1.11.x bumped its peer requirement to stylelint>=16, conflicting with @10up/stylelint-config which still pins stylelint^15. Without the override npm install fails with ERESOLVE on Node 20+ (npm 10.8+). - eslint --fix on packages/toolkit/config/webpack-fast-refresh.config.js to satisfy the prettier/prettier rule (the newer prettier resolution changed line-break preferences for the require.resolve call). Verified: - npm ci on Node 20.19.6 and Node 22.14.0 succeeds - npm run lint passes (0 errors, 3 unrelated warnings) - npm run build succeeds on both - npm run test succeeds on both Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
fabiankaegy
added a commit
that referenced
this pull request
May 5, 2026
Audited which overrides from #485 were still load-bearing after the copy-webpack-plugin@^14, image-minimizer-webpack-plugin@^5, and webpackbar@^7 bumps replaced their old transitive trees. Kept (verified via removing them and re-auditing): - @types/node ^20.19.0 — without it, npm ci fails with @InQuirer /external-editor peer-dep mismatch - stylelint-declaration-strict-value ~1.10.11 — 1.11.x bumps stylelint peer to >=16, breaks @10up/stylelint-config (stylelint 15 peer) - braces ^3.0.3, micromatch ^4.0.8, minimatch ^9.0.7, serialize-javascript ^7.0.5 — npm audit still surfaces these as high-severity if removed Dropped (verified npm audit still reports 0 critical, 0 high without them): - cross-spawn, flatted, form-data, immutable, node-forge, path-to-regexp, picomatch, rollup, simple-git, svgo, tar-fs, ws Net result: same 0 critical / 0 high audit, with 12 fewer overrides to maintain. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
copy-webpack-pluginfrom^11to^14andimage-minimizer-webpack-pluginfrom^3to^5, resolvingserialize-javascripthigh-severity CVE in these direct deps@linaria/*from^5to^4.5.4in the 10up-theme project — linaria v5 pinshappy-dom@10.xexactly, which has a critical CVE (CVE-2024-53382); v4.5.4 has nohappy-domdependencyoverridesblock to rootpackage.jsonto force patched versions of transitive deps:cross-spawn,flatted,form-data,immutable,minimatch,node-forge,path-to-regexp,picomatch,rollup,serialize-javascript,simple-git,svgo,tar-fs,wsResult: Reduces from 60 vulnerabilities (7 critical, 24 high) to 9 vulnerabilities (0 critical, 0 high).
Remaining 9 (5 moderate, 4 low) are all in
@wordpress/envandjest-environment-jsdomdev tooling with no upstream fixes available yet.Test plan
npm run test -w=packages/toolkit)build-project-linariatest passes — confirms@linariav4 correctly extracts CSS-in-JSnpm run test -w=projects/library)copy-webpack-plugin@14andimage-minimizer-webpack-plugin@5🤖 Generated with Claude Code