chore(deps): clear the critical and all high Dependabot alerts - #63
Conversation
Root: 13 npm-audit findings (1 critical, 8 high, 4 moderate) -> 0. Web: 23 findings (2 high) -> 20, 0 high/critical. Root - vitest ^1.0.0 -> ^4.1.11. The critical alert was vitest (fix >= 3.2.6); 4.1.11 also clears the follow-on @vitest/mocker path-traversal advisory (GHSA-82fw-gwwq-j7x9, only fixed at 4.1.11). Brings vite 5 -> 8.3, which clears the vite high. Same target as Dependabot's #39. - overrides ws ^8.21.0. Transitive ws was unreachable by a normal update: engine.io-client pins ~8.17.1 and @stacks/blockchain-api-client pins exactly 8.16.0, both below the patched 8.21.0. - smol-toml 1.7.0 -> 1.8.0 (transitive via @clarigen/cli; lockfile only). Web - overrides viem.ws ^8.21.0. The only flagged ws copies were two 8.18.2 nodes pinned exactly by viem@2.31.0/2.32.0 (advisory range 8.0.0-8.21.0). Scoped to viem on purpose: walletconnect's ws@7.5.13 is not affected, and a blanket ws override would push it across a major. MERGED into the existing overrides block -- the @types/react / @types/react-dom pins are intact. - js-yaml 4.3.1 -> 4.3.2 (lockfile only). Not touched: the 15 moderate / 5 low web findings all hang off @stacks/connect. npm's suggested "fix" is a downgrade to 8.1.9, so they need an upstream release, not a change here. Verified: root suite 221/221 x2 on vitest 4.1.11; web `next build` clean (Next 16.3.4, TypeScript OK, 6 routes prerendered). Note vitest.config.js sets a top-level `singleThread`, which vitest's own type declarations show only exists under poolOptions now -- a silent no-op that predates this change; left alone since the suite is stable without it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
unixwhisperer
left a comment
There was a problem hiding this comment.
Approving. Every number in the description reproduces, and the Node 20 risk you flagged is settled by CI.
Reproduced locally (Node 22.14, npm ci from the committed lockfiles)
| claimed | measured | |
|---|---|---|
Root npm audit |
0 | 0 vulnerabilities |
Web npm audit |
20, no high/critical | 20 — 5 low, 15 moderate, 0 high, 0 critical |
| vitest installed | 4.1.11 | 4.1.11 |
| Root suite | 221/221 | 221/221 across 20 files |
The test count matters more than the pass. vitest 1 → 4 is three majors, and the failure mode I was looking for is silent test loss — changed discovery semantics dropping files, leaving a green run that asserts less. 221 across 20 is identical to main, so discovery is intact. That's the check that makes "221/221" meaningful rather than reassuring.
Node 20: you flagged this as unverified and it's the one thing I couldn't reproduce either (I'm on 22.14). CI settles it — Test Smart Contracts is green on this PR, on Node 20, so the vite-8 ^20.19.0 and vitest-4 ^20 floors resolve fine under setup-node. No need for the 3.2.7 fallback.
Contract path untouched — confirmed by diff: no contracts/, no Clarinet.toml, no .github/. Four package files only.
The scoped viem: { ws } override is the right instinct — a blanket one would have dragged walletconnect's ws@7.5.13 across a major for no benefit, and the reasoning is written down where the next person will find it. Same for keeping the @types/react pins intact.
One thing, non-blocking and pre-existing — but this PR makes it worth naming
You noted singleThread: true is now a silent no-op under vitest's current types. Agreed it's out of scope, but it's slightly more than cosmetic in combination with the line four rows below it:
singleThread: true, // ← no-op
isolate: false, // ← very much not a no-opThe intent reads as "run serially and don't pay for isolation" — a sane pairing for simnet-backed tests. With singleThread dead, the effective config is isolate: false plus default file parallelism, which is the one combination of the two you wouldn't choose: files sharing a worker also share module state, and ordering becomes load-dependent.
It isn't biting — I've run this suite a dozen times across branches this week and it's been 221 every time, deterministic. So: not a defect, and definitely not yours to fix in a dependency PR. But "the guard someone intended isn't running" is worth a line somewhere rather than staying folded into a no-op. Under vitest 4 the equivalent is poolOptions: { threads: { singleThread: true } }, or fileParallelism: false.
Happy to open that as a one-line follow-up if you want it; equally fine to leave it given the suite's track record.
Agreed on what you left alone
The 15 moderate / 5 low web findings hanging off @stacks/connect genuinely need an upstream release — npm proposing a downgrade to 8.1.9 as the "fix" is not a fix, and taking it would be worse than the advisory. Right call to document rather than act.
Found while checking #65 before review: - Reviewed-state hash was 737c659; main has since taken #62 and #63. None touched contracts/, tests/ or Clarinet.toml, but the hash is now e8e2497, with clarinet check (0 errors) and the suite (221/221) re-run on that tree after merging main into the branch. - "testnet 404" was ambiguous; it is 404 at the staging deployer. - Clarity 6 claim: epoch 4.0 being live was verified, but not that Clarity 6 became deployable at that epoch. Confirmed against the stacks-core 4.0.0 release notes and now cited. Added, after verifying it against the full tx history of both deployer principals (latest burn heights 960,197 and 960,216, below 960,230), that no FlashStack contract has been deployed on Clarity 6 yet -- context an auditor will want about the toolchain. Verified: every relative link resolves and is tracked in git; design-doc sections 7 and 13 exist under the titles cited. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Summary
Clears the one critical and every high-severity alert. Dev/test tooling only; nothing on the contract path changes.
npm audit)npm audit)What changed
Root
vitest ^1.0.0→^4.1.11. The critical was vitest (fix ≥ 3.2.6); 4.1.11 also clears the follow-on@vitest/mockeradvisory GHSA-82fw-gwwq-j7x9, which is only fixed at 4.1.11. Pulls vite 5 → 8.3, clearing the vite high. Same target as Dependabot's Bump vitest from 1.6.1 to 4.1.11 #39.overrides: { ws: ^8.21.0 }. Transitivewscouldn't be reached by a normal update:engine.io-clientpins~8.17.1and@stacks/blockchain-api-clientpins exactly8.16.0.smol-toml1.7.0 → 1.8.0 (transitive via@clarigen/cli, lockfile only).Web
overrides: { viem: { ws: ^8.21.0 } }. The only flagged copies were twows@8.18.2nodes pinned exactly byviem@2.31.0/2.32.0. Scoped to viem on purpose: walletconnect'sws@7.5.13isn't affected, and a blanket override would push it across a major version. Merged into the existingoverridesblock, so the@types/react/@types/react-dompins are intact.js-yaml4.3.1 → 4.3.2 (lockfile only).Verification
next buildclean: Next 16.3.4, TypeScript OK, all 6 routes prerender.^20.19.0and vitest 4 needs^20, so this depends onsetup-noderesolving a recent 20.x. My machine is on Node 25.9. CI on this PR is the real check. If it fails on the engines floor, the fallback is vitest 3.2.7, which also clears the critical and passed 221/221 in testing.Deliberately not changed
@stacks/connect. npm's suggested "fix" is a downgrade to 8.1.9, so they need an upstream release.vitest.config.jshas a top-levelsingleThread: true. vitest's own type declarations show that option now exists only underpoolOptions, so it's a silent no-op. Pre-existing, suite is stable without it, left alone.Supersedes
Dependabot #39 (vitest), #41 (smol-toml), #46 (js-yaml). Not #38, #47, #30, which I haven't touched.
🤖 Generated with Claude Code