Repository navigation
Drop the brace-expansion override: clears GHSA-rgw5-rvv9-x895 and unbreaks test:coverage (closes #1950) - #1949
Conversation
`bun audit` has been failing on every PR: the pinned override sat at 1.1.17, one patch short of the fix for GHSA-rgw5-rvv9-x895 (high, DoS via unbounded intermediate arrays, bypassing the CVE-2026-14257 mitigation). The advisory patches the 1.x line in 1.1.18. The pin itself is load-bearing and stays: three different minimatch versions in the tree ask for `^1`, `^2` and `^5` respectively, and the override flattens all of them to one copy. Bumping the pinned version is therefore the whole fix — nothing else in the manifest needs to move. Verified: `bun run audit` clean, one resolved copy at 1.1.18, frontend suite 172 files / 4112 tests passing. Co-Authored-By: Claude <[email protected]>
Code Review — PR #1949Verdict: APPROVE (merge on its own terms). The change does exactly what it claims, clears a real high-severity advisory, and has zero behavioural delta versus A note on process first: the review went through two wrong turns before landing, and the record should be accurate rather than flattering. I initially read Findings1. The immediate fix is correct — verified
2. [Improvement — pre-existing, not introduced here] Cross-major flattening is live-broken on the coverage pathForcing
The trigger is narrow, which is why it has gone unnoticed: minimatch@10 works fine for brace-free patterns and only throws when a It is reachable from this repo's own config. This fails identically on The other consumer, So the honest framing: this PR is a strict improvement sitting on top of a pre-existing landmine. It clears a real advisory, changes one character, and makes nothing worse. But "the override flattens three majors and that's the whole fix" understates things — the flattening is itself semantically unsound and already costs a broken Why I'd still merge rather than block: reverting or widening the pin here would restore the high advisory and fix nothing that is currently green, and the coverage break is equally present on Suggested follow-up options for the issue, roughly in order of preference:
3. [Improvement] The
|
| Item | Assessment |
|---|---|
| Advisory claim (1.1.18 first patched on 1.x) | Verified against the GitHub advisory API |
| Override actually flattens the tree | Verified in clean-room installs of both branches |
| Fix clears the advisory | Verified — audit passes on PR, fails on main |
desktop-app 0.1.0 → 0.2.0 |
Stale-lockfile sync; already 0.2.0 on main; keep, mention in body |
| Cross-major flattening | Pre-existing live defect, breaks test:coverage on main too; own issue |
| Exact pin mechanism | Keep exact; real gap is notification, not range syntax |
| Allowlist instead? | Correctly rejected — a patched version existed |
Net: one-character security fix, correctly researched and honestly described, with a bun.lock sync riding along that is safe and worth a sentence in the body. Approving. The flattening defect is the more interesting finding and deserves an issue, but it belongs in its own change, not this one.
malibio
left a comment
There was a problem hiding this comment.
Verdict: APPROVE — safe to merge on its own terms. (Posting as a comment rather than --approve since this is a self-authored PR.)
Full review: #1949 (comment)
Verified in clean-room clones of both branches:
- The advisory table matches
gh api /advisories/GHSA-rgw5-rvv9-x895exactly —1.1.18is the first patched 1.x version. - The override genuinely flattens all three
minimatchmajors to one copy: PR →[email protected]withauditpassing,main→1.1.17withauditfailing. Real remediation, not a silenced checker. - The
packages/desktop-app0.1.0 → 0.2.0lockfile line is a stale-lockfile sync —package.jsonis already0.2.0onmain. Safe; keep it, and add a sentence to the PR body rather than stripping it.
One finding worth its own issue, not a blocker: forcing 1.1.18 onto the ^2/^5 consumers is semantically unsound and is already live-broken. [email protected] does import { expand } from 'brace-expansion', but 1.x is CJS with module.exports = expandTop and no named expand. Via test-exclude and this repo's own 'src/tests/**/*.{test,spec}.{js,ts}' glob, that throws TypeError: (0, brace_expansion_1.expand) is not a function whenever a brace pattern is evaluated.
Crucially this fails identically on main — it dates to the original pin in #1869, not to this bump. test:all stays green because it excludes test:coverage. So this PR is a strict improvement on top of a pre-existing landmine; blocking it would restore the high advisory and fix nothing. Follow-up options, preferred first: per-consumer major-correct overrides (1.1.18/2.1.4/5.0.9), bump the consumers, or drop the pin once the tree floats to patched versions.
Not merging — that call is yours.
|
Review addressed. Verdict was APPROVE (merge on its own terms) with the flattening defect split out. Finding 2 — verified and filed as #1950. I reproduced the reviewer's claim end-to-end on a clean clone of It went unnoticed because Finding 3 — kept, and the PR body already documents it ("Scope note"): the Findings 4 and 5 — no change here. The notification-vs-range point is real but belongs with #1950's decision about the override block as a whole rather than being pre-empted by a one-line comment in this PR. Agreed the allowlist would have been the wrong lever: a patched version existed, and the script's own guidance says so. On the record: the review went through two wrong turns — mine and the reviewer's — both from reading No code changes. Ready to merge; the flattening fix is #1950's. |
…break test:coverage Supersedes the 1.1.17 -> 1.1.18 bump this branch originally carried. Deleting the override, rather than bumping it, fixes both problems at once. The pin was added in #1869 to clear an advisory, but `overrides` applies to the whole tree and cannot express "1.x here, 5.x there". Three consumers declare incompatible ranges, so all three were forced onto 1.x: [email protected] wants ^1.1.7 ok [email protected] wants ^2.0.2 forced to 1.x [email protected] wants ^5.0.5 forced to 1.x <- broken brace-expansion 1.x is CommonJS exporting only a default; minimatch@10 imports a named `expand`. So `bun run test:coverage` has been dead since #1869 with `TypeError: (0 , brace_expansion_1.expand) is not a function`, reached via test-exclude -> minimatch@10 and a braced include glob (`{test,spec}`). It went unnoticed because test:all runs test, test:scripts, test:skill and rust:test — never test:coverage. Upstream has since caught up, so the override is no longer needed at all. With it removed, natural resolution puts every consumer on its own major, each at or above this advisory's patched floor: [email protected] (floor 1.1.18) [email protected] (floor 2.1.4) [email protected] (floor 5.0.9) Verified in clean clones: `bun run audit` clean, and `test:coverage` runs to completion (172 files / 4112 tests, 88.43% lines). It still exits 1 on the 90% global threshold, which is pre-existing project state and unrelated to this change — the crash is what this fixes. Scoped override keys (`test-exclude/minimatch/brace-expansion`) were tried first and are silently ignored by Bun 1.3.11: accepted into the lockfile, no effect on resolution. Recorded so the next person does not retry it. Co-Authored-By: Claude <[email protected]>
Summary
Deletes the
brace-expansionentry from the rootpackage.jsonoverrides. That single deletion clears a high-severity advisory and fixesbun run test:coverage, which has been broken onmainsince the pin was introduced.This supersedes the
1.1.17→1.1.18bump the branch originally carried. Bumping cleared the advisory but left the real defect in place; deleting fixes both. Closes #1950.Two problems, one cause
overridesapplies to the entire tree and cannot express "1.x here, 5.x there". Three consumers declare incompatible ranges, and #1869's pin forced all of them onto 1.x:[email protected]^1.1.7[email protected]^2.0.2[email protected]^5.0.5Problem 1 — the advisory. The pin sat at
1.1.17, one patch below GHSA-rgw5-rvv9-x895's floor for the 1.x line (CVE-2026-69152, high, CVSS 7.5).bun auditfailed on every open PR.Problem 2 —
test:coveragecrashed.[email protected]is CommonJS exporting only a default;minimatch@10doesimport { expand }. Reached viatest-exclude→minimatch@10and a braced include glob ({test,spec}):It went unnoticed because
test:allrunstest,test:scripts,test:skillandrust:test— nevertest:coverage.Why deleting is the fix
Upstream has caught up since #1869, so the override is no longer needed. With it gone, natural resolution puts every consumer on its own major, each at or above its patched floor:
[email protected][email protected][email protected][email protected][email protected][email protected]That is exactly what resolution did before #1869 — the override was solving a problem that has since solved itself upstream.
Verification
Measured with clean
git clone+bun installinto a temp dir. Do not read the localnode_modules/.bun— it is an accumulating cache that retains copies from earlier installs and will mislead you (it misled both me and the reviewer on the first pass).bun run audittest:coveragemain1.1.17TypeError1.1.18,2.1.4,5.0.9bun run test:all→ 172 files / 4112 tests passing (pre-push gate green)bun run test:coverage→ completes, 88.43% lines. Still exits 1 on the 90% global threshold — pre-existing project state, unrelated to this change. The crash is what this fixes; the shortfall is a separate question.Dead end, recorded
Scoped override keys (
test-exclude/minimatch/brace-expansion) were tried first. Bun 1.3.11 silently ignores them: accepted into the lockfile, zero effect on resolution — still one flattened copy. Noting it so nobody retries it.Scope note
The
bun.lockdiff is large because removing an override re-resolves the tree. Thepackages/desktop-app0.1.0→0.2.0line isbun installsyncing a stale lockfile against a manifest already at0.2.0onmain; not a version bump.🤖 Generated with Claude Code
https://claude.ai/code/session_01FELy7rhqnKbDmmG9fuHALT