Skip to content

fix(nodejs): clear the open Dependabot alerts on dev dependencies - #124

Merged
JeanExtreme002 merged 1 commit into
mainfrom
fix/node-dev-dep-audit
Oct 9, 2026
Merged

JeanExtreme002 merged 1 commit into
mainfrom
fix/node-dev-dep-audit

Conversation

@JeanExtreme002

Copy link
Copy Markdown
Owner

Why

After #123 cleared the shipped-dependency audit, three Dependabot alerts were still open on main, all on dev-only transitive packages under nodejs/:

Alert Package Advisory Patched in
#20 (high) js-yaml 4.3.1 (via eslint, mocha) GHSA-2883-xcg3-v3hh 4.3.2
#27 (medium) brace-expansion 2.1.4 (via mocha → minimatch) GHSA-q2hr-2g5m-vwhr 2.1.7
#28 (medium) brace-expansion 1.1.18 (via eslint → minimatch) GHSA-q2hr-2g5m-vwhr 1.1.21

A local npm audit also flagged serialize-javascript 6.0.2 (via mocha 10) for GHSA-5c6j-r48x-rmvq and GHSA-qj8w-gfj5-8c6v. These are not CI-blocking because the workflow audits with --omit=dev, but they are cheap to close.

What

  • Refresh package-lock.json so brace-expansion and js-yaml resolve to their patched releases (plain npm audit fix, no manifest ranges changed).
  • Add an npm overrides entry pinning serialize-javascript to ^7.0.5. Mocha 10 and 11 both still depend on the vulnerable 6.x line, and mocha 12 requires Node ^20.19 || >=22.12, which would break the 18.x matrix leg. Mocha only requires serialize-javascript lazily in --parallel mode, which this suite does not use, so the override is inert at runtime.

Not addressed

npm audit still reports a chain rooted in braces (GHSA-vfj7-8cjw-p6xm, via micromatch/chokidar under mocha and tsd). That advisory has no patched release yet (<=3.0.3 is the latest), so there is nothing to bump to. It is dev-only and not tracked as a Dependabot alert.

Verification

Locally on Node 22:

  • npm audit --omit=dev --audit-level=high: 0 vulnerabilities
  • npm run lint, npm run test:types, npm run test:offline: all passing (94 offline tests)

Refresh the lockfile so the transitive brace-expansion (1.1.21 / 2.1.7)
and js-yaml (4.3.2) resolve to their patched releases, closing
Dependabot alerts #20, #27 and #28 (GHSA-q2hr-2g5m-vwhr,
GHSA-2883-xcg3-v3hh).

Also pin serialize-javascript to ^7.0.5 through an npm override, since
mocha 10 and 11 still depend on the vulnerable 6.x line
(GHSA-5c6j-r48x-rmvq, GHSA-qj8w-gfj5-8c6v) and mocha 12 drops Node 18.
Mocha only requires it lazily in --parallel mode, which this suite does
not use.
@JeanExtreme002
JeanExtreme002 merged commit db5162a into main Oct 9, 2026
5 checks passed
@github-actions
github-actions Bot deleted the fix/node-dev-dep-audit branch October 9, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant