Clear dependabot alerts via npm overrides - #175
Closed
skearnes wants to merge 2 commits into
Closed
Conversation
Add `overrides` in `app/package.json` pinning four transitive deps to patched versions, and regenerate `app/package-lock.json` via `npm install`. This resolves all 23 open dependabot alerts for the npm tree (12 high, 9 moderate, 1 low) without forcing a downgrade of @vue/cli-service to v3 (which is what `npm audit fix --force` would have done). Overrides: - cross-spawn ^7.0.6 (ReDoS via execa→yorkie chain) - postcss ^8.5.10 (line-return parsing + XSS via Unescaped </style>) - serialize-javascript ^7.0.5 (RCE via RegExp.flags; CPU exhaustion) - webpack-dev-server ^5.2.1 (source code theft via cross-origin) All four are dev-only or build-only; none ship in the production bundle. The serialize-javascript fix cascades to copy-webpack-plugin and css-minimizer-webpack-plugin; the postcss fix cascades to @vue/component-compiler-utils and vue-loader. Verified locally: `npm install` resolves cleanly; `npm audit` reports 0 vulnerabilities; `npm run build` produces a working bundle. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add a short Frontend dependencies section pointing future readers at the `overrides` block, the reason it exists (vue-cli@5 is in maintenance mode and won't bump its transitives), and the eventual exit ramp (migrate SPA off vue-cli to Vite). Includes a pointer to #175 for the original reasoning. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
10 tasks
Member
Author
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
Clears all 23 open dependabot alerts (12 high, 10 moderate, 1 low) in the Vue SPA's npm tree.
Approach: add an
overridesblock inapp/package.jsonpinning four transitive packages to their patched versions, and regenerateapp/package-lock.jsonvianpm install.Why overrides instead of
npm audit fix --forcenpm audit fix --forcewould have downgraded@vue/cli-plugin-eslintfrom^5.0.9to3.12.1— a major regression of the build toolchain. The underlying problem is that@vue/cliv5 (the latest, in maintenance mode) still pins outdated versions of webpack-dev-server, copy-webpack-plugin, and friends. Overrides force-patch those transitives without touching vue-cli itself.Overrides
cross-spawn^7.0.6cross-spawnreached viaexeca→yorkiepostcss^8.5.10</style>in CSS stringifyserialize-javascript^7.0.5RegExp.flagsandDate.prototype.toISOString; CPU-exhaustion DoSwebpack-dev-server^5.2.1The
serialize-javascriptfix cascades tocopy-webpack-pluginandcss-minimizer-webpack-plugin; thepostcssfix cascades to@vue/component-compiler-utilsandvue-loader.All four packages are dev-only or build-only — none ship in the production bundle that gets served to users, so the immediate risk surface was already limited to local development.
What's not touched
@vue/cli-serviceitself stays on~5.0.0. A full move off vue-cli (e.g. to Vite viacreate-vue) would clear the few remaining root-cause warnings, but is a much larger migration belonging in its own PR.Documentation
README.mdnow includes a short Frontend dependencies section pointing future readers at theoverridesblock, why it exists, and the eventual exit ramp (vue-cli → Vite).Test plan
cd app && npm installresolves the new tree cleanly (165 packages funding)cd app && npm cireproduces the tree frompackage-lock.jsonand reports 0 vulnerabilitiescd app && npm auditreports 0 vulnerabilitiescd app && npm run buildproduces a workingdist/bundle (verified locally with Ketcher v2.5.1 extracted tosrc/ketcher)cd app && npm run serveboots the dev server at http://localhost:8080/ (200 OK on/), confirming webpack-dev-server@5 doesn't break vue-cli's internal devServer config — the proxy option invue.config.jsis the only configured devServer field, and it's stable across webpack-dev-server 4→5test_appworkflow exercises the same build inside Docker and should pass🤖 Generated with Claude Code