Skip to content

Security enhancements - #38

Merged
TwitchBronBron merged 2 commits into
masterfrom
fix/npm-audit-vulnerabilities
Aug 5, 2026
Merged

Security enhancements#38
TwitchBronBron merged 2 commits into
masterfrom
fix/npm-audit-vulnerabilities

Conversation

@TwitchBronBron

Copy link
Copy Markdown
Member

Summary

  • `npm run audit` was reporting 6 vulnerabilities: brace-expansion, fast-uri, js-yaml (high), and uuid/istanbul-lib-processinfo/nyc chain (moderate)
  • All are pulled in exclusively through devDependencies (eslint, mocha, nyc, @microsoft/api-extractor) — the only production dependency is `chalk`, which is unaffected
  • No non-major version resolves these through normal resolution, so pins patched versions via the existing `overrides` block (same pattern already used for serialize-javascript)

Test plan

  • `npm run audit` passes (0 vulnerabilities)
  • `npm run build` passes (tsc + api-extractor)
  • `npm run lint` passes
  • `npm run test` passes (120 passing)

🤖 Generated with Claude Code

brace-expansion, fast-uri, js-yaml, and uuid are pulled in
exclusively through eslint/mocha/nyc/api-extractor (dev tooling),
never shipped. No non-major version resolves them through normal
resolution, so pin patched versions via overrides, same pattern
already used for serialize-javascript.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@TwitchBronBron TwitchBronBron added the Security enhancements Security-related dependency/vulnerability fixes label Aug 5, 2026
The flat "brace-expansion": "^5.0.9" override broke nyc's TypeScript
instrumentation: minimatch@3.x/5.x (used by eslint and mocha/nyc's
glob matching) call brace-expansion with the old 1.x/2.x calling
convention, which brace-expansion@5 changed. nyc silently fell back
to "return original code" for every file, producing an empty
coverage report (caught by CI: Coveralls said "Nothing to report").

Fix: scope the override per consumer so each minimatch major line
gets a brace-expansion version it's actually compatible with
(eslint's minimatch@3.x -> brace-expansion@1.x, mocha's
minimatch@5.x -> brace-expansion@2.x, api-extractor's minimatch@10.x
-> brace-expansion@5.x). Verified locally: coverage is back to real
100% instead of "Unknown%".

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@TwitchBronBron TwitchBronBron changed the title Fix npm audit vulnerabilities via overrides Security enhancements Aug 5, 2026
@TwitchBronBron
TwitchBronBron merged commit 35d2c17 into master Aug 5, 2026
9 checks passed
@TwitchBronBron
TwitchBronBron deleted the fix/npm-audit-vulnerabilities branch August 5, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Security enhancements Security-related dependency/vulnerability fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant