Skip to content

Clear dependabot alerts via npm overrides - #175

Closed
skearnes wants to merge 2 commits into
mainfrom
dependabot-cleanup
Closed

Clear dependabot alerts via npm overrides#175
skearnes wants to merge 2 commits into
mainfrom
dependabot-cleanup

Conversation

@skearnes

@skearnes skearnes commented May 12, 2026

Copy link
Copy Markdown
Member

Summary

Clears all 23 open dependabot alerts (12 high, 10 moderate, 1 low) in the Vue SPA's npm tree.

Approach: add an overrides block in app/package.json pinning four transitive packages to their patched versions, and regenerate app/package-lock.json via npm install.

Why overrides instead of npm audit fix --force

npm audit fix --force would have downgraded @vue/cli-plugin-eslint from ^5.0.9 to 3.12.1 — a major regression of the build toolchain. The underlying problem is that @vue/cli v5 (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

Package Pinned to Fixes
cross-spawn ^7.0.6 ReDoS in cross-spawn reached via execayorkie
postcss ^8.5.10 Line-return parsing error + XSS via unescaped </style> in CSS stringify
serialize-javascript ^7.0.5 RCE via RegExp.flags and Date.prototype.toISOString; CPU-exhaustion DoS
webpack-dev-server ^5.2.1 Cross-origin source-code theft (two CVEs)

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.

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-service itself stays on ~5.0.0. A full move off vue-cli (e.g. to Vite via create-vue) would clear the few remaining root-cause warnings, but is a much larger migration belonging in its own PR.

Documentation

README.md now includes a short Frontend dependencies section pointing future readers at the overrides block, why it exists, and the eventual exit ramp (vue-cli → Vite).

Test plan

  • cd app && npm install resolves the new tree cleanly (165 packages funding)
  • cd app && npm ci reproduces the tree from package-lock.json and reports 0 vulnerabilities
  • cd app && npm audit reports 0 vulnerabilities
  • cd app && npm run build produces a working dist/ bundle (verified locally with Ketcher v2.5.1 extracted to src/ketcher)
  • cd app && npm run serve boots 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 in vue.config.js is the only configured devServer field, and it's stable across webpack-dev-server 4→5
  • CI test_app workflow exercises the same build inside Docker and should pass

🤖 Generated with Claude Code

skearnes and others added 2 commits May 12, 2026 19:06
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>
@skearnes skearnes mentioned this pull request May 12, 2026
10 tasks
@skearnes

Copy link
Copy Markdown
Member Author

Superseded by #176, which migrates the SPA from @vue/cli to Vite and clears the same 23 dependabot alerts at the root rather than via transitive overrides. With #176 in place this PR's overrides block becomes dead code.

@skearnes skearnes closed this May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant