Skip to content

Patch all Dependabot CVEs (vite, electron, overrides)#60

Merged
dimitris-m merged 2 commits into
mainfrom
fix-dependency-cves
Apr 16, 2026
Merged

Patch all Dependabot CVEs (vite, electron, overrides)#60
dimitris-m merged 2 commits into
mainfrom
fix-dependency-cves

Conversation

@dimitris-m

Copy link
Copy Markdown
Contributor

Summary

Closes every open Dependabot alert (21 high / 20 moderate / 6 low on main) without changing any application behaviour.

Direct bumps

  • vite 7.3.1 → 7.3.2 (CVE-2026-39363 / -39364 / -39365 — arbitrary file read, server.fs.deny bypass, path traversal in optimized-deps .map)
  • electron 40.0.0 → 40.8.5 (CVE-2026-34770..34781 and related — 15 alerts cleared in one bump)

Forced transitive upgrades via overrides (required because they don't lift through the direct bumps):

  • tar → 7.5.13
  • tmp → 0.2.4
  • dompurify → 3.4.0
  • @tootallnate/once → 3.0.1

engines.node tightened from 22 to >=22.12 to match what vite 7.3.2 itself declares. The forge plugin uses require('vite') and vite 7 is ESM-only, so Node below 22.12 hits ERR_REQUIRE_ESM at npm start. CI's node-version: 22 already resolves to a 22.12+ release; the change only affects local dev.

After the changes: npm audit reports 0 vulnerabilities.

Bundled clean-ups

Three unrelated warnings were noisy in the dev console and trivial to kill while we were already in the files; none changes behaviour:

  • Removed the invalid style="flex: 1; display: 'grid'; gap: '12px'" attribute on <RuleResults> in App.vue (browsers discarded the quoted values; only the Vue fragment-root warning remained).
  • Dropped defineEmits from the vue import in RuleResults.vue — it's a <script setup> compiler macro.
  • darken($primary-color, 8%)color.adjust($primary-color, $lightness: -8%) + @use 'sass:color'; in App.vue (the Sass migrator's own suggestion; silences the Dart Sass 3.0 deprecations).

Notes

  • Local contributors on Node < 22.12 will need to nvm use 22 (or nvm install 22). CI is unaffected.
  • TODO: investigate the monaco-editor / monaco-yaml worker errors in the dev console (Missing requestHandler or method: doValidation, Could not create web worker(s), etc.). Not yet verified whether they also occur on main, nor whether they disappear in the packaged build — tracking separately from this PR.

Bumps the two direct devDependencies whose vulnerable trees account for
nearly all open Dependabot alerts:

  - vite      7.3.1  -> 7.3.2  (CVE-2026-39363 / -39364 / -39365)
  - electron  40.0.0 -> 40.8.5 (CVE-2026-34770..34781 and related)

Adds npm `overrides` to lift the remaining transitive vulnerabilities
that don't auto-resolve through the direct bumps:

  - tar               -> 7.5.13
  - tmp               -> 0.2.4
  - dompurify         -> 3.4.0
  - @tootallnate/once -> 3.0.1

Tightens `engines.node` from `22` to `>=22.12` to match what vite 7.3.2
itself declares (`^20.19.0 || >=22.12.0`). The forge plugin uses
`require('vite')` and vite 7 is ESM-only, so Node below 22.12 hits
ERR_REQUIRE_ESM at `npm start`. CI's `node-version: 22` resolves to a
22.12+ release already; the change only affects local dev.

After these changes `npm audit` reports `found 0 vulnerabilities`.
Three small, unrelated clean-ups surfaced while verifying the CVE
upgrade but visible on main as well:

  - Remove the invalid `style="flex: 1; display: 'grid'; gap: '12px'"`
    from <RuleResults> in App.vue. The quoted `'grid'` / `'12px'` were
    never valid CSS (browsers discarded them) and the attribute only
    tripped Vue's "Extraneous non-props attributes on fragment root"
    warning on every re-render.

  - Drop `defineEmits` from the `vue` import in RuleResults.vue;
    `<script setup>` exposes it as a compiler macro, so the explicit
    import triggered `[@vue/compiler-sfc] defineEmits is a compiler
    macro and no longer needs to be imported.`

  - Replace `darken($primary-color, 8%)` with
    `color.adjust($primary-color, $lightness: -8%)` in App.vue and add
    `@use 'sass:color';` to the style block. This is the Sass migrator's
    own suggestion and silences both the `global-builtin` and
    `color-functions` deprecation warnings ahead of Dart Sass 3.0.
@dimitris-m dimitris-m merged commit e24bb66 into main Apr 16, 2026
3 checks passed
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