Fix/npm audit vulnerabilities - #111
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.