Skip to content

Fix Dependabot security vulnerabilities in docs site#5372

Merged
thomhurst merged 3 commits intomainfrom
fix/docs-security-vulnerabilities
Apr 4, 2026
Merged

Fix Dependabot security vulnerabilities in docs site#5372
thomhurst merged 3 commits intomainfrom
fix/docs-security-vulnerabilities

Conversation

@thomhurst
Copy link
Copy Markdown
Owner

Summary

  • Add yarn resolutions to docs/package.json to force patched versions of 15 vulnerable transitive dependencies in the Docusaurus docs site
  • All vulnerabilities are in npm transitive deps (lodash, minimatch, path-to-regexp, serialize-javascript, etc.) — no .NET/NuGet vulnerabilities
  • Renovate couldn't create PRs for these because they're transitive dependencies, not direct deps

Resolved packages

Package Resolved To Severity
lodash 4.18.1 high
lodash-es 4.18.1 high
minimatch 9.0.7 high
path-to-regexp 0.1.13 high
serialize-javascript 7.0.5 high/medium
brace-expansion 5.0.5 medium
qs 6.15.0 low
dompurify 3.3.3 moderate
node-forge 1.4.0 high
picomatch 2.3.2 high
svgo 3.3.3 high
yaml 2.8.3 moderate

Test plan

  • npm audit reports 0 vulnerabilities
  • docusaurus build succeeds
  • Verify Dependabot alerts are dismissed after merge

Add yarn resolutions to docs/package.json to force patched versions
of vulnerable transitive dependencies in the Docusaurus docs site.
@codacy-production
Copy link
Copy Markdown

codacy-production bot commented Apr 4, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

Copy link
Copy Markdown
Contributor

@claude claude bot left a comment

Choose a reason for hiding this comment

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

Code Review: Fix Dependabot security vulnerabilities in docs site

The PR achieves its stated goal — the Snyk scan passes and docusaurus build succeeds. However, there are two concerns worth addressing before merging.


High Risk: path-to-regexp forced to an incompatible API version

The resolutions block forces path-to-regexp to 0.1.13 for all packages, including ones that require semver-incompatible versions:

path-to-regexp@0.1.13, path-to-regexp@3.3.0, path-to-regexp@^1.7.0, path-to-regexp@~0.1.12:
  version "0.1.13"
  • react-router@5.3.4 requires ^1.7.0 — v1.x added named capture groups and compile() that don't exist in v0.1.x
  • serve-handler@6.1.6 requires 3.3.0 — v3.x API is again incompatible with v0.1.x

This won't break docusaurus build (SSG doesn't execute routing at build time), but it could silently cause broken URL matching in docusaurus serve or the client-side router.

Better approach: Use Yarn's selective version resolution syntax to scope the fix only to the vulnerable ancestor (express), which is the actual attack vector:

"resolutions": {
  "express/path-to-regexp": "0.1.13"
}

This leaves react-router and serve-handler free to use the API versions they were designed for.


Moderate Concern: Lock file churn beyond the security scope

The diff includes large-scale bumps to unrelated transitive packages:

  • @ai-sdk/gateway: 1.0.29 → 2.0.23 (major version)
  • @ai-sdk/react: 2.0.52 → 2.0.118
  • All @algolia/* packages: 5.38.x → 5.46.x
  • @babel/core: 7.26.0 → 7.28.5

This appears to be from running a fresh yarn install rather than a surgical update. The result is a +2207/-2222 line diff that's very hard to audit — the actual security fix is buried in a sea of unrelated changes.

Why it matters: If one of these incidental updates introduces a regression, it becomes difficult to bisect. The stated purpose of this PR is "fix security vulnerabilities" but the actual scope is a broad dependency refresh.

Suggestion: Consider regenerating the lock file starting from the original yarn.lock with only the resolutions added, rather than doing a full yarn install from scratch. This would produce a much smaller, more auditable diff scoped to just the security fixes.


Minor: brace-expansion cascade

brace-expansion is forced to 5.0.5 to satisfy a chain: minimatch@9brace-expansion@^5. But packages that previously used brace-expansion@^1.1.7 are now also resolved to v5, which is a cross-major forced upgrade. Since brace-expansion is a utility package with limited API surface this is likely fine, but it's worth verifying nothing uses the old API directly.


What's good

  • The intent is correct: security vulnerabilities in transitive dependencies are a real concern and resolutions is the right Yarn v1 mechanism to address them.
  • The Snyk scan passes and the build is green.
  • The lodash fix (4.18.1) is legitimate.

The path-to-regexp issue is the one I'd want verified or addressed before merging — the other points are informational.

Only express uses the vulnerable 0.1.x range. react-router (^1.7.0)
and serve-handler (3.3.0) have incompatible APIs and were incorrectly
downgraded by the global resolution.
The link pointed to #test-discovery-issues but the heading is
"Tests Not Discovered" (#tests-not-discovered).
Copy link
Copy Markdown
Contributor

@claude claude bot left a comment

Choose a reason for hiding this comment

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

Code Review: Fix Dependabot security vulnerabilities in docs site (follow-up)

The previous review raised two concerns. One has been fully addressed; the other remains.


Addressed: path-to-regexp scoping

The global "path-to-regexp": "0.1.13" override has been replaced with the correctly scoped "express/path-to-regexp": "0.1.13". This means react-router and serve-handler are no longer forced onto an incompatible API version. Good fix.


Still Outstanding: Lock file churn far exceeds the security scope

The diff remains +2211 / -2209 lines. The security-relevant portion — the 12 resolution pins added to package.json — accounts for roughly 15 lines. The remaining ~4400 changed lines in yarn.lock are unrelated transitive bumps:

  • @ai-sdk/gateway: 1.0.29 → 2.0.23 (major bump — new @vercel/oidc dependency added)
  • @ai-sdk/react: 2.0.52 → 2.0.118
  • All @algolia/* packages: 5.38.x → 5.46.x
  • @babel/core and toolchain packages bumped across the board

This looks like yarn install was run from scratch rather than a surgical yarn add --resolution. These incidental upgrades are unreviewed, untested beyond docusaurus build, and make it very difficult to bisect a future regression. A docs site CI build passing does not exercise the client-side router, search (Algolia), or AI SDK features at runtime.

Recommendation before merging:

  1. Check out the PR branch, revert yarn.lock to main, add only the resolutions block to package.json, then run yarn install --frozen-lockfile or yarn install to let Yarn resolve only what is pinned. The resulting lock file diff should be narrow — on the order of the pinned packages and their direct dependencies, not a wholesale refresh of the entire tree.
  2. If the intent is to also upgrade those unrelated packages, that should be a separate PR so changes can be reviewed and reverted independently.

The security goal is correct and the package.json changes look good. The concern is purely about the scope of the lock file changes bundled in alongside them.

Copy link
Copy Markdown
Contributor

@claude claude bot left a comment

Choose a reason for hiding this comment

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

Code Review: Fix Dependabot security vulnerabilities in docs site (third pass)

Checking whether the issues from the two previous reviews have been addressed.


Addressed: path-to-regexp scoping ✓

Commit c1256cce correctly changed the global "path-to-regexp": "0.1.13" to the scoped "express/path-to-regexp": "0.1.13". The lock file now shows three separate resolutions:

  • path-to-regexp@~0.1.120.1.13 (express, fixed ✓)
  • path-to-regexp@^1.7.01.9.0 (react-router, now gets its proper version ✓)
  • path-to-regexp@3.3.03.3.0 (serve-handler, unchanged ✓)

This is exactly right.

Also good: Broken anchor link fix ✓

The property-injection.md fix (#test-discovery-issues#tests-not-discovered) is a valid, independent improvement.


Still Outstanding: Lock file churn far exceeds security scope

The diff is still +2212 / -2210 lines. The security-relevant changes (12 pinned resolutions in package.json + their direct yarn.lock entries) account for maybe 50–100 lines. The remaining ~4300 changed lines are unrelated transitive upgrades:

  • @ai-sdk/gateway: 1.0.29 → 2.0.23 (major bump, new @vercel/oidc dependency added)
  • @ai-sdk/react: 2.0.52 → 2.0.118 (66 minor versions)
  • All @algolia/* packages: 5.38.x → 5.46.x
  • @babel/core and build toolchain bumped broadly

These changes are unreviewed, untested beyond docusaurus build, and make the PR very hard to audit. A docs build passing does not exercise the client-side router, search, or AI SDK features at runtime.

Recommended fix: On the PR branch, restore the original yarn.lock from main (git checkout main -- docs/yarn.lock), keep only the resolutions additions in package.json, then re-run yarn install. Yarn will re-resolve only the pinned packages and their immediate ancestors, producing a narrow diff that matches the stated scope of the PR.

If the intent is to also upgrade those unrelated packages, that work should be a separate PR so it can be reviewed independently and reverted in isolation if it causes a regression.

github-actions bot pushed a commit to IntelliTect/CodingGuidelines that referenced this pull request Apr 6, 2026
Updated [TUnit.Core](https://github.com/thomhurst/TUnit) from 1.23.7 to
1.28.7.

<details>
<summary>Release notes</summary>

_Sourced from [TUnit.Core's
releases](https://github.com/thomhurst/TUnit/releases)._

## 1.28.7

<!-- Release notes generated using configuration in .github/release.yml
at v1.28.7 -->

## What's Changed
### Other Changes
* fix: prevent StringBuilder race in console interceptor during parallel
tests by @​thomhurst in thomhurst/TUnit#5414
### Dependencies
* chore(deps): update tunit to 1.28.5 by @​thomhurst in
thomhurst/TUnit#5415


**Full Changelog**:
thomhurst/TUnit@v1.28.5...v1.28.7

## 1.28.5

<!-- Release notes generated using configuration in .github/release.yml
at v1.28.5 -->

## What's Changed
### Other Changes
* perf: eliminate redundant builds in CI pipeline by @​thomhurst in
thomhurst/TUnit#5405
* perf: eliminate store.ToArray() allocation on mock behavior execution
hot path by @​thomhurst in thomhurst/TUnit#5409
* fix: omit non-class/struct constraints on explicit interface mock
implementations by @​thomhurst in
thomhurst/TUnit#5413
### Dependencies
* chore(deps): update tunit to 1.28.0 by @​thomhurst in
thomhurst/TUnit#5406


**Full Changelog**:
thomhurst/TUnit@v1.28.0...v1.28.5

## 1.28.0

<!-- Release notes generated using configuration in .github/release.yml
at v1.28.0 -->

## What's Changed
### Other Changes
* fix: resolve build warnings in solution by @​thomhurst in
thomhurst/TUnit#5386
* Perf: Optimize MockEngine hot paths (~30-42% faster) by @​thomhurst in
thomhurst/TUnit#5391
* Move Playwright install into pipeline module by @​thomhurst in
thomhurst/TUnit#5390
* perf: optimize solution build performance by @​thomhurst in
thomhurst/TUnit#5393
* perf: defer per-class JIT via lazy test registration + parallel
resolution by @​thomhurst in
thomhurst/TUnit#5395
* Perf: Generate typed HandleCall<T1,...> overloads to eliminate
argument boxing by @​thomhurst in
thomhurst/TUnit#5399
* perf: filter generated attributes to TUnit-related types only by
@​thomhurst in thomhurst/TUnit#5402
* fix: generate valid mock class names for generic interfaces with
non-built-in type args by @​thomhurst in
thomhurst/TUnit#5404
### Dependencies
* chore(deps): update tunit to 1.27.0 by @​thomhurst in
thomhurst/TUnit#5392
* chore(deps): update dependency path-to-regexp to v8 by @​thomhurst in
thomhurst/TUnit#5378


**Full Changelog**:
thomhurst/TUnit@v1.27.0...v1.28.0

## 1.27.0

<!-- Release notes generated using configuration in .github/release.yml
at v1.27.0 -->

## What's Changed
### Other Changes
* Fix Dependabot security vulnerabilities in docs site by @​thomhurst in
thomhurst/TUnit#5372
* fix: use 0.0.0-scrubbed sentinel version in snapshot scrubber to avoid
false Dependabot alerts by @​thomhurst in
thomhurst/TUnit#5374
* Speed up Engine.Tests by removing ProcessorCount parallelism cap by
@​thomhurst in thomhurst/TUnit#5379
* ci: add concurrency groups to cancel redundant workflow runs by
@​thomhurst in thomhurst/TUnit#5373
* Add scope-aware initialization and disposal OpenTelemetry spans to
trace timeline and HTML report by @​Copilot in
thomhurst/TUnit#5339
* Add WithInnerExceptions() for fluent AggregateException assertion
chaining by @​thomhurst in thomhurst/TUnit#5380
* Drop net6.0 and net7.0 TFMs, keep net8.0+ and netstandard2.x by
@​thomhurst in thomhurst/TUnit#5387
* Remove all [Obsolete] members and migrate callers by @​thomhurst in
thomhurst/TUnit#5384
* Add AssertionResult.Failed overload that accepts an Exception by
@​thomhurst in thomhurst/TUnit#5388
### Dependencies
* chore(deps): update dependency mockolate to 2.3.0 by @​thomhurst in
thomhurst/TUnit#5370
* chore(deps): update tunit to 1.25.0 by @​thomhurst in
thomhurst/TUnit#5371
* chore(deps): update dependency minimatch to v9.0.9 by @​thomhurst in
thomhurst/TUnit#5375
* chore(deps): update dependency path-to-regexp to v0.2.5 by @​thomhurst
in thomhurst/TUnit#5376
* chore(deps): update dependency minimatch to v10 by @​thomhurst in
thomhurst/TUnit#5377
* chore(deps): update dependency picomatch to v4 by @​thomhurst in
thomhurst/TUnit#5382
* chore(deps): update dependency svgo to v4 by @​thomhurst in
thomhurst/TUnit#5383
* chore(deps): update dependency path-to-regexp to v1 [security] by
@​thomhurst in thomhurst/TUnit#5385


**Full Changelog**:
thomhurst/TUnit@v1.25.0...v1.27.0

## 1.25.0

<!-- Release notes generated using configuration in .github/release.yml
at v1.25.0 -->

## What's Changed
### Other Changes
* Fix missing `default` constraint on explicit interface implementations
with unconstrained generics by @​thomhurst in
thomhurst/TUnit#5363
* feat(mocks): add ReturnsAsync typed factory overload with method
parameters by @​thomhurst in
thomhurst/TUnit#5367
* Fix Arg.IsNull<T> and Arg.IsNotNull<T> to support nullable value types
by @​thomhurst in thomhurst/TUnit#5366
* refactor(mocks): use file-scoped types for generated implementation
details by @​thomhurst in thomhurst/TUnit#5369
* Compress HTML report JSON data and minify CSS by @​thomhurst in
thomhurst/TUnit#5368
### Dependencies
* chore(deps): update tunit to 1.24.31 by @​thomhurst in
thomhurst/TUnit#5356
* chore(deps): update dependency mockolate to 2.2.0 by @​thomhurst in
thomhurst/TUnit#5357
* chore(deps): update dependency polyfill to 9.24.1 by @​thomhurst in
thomhurst/TUnit#5365
* chore(deps): update dependency polyfill to 9.24.1 by @​thomhurst in
thomhurst/TUnit#5364


**Full Changelog**:
thomhurst/TUnit@v1.24.31...v1.25.0

## 1.24.31

<!-- Release notes generated using configuration in .github/release.yml
at v1.24.31 -->

## What's Changed
### Other Changes
* Fix Aspire 13.2.0+ timeout caused by ProjectRebuilderResource being
awaited by @​Copilot in thomhurst/TUnit#5335
* chore(deps): update dependency polyfill to 9.24.0 by @​thomhurst in
thomhurst/TUnit#5349
* Fix nullable IParsable type recognition in source generator and
analyzer by @​Copilot in thomhurst/TUnit#5354
* fix: resolve race condition in HookExecutionOrderTests by @​thomhurst
in thomhurst/TUnit#5355
* Fix MaxExternalSpansPerTest cap bypass when Activity.Parent chain is
broken by @​Copilot in thomhurst/TUnit#5352
### Dependencies
* chore(deps): update tunit to 1.24.18 by @​thomhurst in
thomhurst/TUnit#5340
* chore(deps): update dependency stackexchange.redis to 2.12.14 by
@​thomhurst in thomhurst/TUnit#5343
* chore(deps): update verify to 31.15.0 by @​thomhurst in
thomhurst/TUnit#5346
* chore(deps): update dependency polyfill to 9.24.0 by @​thomhurst in
thomhurst/TUnit#5348


**Full Changelog**:
thomhurst/TUnit@v1.24.18...v1.24.31

## 1.24.18

<!-- Release notes generated using configuration in .github/release.yml
at v1.24.18 -->

## What's Changed
### Other Changes
* feat(mocks): shorter, more readable generated mock type names by
@​thomhurst in thomhurst/TUnit#5334
* Fix DisposeAsync() ordering for nested property injection by @​Copilot
in thomhurst/TUnit#5337
### Dependencies
* chore(deps): update tunit to 1.24.13 by @​thomhurst in
thomhurst/TUnit#5331


**Full Changelog**:
thomhurst/TUnit@v1.24.13...v1.24.18

## 1.24.13

<!-- Release notes generated using configuration in .github/release.yml
at v1.24.13 -->

## What's Changed
### Other Changes
* perf(mocks): optimize MockEngine for lower allocation and faster
verification by @​thomhurst in
thomhurst/TUnit#5319
* Remove defunct `UseTestingPlatformProtocol` reference for vscode by
@​erwinkramer in thomhurst/TUnit#5328
* perf(aspnetcore): prevent thread pool starvation during parallel
WebApplicationTest server init by @​thomhurst in
thomhurst/TUnit#5329
* fix TUnit0073 for when type from from another assembly by @​SimonCropp
in thomhurst/TUnit#5322
* Fix implicit conversion operators bypassed in property injection casts
by @​Copilot in thomhurst/TUnit#5317
* fix(mocks): skip non-virtual 'new' methods when discovering mockable
members by @​thomhurst in thomhurst/TUnit#5330
* feat(mocks): IFoo.Mock() discovery with generic fallback and ORP
resolution by @​thomhurst in
thomhurst/TUnit#5327
### Dependencies
* chore(deps): update tunit to 1.24.0 by @​thomhurst in
thomhurst/TUnit#5315
* chore(deps): update aspire to 13.2.1 by @​thomhurst in
thomhurst/TUnit#5323
* chore(deps): update verify to 31.14.0 by @​thomhurst in
thomhurst/TUnit#5325

## New Contributors
* @​erwinkramer made their first contribution in
thomhurst/TUnit#5328

**Full Changelog**:
thomhurst/TUnit@v1.24.0...v1.24.13

## 1.24.0

<!-- Release notes generated using configuration in .github/release.yml
at v1.24.0 -->

## What's Changed
### Other Changes
* perf: optimize TUnit.Mocks hot paths by @​thomhurst in
thomhurst/TUnit#5304
* fix: resolve System.Memory version conflict on .NET Framework (net462)
by @​thomhurst in thomhurst/TUnit#5303
* fix: resolve CS0460/CS0122/CS0115 when mocking concrete classes from
external assemblies by @​thomhurst in
thomhurst/TUnit#5310
* feat(mocks): parameterless Returns() and ReturnsAsync() for async
methods by @​thomhurst in thomhurst/TUnit#5309
* Fix typo in NUnit manual migration guide by @​aa-ko in
thomhurst/TUnit#5312
* refactor(mocks): unify Mock.Of<T>() and Mock.OfPartial<T>() into
single API by @​thomhurst in
thomhurst/TUnit#5311
* refactor(mocks): clean up Mock API surface by @​thomhurst in
thomhurst/TUnit#5314
* refactor(mocks): remove generic/untyped overloads from public API by
@​thomhurst in thomhurst/TUnit#5313
### Dependencies
* chore(deps): update tunit to 1.23.7 by @​thomhurst in
thomhurst/TUnit#5305
* chore(deps): update dependency mockolate to 2.1.1 by @​thomhurst in
thomhurst/TUnit#5307

## New Contributors
* @​aa-ko made their first contribution in
thomhurst/TUnit#5312

**Full Changelog**:
thomhurst/TUnit@v1.23.7...v1.24.0

Commits viewable in [compare
view](thomhurst/TUnit@v1.23.7...v1.28.7).
</details>

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=TUnit.Core&package-manager=nuget&previous-version=1.23.7&new-version=1.28.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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