Skip to content

chore(deps): remediate shell-quote and js-yaml, hold TS 7 and better-sqlite3 13 - #1927

Merged
steilerDev merged 1 commit into
betafrom
chore/deps-security-overrides
Aug 2, 2026
Merged

chore(deps): remediate shell-quote and js-yaml, hold TS 7 and better-sqlite3 13#1927
steilerDev merged 1 commit into
betafrom
chore/deps-security-overrides

Conversation

@steilerDev

Copy link
Copy Markdown
Owner

Summary

Closes the two security alerts Dependabot structurally cannot fix, and adds ignore rules for two majors that are known-broken in this repo.

Security remediation

Package Before After Alert
shell-quote 1.8.4 1.9.0 Quadratic-complexity DoS in parse() (CWE-407), high, dev-only
js-yaml 4.2.0 4.3.0 YAML merge-key chains force quadratic CPU, high, dev-only

Why Dependabot couldn't do this: its security PRs ignore target-branch: beta and always open against the default branch (main), which requires the Require head branch == beta check. #1869 was unmergeable for that reason alone.

  • shell-quote is fixed upstream rather than by an override: concurrently pinned it at exactly 1.8.4, and concurrently 10.0.4 depends on 1.9.0. Supersedes chore(deps): bump shell-quote and concurrently #1869.
  • js-yaml had to change in the root overrides block — that entry was itself pinning the vulnerable 4.2.0, which is why the alert never cleared. All consumers accept ^4.1.0. The nested gray-matter override stays at 3.15.0 (3.x is outside the vulnerable >= 4.0.0, < 4.3.0 range).

Dependabot ignore rules

Both follow the existing @babel/* hold pattern, with the reason and the removal condition in a comment:

Note

Dependabot reads its config from the default branch, so both ignore rules only take effect once beta is promoted to main — same caveat as the existing @babel/* holds.

Audit impact

npm audit: 10 findings (6 high) → 7 (3 high). The remainder are not fixable here:

  • brace-expansion — only node is node_modules/npm/node_modules/brace-expansion, bundled inside the npm package (dev-only, not overridable).
  • react-router — the advisory is an RSC-mode CSRF bypass; this app uses a plain BrowserRouter SPA with no RSC, and the patch is a v8 major. Not worth the upgrade for an unreachable code path.

Test plan

  • CI Quality Gates (typecheck, unit tests, Docker build, E2E smoke)

…sqlite3 13

Security remediation for two alerts that Dependabot cannot fix on its own,
because its security PRs always target the default branch (`main`), which
requires the `Require head branch == beta` check:

- shell-quote 1.8.4 -> 1.9.0 (GHSA: quadratic-complexity DoS in parse(),
  high, dev-only). Fixed upstream rather than via an override: concurrently
  pinned shell-quote at exactly 1.8.4, and concurrently 10.0.4 depends on
  1.9.0. Supersedes #1869.
- js-yaml 4.2.0 -> 4.3.0 (YAML merge-key chains force quadratic CPU, high,
  dev-only). The root `overrides` entry was pinning the vulnerable version,
  so the bump has to happen there. All consumers accept ^4.1.0. The nested
  gray-matter override stays at 3.15.0 — 3.x is outside the vulnerable
  range (>= 4.0.0, < 4.3.0).

Dependabot ignore rules for two majors that are known-broken here:

- typescript: ts-jest@29.4.x declares `peer typescript@">=4.3 <7"`, so the
  TS 7 bump makes `npm ci` fail with ERESOLVE and takes the entire
  dev-dependencies group down with it (#1882).
- better-sqlite3: v13 dropped `prebuild-install` and always compiles from
  source; the Dockerfile `deps` stage ships no python3/build-base (#1889).

`npm audit` goes from 10 findings (6 high) to 7 (3 high). The remainder are
not fixable here: brace-expansion is bundled inside the `npm` package
(dev-only, not overridable) and react-router's advisory is RSC-mode-only,
which this BrowserRouter SPA does not use.
@steilerDev
steilerDev merged commit ef0712e into beta Aug 2, 2026
29 of 31 checks passed
@steilerDev
steilerDev deleted the chore/deps-security-overrides branch August 2, 2026 08:21
@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.13.0-beta.40 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

steilerDev added a commit that referenced this pull request Aug 2, 2026
Corrects #1927, which held better-sqlite3 at 12.x on the incorrect premise that v13 always compiles from source.

- v13 moved to N-API and ships prebuilds INSIDE the npm tarball, including linuxmusl-x64 and linuxmusl-arm64 — both Docker target arches are covered.
- #1889's Docker failure was only that npm synthesizes `node-gyp rebuild` (binding.gyp present), and node-gyp needs python3 to evaluate gyp even though binding.gyp short-circuits to `type: 'none'` when a prebuild exists. Nothing was ever going to compile.
- Fix: `npm ci --omit=dev --ignore-scripts` in the deps stage — better-sqlite3 is the only production dep with an install script, and it needs none (lib/binding.js resolves the prebuild at require() time). Keeps the image toolchain-free.
- Adds a build-time guard so a missing prebuild fails the build instead of crashing production at runtime.
- Removes the better-sqlite3 semver-major ignore rule; the typescript hold stays.

Verified: linuxmusl-arm64 locally (loads and queries inside the Alpine image), linuxmusl-x64 in CI's Docker job.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant