ci: excuse the unfixable extract-zip advisory by id instead of by hand - #192
Open
Sev7eNup wants to merge 1 commit into
Open
ci: excuse the unfixable extract-zip advisory by id instead of by hand#192Sev7eNup wants to merge 1 commit into
Sev7eNup wants to merge 1 commit into
Conversation
The desktop job went red on a new npm audit finding: GHSA-jmr9-qjv8-65gv, extract-zip unvalidated symlink path traversal, high. It reaches this package only through Electron Forge's dev tree, it fans out across 15 packages of that chain, and it has no patched release at all — first_patched_version is null, so neither an `overrides` pin nor `npm audit fix` can clear it. Both blunt escapes destroy the check rather than narrow it: - `--omit=dev` audits nothing here. `dependencies` is empty and electron itself is a devDependency, because Forge requires that. Omitting dev dependencies would silently stop reporting Electron CVEs — the one package in this tree that reaches users. - `--audit-level=critical` would wave through every future high advisory. So the audit stays full and single advisories are excused by id. scripts/ audit-gate.mjs folds `npm audit --json` into one entry per advisory, fails on anything at moderate or above that is not on a reviewed allowlist, and prints a `stale` line when an allowlist entry stops matching, which is the signal to delete it. Each entry carries the reason it exists and the condition for dropping it again. The gate's decision logic is pure and tested alongside the rest of the shell's pure logic; vitest's include now covers scripts/ as well.
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.
The
desktopjob went red on a newly reported advisory: GHSA-jmr9-qjv8-65gv,extract-zipunvalidated symlink path traversal, high. It reaches this package only through Electron Forge's dev tree, fans out across 15 packages of that chain, and has no patched release at all (first_patched_version: null) — so neither anoverridespin nornpm audit fixcan clear it, and it will fail every future PR until Forge drops the dependency.Both blunt escapes destroy the check rather than narrow it:
--omit=devaudits nothing here.dependenciesis empty andelectronitself is a devDependency, because Forge requires that. Omitting dev dependencies would silently stop reporting Electron CVEs — the one package in this tree that reaches users.--audit-level=criticalwould wave through every future high advisory.So the audit stays full and single advisories are excused by id.
scripts/audit-gate.mjsfoldsnpm audit --jsoninto one entry per advisory, fails on anything at moderate or above that is not on a reviewed allowlist, and prints astaleline when an entry stops matching — the signal to delete it. Every entry carries the reason it exists and the condition for dropping it again.Verified locally: the gate excuses exactly the one advisory and exits 0; 86 tests pass (4 files, up from 3); typecheck clean.