Skip to content

fix(deps): patch open dependency advisories across all lockfiles - #248

Merged
johnny4young merged 1 commit into
mainfrom
fix/dependabot-advisories
Oct 14, 2026
Merged

johnny4young merged 1 commit into
mainfrom
fix/dependabot-advisories

Conversation

@johnny4young

Copy link
Copy Markdown
Owner

Summary

Patches every open Dependabot advisory on main across the four independently locked graphs.

Advisory Package Graph Fix
GHSA-q2hr-2g5m-vwhr (+ GHSA-6j4f-fj2g-mc7p, GHSA-qhr7-859c-m2p7) brace-expansion 1.x / 2.x / 5.x root (electron-builder chain) floors ^1.1.21, ^2.1.7, ^5.0.12
GHSA-wq5f-xc86-pv6w sharp 0.35.4 root, license-server, update-server (wrangler → miniflare pins it exactly) ^0.35.5 root, exact 0.35.5 in each Worker
GHSA-r4xh-jqrq-34v2 smol-toml 1.8.0 root (knip) ^1.9.0
GHSA-hrr3-gc8f-f4qj fast-uri 3.1.7 root (ajv) and website ^3.1.8 in both
GHSA-hp3w-g68c-fv3c sprintf-js 1.1.3 root (fengari, roarr) no release fixes it; pnpm patch

sprintf-js reaches users. The Lua runner lazy-loads fengari in the renderer, and Lua's string.format hands the format to sprintf. fengari caps width and precision at two digits, so oversized precisions cannot reach it. But %.0g passes the scanner, and sprintf-js calls toPrecision(0), which throws RangeError. fengari's protected call contains it, so the run fails with a meaningless error where C Lua prints 2. The patch clamps precision to the Number method ranges, with 1 as the %g minimum, matching C. The rest of the graph changes are dev-only.

Root overrides live in pnpm-workspace.yaml, mirrored in package.json. The Workers keep their exact-pin convention. The website lock was regenerated with npm 11.

Validation

  • pnpm audit: only sprintf-js remains, by version; it is patched in place.
  • Worker audits and website npm audit: 0 vulnerabilities.
  • check:prod-audit and check:bundled-audit: ok.
  • Resolved versions confirmed with pnpm why.
  • Root suite: vitest run, 824 files, 9306 tests. The new Lua case fails against the unpatched package.
  • tsc --noEmit, typecheck:tests, lint, check:i18n, changelog:check, check:deadcode, check:deadcode:config (with website and Workers installed, as in CI), and website npm test (55): all green.
  • Workers: vitest (250 / 175) and tsc.
  • pnpm run package:desktop: electron-builder packaged the macOS arm64 app; CI only builds bundles. The packaged renderer's fengari chunk contains the clamped precision.

Follow-up

  • Dependabot alert for sprintf-js will stay open, because no patched version exists to match. Dismiss it as tolerable risk, citing the patch, once this merges.

- Raise the root brace-expansion floors to 1.1.21, 2.1.7 and 5.0.12 and fast-uri to 3.1.8, and add sharp 0.35.5 and smol-toml 1.9.0 floors, mirrored in package.json.
- Pin sharp 0.35.5 in the license-server and update-server Workers, whose wrangler chain pinned 0.35.4, and raise the website fast-uri floor with npm 11.
- No sprintf-js release fixes GHSA-hp3w-g68c-fv3c, and the Lua runner reaches it through fengari string.format. Patch 1.1.3 to clamp precision to the Number method ranges, so %.0g formats like C Lua instead of failing the run.
- Cover the Lua precision cases in the runner tests; the case fails against the unpatched package.

Changelog: none
@johnny4young
johnny4young merged commit d6072db into main Oct 14, 2026
13 checks passed
@johnny4young
johnny4young deleted the fix/dependabot-advisories branch October 14, 2026 02:02
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