fix(security): remove transitive serialize-javascript@6.x from mc-scripts#3986
fix(security): remove transitive serialize-javascript@6.x from mc-scripts#3986
Conversation
…cripts dep tree Bumps `terser-webpack-plugin` to `^5.5.0` (drops the `serialize-javascript` dep entirely as of 5.4.0) and `css-minimizer-webpack-plugin` to `^8.0.0` (declares `serialize-javascript: ^7.0.3`). Also bumps `postcss` to `^8.5.12` to satisfy `cssnano@7`'s peer dependency, and drops Node 18 from the supported engines to match `css-minimizer-webpack-plugin@8`'s `>= 20.9` requirement. Eliminates GHSA-5c6j-r48x-rmvq from downstream consumers' dep graphs without relying on the repo-local `pnpm.overrides` (which does not propagate to published packages).
🦋 Changeset detectedLatest commit: edfd3f2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 36 packages
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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3986 +/- ##
=======================================
Coverage 72.93% 72.93%
=======================================
Files 267 267
Lines 7102 7102
Branches 2211 2241 +30
=======================================
Hits 5180 5180
Misses 1899 1899
Partials 23 23
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
[preview_deployment] |
|
Release workflow succeeded ✅\nSee details: Workflow Run |
Canary validation completeThe Initial test failures (resolved, unrelated to this PR)A first install via Confirms
Ready for review. |
Summary
terser-webpack-pluginto^5.5.0(no longer depends onserialize-javascriptas of 5.4.0).css-minimizer-webpack-pluginto^8.0.0(declaresserialize-javascript: ^7.0.3).postcssto^8.5.12to satisfycssnano@7's peer dep introduced by the above.mc-scriptsengines (now20.x || >=22.0.0) to matchcss-minimizer-webpack-plugin@8's>= 20.9requirement.Why
Customer ticket SUPPORT-40033 reported that our previous security fix only patched one of three transitive
serialize-javascript@6.0.2paths (GHSA-5c6j-r48x-rmvq). Thepnpm.overridesdeclaration in our rootpackage.jsondoes not propagate to published packages — it only affects local installs inside this monorepo. As a result, consumers' fresh installs still resolved vulnerable copies viacss-minimizer-webpack-plugin@3.4.1andterser-webpack-plugin@5.3.14.This PR fixes the issue at the spec-range level so consumers' installs naturally land on safe versions, with no overrides required on their side.
Test plan
pnpm installclean — no new peer dep warningsserialize-javascript@7.0.5preconstruct buildsucceedsjestmc-scripts unit tests pass (79/79)