Skip to content

fix(deps): resolve transitive advisories - #559

Merged
uniqueg merged 2 commits into
devfrom
fix/dep-advisories
Nov 3, 2026
Merged

uniqueg merged 2 commits into
devfrom
fix/dep-advisories

Conversation

@uniqueg

@uniqueg uniqueg commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Summary

Resolves the transitive advisories that have a usable fix. Light lane: dependency and configuration changes only, no component code. I reviewed the diff myself.

Updated within the declared ranges:

package              before   after
koa                  2.16.1   2.16.4
lodash               4.17.23  4.18.1
lodash-es            4.17.21  4.18.1
webpack              5.100.2  5.112.2
mdast-util-to-hast   13.2.0   13.2.1
glob (under sucrase) 10.4.5   10.5.0

Overrides in the root package.json, because the parent pins or caps the version:

package      before  after    why an override
postcss      8.4.31  8.5.32   next pins 8.4.31 exactly
cross-spawn  5.1.0   6.0.6    only below clipboardy, through execa 0.8
katex        0.16.22 0.18.10  nextra and mermaid cap it at ^0.16

postcss also moves from 8.5.23 to 8.5.32 at the root, as next now shares that copy.

webpack 5.112 no longer depends on terser-webpack-plugin and a few other packages, which is why they leave the lockfile.

How it was verified

  • npm ci from the new lockfile, then npm run lint (includes the build of all packages and the docs): 19 of 19 tasks pass.
  • node --test scripts/release.test.js: 25 of 25 pass.
  • The docs export has the same number of files as before the change (175).
  • The generated tw-styles.ts files are byte-identical to dev.
  • npm ls postcss katex cross-spawn mermaid reports no invalid entries.
  • Mermaid in the browser, because uuid, lodash-es and katex reach the site through it: in headless Chromium against the built docs, the diagram on /docs/providers renders with 8 nodes and no page or console errors. A temporary page (not committed) with math in a node label ($$x^2$$) renders through katex 0.18 as well.
  • Not run locally: the browser tests (WebKit isn't installed here). CI runs them.

Not covered here

next-mdx-remote, zod, minimatch and deepmerge have no fix that fits this PR. They are handled as Dependabot alert dismissals, with the reasons given there. An override of next-mdx-remote to 6.0.0 rewrote about 12,000 lockfile lines, and nextra 2 uses the Zod 3 API (z.function().returns()).

Closes #556

🤖 Generated with Claude Code

https://claude.ai/code/session_011FSoqMUX3EU35poH13xMgG

Summary by Sourcery

Update dependencies and overrides to resolve fixable transitive security advisories without changing application components.

Bug Fixes:

  • Resolve available transitive dependency security advisories by updating vulnerable packages and applying targeted dependency overrides.

Tests:

  • Verify the dependency updates with linting, release tests, dependency-tree validation, and built-docs browser checks.

Update koa, lodash, lodash-es, webpack, mdast-util-to-hast and glob
within their declared ranges. Add overrides where a parent pins or caps
the version: postcss below next, cross-spawn below clipboardy, and katex.

Closes #556

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011FSoqMUX3EU35poH13xMgG
@sourcery-ai

sourcery-ai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This dependency-only change resolves actionable transitive advisories by updating packages within declared compatibility ranges and adding narrowly scoped npm overrides for cross-spawn, katex, and postcss where parent constraints block patched versions. The lockfile is regenerated to reflect the updated dependency graph, including webpack's removed transitive packages; validation covers installation, lint/build, release tests, dependency-tree consistency, generated output stability, and Mermaid/Katex browser rendering.

File-Level Changes

Change Details Files
Upgrade vulnerable direct and transitive dependencies to patched versions within compatible ranges.
  • Update koa, lodash, lodash-es, webpack, mdast-util-to-hast, and sucrase's glob dependency.
  • Regenerate the lockfile and remove obsolete webpack-related transitive packages.
package-lock.json
Add targeted npm overrides where upstream dependency constraints prevent advisory fixes.
  • Force clipboardy's cross-spawn to 6.0.6.
  • Force katex to 0.18.10.
  • Allow next to resolve postcss from the patched 8.5 line.
package.json
package-lock.json

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codecov

codecov Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.89%. Comparing base (27482bd) to head (fc516f8).
⚠️ Report is 1 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #559   +/-   ##
=======================================
  Coverage   70.89%   70.89%           
=======================================
  Files          23       23           
  Lines        5638     5638           
  Branches      190      190           
=======================================
  Hits         3997     3997           
  Misses       1636     1636           
  Partials        5        5           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@uniqueg
uniqueg marked this pull request as ready for review November 3, 2026 03:22
@uniqueg
uniqueg requested a review from anuragxxd as a code owner November 3, 2026 03:22

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!

Fixed security issues:

Linked issues

#556 fix(deps): resolve transitive advisories · 9 of 10 met · 1 to check by hand

# Requirement Status Notes
1 Update koa from 2.16.1 ✅ Met The lockfile resolves koa to 2.16.4.
2 Update lodash from 4.17.23 ✅ Met The lockfile resolves lodash to 4.18.1.
3 Update lodash-es from 4.17.21 ✅ Met The lockfile resolves lodash-es to 4.18.1.
4 Update webpack from 5.100.2 ✅ Met The lockfile resolves webpack to 5.112.2.
5 Update mdast-util-to-hast from 13.2.0 ✅ Met The lockfile resolves mdast-util-to-hast to 13.2.1.
6 Update glob 10.4.5 under sucrase ✅ Met The sucrase-nested glob resolves to 10.5.0.
7 Override postcss pinned by next ✅ Met The root override targets next, and the lockfile resolves postcss to 8.5.32.
8 Override cross-spawn under clipboardy ✅ Met The root override targets clipboardy, and its nested cross-spawn resolves to 6.0.6.
9 Override katex capped by nextra and mermaid ✅ Met The root override resolves katex to 0.18.10.
10 The packages, docs site and tests still build and pass 👀 Check by hand (runtime) Confirm the build and test checks pass in CI; the PR description reports local build and release-test success, but says browser tests were not run locally.

Sourcery assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@uniqueg
uniqueg merged commit 2ad5b3f into dev Nov 3, 2026
19 checks passed
@uniqueg
uniqueg deleted the fix/dep-advisories branch November 3, 2026 03:32
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.

fix(deps): resolve transitive advisories

1 participant