Skip to content

Fix/npm audit vulnerabilities - #111

Merged
kmturley merged 9 commits into
mainfrom
fix/npm-audit-vulnerabilities
Sep 11, 2026
Merged

Fix/npm audit vulnerabilities#111
kmturley merged 9 commits into
mainfrom
fix/npm-audit-vulnerabilities

Conversation

@kmturley

Copy link
Copy Markdown
Member

No description provided.

kmturley and others added 9 commits September 10, 2026 22:22
Fixes 6 of the 7 reported advisories:

- brace-expansion 5.0.8 -> 5.0.9 (high, DoS via unbounded intermediate
  arrays, GHSA-rgw5-rvv9-x895)
- js-yaml 4.3.1 -> 4.3.2 (high, quadratic CPU in !!omap resolution and
  unbounded empty merge sources, GHSA-5p4m-2wfm-xmqj / GHSA-2883-xcg3-v3hh)
- nanoid 3.3.16 -> 3.3.19 (high, custom generators loop indefinitely when
  size is zero, GHSA-2v37-7h3g-55p8)
- vitest / @vitest/coverage-v8 4.1.10 -> 5.0.0 (moderate, path traversal /
  arbitrary file read via @vitest/mocker redirect mock, GHSA-82fw-gwwq-j7x9).
  The advisory covers everything up to 4.1.10, so v5 is the lowest fixed
  release. Test-only dependency; build, lint and the suite are unchanged by
  the bump.

adm-zip (GHSA-vwc7-r8mq-g2x9, moderate) is left as-is. The advisory range is
>=0.5.9 <=0.6.0 and 0.6.0 is the latest release, so no fixed version exists
upstream - npm's only suggested "fix" is a downgrade to 0.5.8, which predates
the extractAllTo() zip-slip hardening that helpers/archive.ts relies on. That
would trade a moderate symlink-overwrite issue for a worse one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The rollback regression test still spied on a `fileHelpers` namespace that no
longer exists - it was dropped when helpers/file was split into helpers/fs and
helpers/archive, and the import was never updated. The bare identifier threw
`ReferenceError: fileHelpers is not defined` before either spy was installed,
so the test failed on every run.

`fileHash` now lives in helpers/fs (already imported here as `fsHelpers`) and
`archiveExtract` in helpers/archive, which this adds as `archiveHelpers`.

Verified the spies actually intercept rather than the test passing vacuously:
fileHash is called twice and archiveExtract once, so the first file really does
clear its hash check and extract before the second file's mismatch triggers the
rollback the test asserts on. Had the spies not bound, the real fileHash would
have failed the *first* file and the rollback path would never have run.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@kmturley
kmturley merged commit a035ceb into main Sep 11, 2026
7 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