Skip to content

chore(security): resolve pnpm audit vulnerabilities (1 high) - #551

Merged
tkislan merged 1 commit into
mainfrom
chore/security-audit-2026-10-05
Oct 5, 2026
Merged

tkislan merged 1 commit into
mainfrom
chore/security-audit-2026-10-05

Conversation

@tkislan

@tkislan tkislan commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

pnpm audit fails the Audit - All CI job with 1 high advisory in a dev-only transitive dependency. Audit - Production is unaffected.

The usual fix here, raising a pnpm.overrides floor, can't work because no patched braces exists. This PR bumps the direct devDependency that pulls it in instead, as #515 did for vitest.

Package Advisory Vulnerable Patched Fix Path
braces GHSA-vfj7-8cjw-p6xm (high, CVE-2026-93687): stack exhaustion from deeply nested brace patterns <=3.0.3 (every release) none lint-staged 16.2.5 → 16.4.0, which drops micromatch (and with it braces) dev only: lint-staged > micromatch > braces
--- a/package.json
+++ b/package.json
@@ "devDependencies": {
-    "lint-staged": "16.2.5",
+    "lint-staged": "16.4.0",
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
   lint-staged@16.4.0:
     dependencies:
       commander: 14.0.3
       listr2: 9.0.5
-      micromatch: 4.0.8
-      nano-spawn: 2.1.0
-      pidtree: 0.6.1
+      picomatch: 4.0.5
       string-argv: 0.3.2
+      tinyexec: 1.3.0
       yaml: 2.9.0

Removed from the lockfile: braces, fill-range, is-number, micromatch, nano-spawn, pidtree, to-regex-range. Nothing was added: picomatch@4.0.5 and tinyexec@1.3.0 were already resolved.

Decisions

  • Direct dependency bump, not an override. braces has no patched version (patched_versions: <0.0.0). micromatch@4.0.8 is its latest release and still declares braces: ^3.0.3, so overriding either package can't remove the advisory. The lint-staged 16.4.0 release has one change: "Replace micromatch with picomatch" (#1739).
  • 16.4.0, not 17.x. Every 17.x release declares engines.node >=22.22.1, but .nvmrc pins 22.21.0. 16.4.0 keeps >=20.17 and is a minor bump within the current major.
  • Exact pin, matching every other root devDependencies entry.
  • No new override and no audit ignore. Once the package is out of the tree there is nothing to pin or suppress.
  • Not merged through Renovate. chore(deps): update non-major dependencies #328 also bumps lint-staged to 16.4.0, but it bundles many unrelated updates and every check on it fails. This PR keeps the security fix on its own; chore(deps): update non-major dependencies #328 drops the line when it rebases.
  • Exposure was minimal. braces was only used by the husky pre-commit hook to match the three fixed globs in the root lint-staged config. It never received untrusted input.

Verification

  • pnpm audit and pnpm audit --prod: no known vulnerabilities
  • Matching is unchanged. Running the generateTasks of lint-staged@16.2.5 and 16.4.0 over all 1,166 tracked files with the repo's config gives the same file sets for all three patterns: **/*.{ts,tsx,json,jsonc} 459, **/*.{md,yml,yaml} 217, **/package.json 10, with 0 mismatches.
  • pnpm exec lint-staged on the staged package.json and pnpm-lock.yaml: biome, prettier and sort-package-json each matched the expected file; exit 0, no changes
  • pnpm install --frozen-lockfile, pnpm build, pnpm typecheck, pnpm test (184 files, 3368 tests), pnpm run license-check, pnpm biome:check, pnpm prettier:check: pass. The 8 biome noConsole warnings in examples/local-runner/*/serve.mjs predate this PR.
  • Not run locally: pnpm test:integration (needs deepnote-toolkit). It is left to the Runtime Integration CI job.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ALzg3SHnr83bG4gbzraNg2

Summary by CodeRabbit

  • Chores
    • Updated development tooling to a newer version. This maintenance change does not alter application features or behavior, so there are no new user-facing capabilities or changes to how the product works.

pnpm audit fails the Audit - All CI job with one advisory in a dev-only
transitive dependency:

- braces 3.0.3, via lint-staged 16.2.5 > micromatch 4.0.8:
  GHSA-vfj7-8cjw-p6xm (high, CVE-2026-93687), stack exhaustion from
  deeply nested brace patterns. Every published version (<=3.0.3) is
  affected and there is no patched release.

No override can fix this: braces has no patched version, and micromatch
4.0.8 is its latest release and still depends on braces ^3.0.3. Instead,
bump the direct devDependency lint-staged 16.2.5 -> 16.4.0, whose only
change is replacing micromatch with picomatch. braces, micromatch and
their sub-dependencies leave the lockfile; picomatch 4.0.5 and tinyexec
1.3.0 were already in the tree.

Stay on 16.x: lint-staged 17.x requires Node >=22.22.1, while .nvmrc pins
22.21.0. 16.4.0 keeps engines >=20.17.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ALzg3SHnr83bG4gbzraNg2
@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: a1d9ec14-a20d-46a3-85fc-355fe4093ac9
📥 Commits

Reviewing files that changed from the base of the PR and between 505ea44 and 73796eb.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • package.json

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The root development dependency lint-staged is upgraded from 16.2.5 to 16.4.0.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Suggested reviewers: jamesbhobbs

Merge Risk: ⚪ Minimal · up to 73796

The dependency update and lockfile agree, and the selected version supports the pinned Node release. No merge-blocking issue is evident.

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Updates Docs ✅ Passed PASS. This PR changes only the root lint-staged devDependency and its lockfile entries. It does not implement a feature, so the documentation-update check does not apply.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the dependency update’s security purpose: resolving a high-severity pnpm audit vulnerability.
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.00%. Comparing base (505ea44) to head (73796eb).

Additional details and impacted files
@@           Coverage Diff            @@
##             main     #551    +/-   ##
========================================
  Coverage   90.00%   90.00%            
========================================
  Files         211      211            
  Lines       12451    12451            
  Branches     3482     3588   +106     
========================================
  Hits        11206    11206            
  Misses       1242     1242            
  Partials        3        3            

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tkislan
tkislan marked this pull request as ready for review October 5, 2026 11:56
@tkislan
tkislan requested a review from a team as a code owner October 5, 2026 11:56
@tkislan
tkislan merged commit b331a3f into main Oct 5, 2026
22 checks passed
@tkislan
tkislan deleted the chore/security-audit-2026-10-05 branch October 5, 2026 12:12
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.

2 participants