Skip to content

fix(deps): resolve critical audit finding and high-severity build/test findings#115

Merged
ThomasHalwax merged 2 commits into
mainfrom
fix/security-audit
May 21, 2026
Merged

fix(deps): resolve critical audit finding and high-severity build/test findings#115
ThomasHalwax merged 2 commits into
mainfrom
fix/security-audit

Conversation

@ThomasHalwax
Copy link
Copy Markdown
Member

Summary

Resolves the critical npm audit finding and all high-severity findings in build/test tooling. Brings npm audit from critical 1 / high 13 down to critical 0 / high 1.

Changes

Fixes

  • jspdf 4.1.0 → 4.2.1 — resolves a critical advisory bundle (PDF object injection via addJS, AcroForm arbitrary JS execution, FreeText object injection, DoS via malicious GIF dimensions, HTML injection). Patch-level bump; the only usage (components/print/pdf.js) relies on stable rendering API unaffected by the fixes.
  • Build/test dependenciesnpm audit fix --force across electron-builder, webpack, babel, eslint and glob/minimatch/picomatch chains; clears 12 high findings that never ship to users.
  • mocha → ^11.7.5 (latest). Since even the latest mocha still bundles vulnerable serialize-javascript (≤7.0.4) and diff (≤8.0.2) with no upstream fix, both are pinned via overrides to ^7.0.5 / ^9.0.0.

Validation

  • npm audit: critical 0, high 1, moderate 0, low 0 (was 1 / 13 / 10 / 2)
  • Full test suite: 332 passing — confirms mocha works with the forced transitive serialize-javascript@7 / diff@9
  • npm run lint: clean

Out of scope

The remaining high finding is electron (<=39.8.4, 17 advisories). It is a runtime dependency whose fix requires a major bump (≥39 / 42.2.0) and real application testing — handled in a separate branch/PR.

jspdf <=4.2.0 has a critical advisory bundle (PDF object injection via
addJS, AcroForm arbitrary JS execution, FreeText object injection,
DoS via malicious GIF dimensions, HTML injection). 4.2.1 fixes them.

Patch-level bump within the same major; the only usage
(components/print/pdf.js) relies on stable rendering API
(addImage/text/rect/output) unaffected by the fixes.
npm audit fix --force across build- and test-only dependencies
(electron-builder, webpack, babel, glob/minimatch/picomatch, eslint
chains), bringing high findings from 13 down to 1.

mocha bumped to ^11.7.5 (latest); since even the latest mocha still
bundles vulnerable serialize-javascript (<=7.0.4) and diff (<=8.0.2)
with no upstream fix, both are pinned via overrides to ^7.0.5 / ^9.0.0.
Full test suite (332) passes with the forced transitive versions.

The remaining high finding, electron (<=39.8.4), is a runtime
dependency whose fix is a major bump; it is handled separately.
@ThomasHalwax ThomasHalwax merged commit bcbb545 into main May 21, 2026
1 check 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