Skip to content

Bump vulnerable deps flagged by Component Governance#27757

Draft
kian-thompson wants to merge 14 commits into
microsoft:mainfrom
kian-thompson:kian-thompson/cg-alerts-fix
Draft

Bump vulnerable deps flagged by Component Governance#27757
kian-thompson wants to merge 14 commits into
microsoft:mainfrom
kian-thompson:kian-thompson/cg-alerts-fix

Conversation

@kian-thompson

Copy link
Copy Markdown
Contributor

Description

Address 42 Component Governance alerts flagged against the repo. Uses pnpm overrides (with exact pins for supply-chain-sensitive packages) for transitive deps, and direct version bumps for packages we own the specifier for.

Root pnpm-workspace.yaml overrides

Compat-workspaces overrides: matching axios/brace-expansion bumps plus moniker: "-" to drop the legal-flagged transitive from historical published @fluidframework/server-memory-orderer versions.

Server workspaces (routerlicious/gitrest/historian): added uuid@<7 → ^11.1.1 to patch CVE-2026-41907. uuid is a dead transitive of kafka-node@5.0.0 (declared but never imported), so API compat is not a concern.

Direct dependency bumps

  • webpack-dev-server: ~4.15.2~5.2.6 across 41 example/tool packages (CVE-2025-30359/30360, CVE-2026-6402/9595/14620/14631). Repo already requires node ≥22 and webpack ≥5; no config uses the removed v4-only APIs (onBefore/AfterSetupMiddleware, http2, https: {}).
  • morgan: ^1.8.1^1.11.0 in tinylicious and services-utils (CVE-2026-5078, log forging via :remote-user).

Cleanup: removed three dead "browser": { "moniker": ... } aliases in webpack-fluid-loader, local-driver, and memory-orderer (no source imports moniker; underlying @fluidframework/server-services-client now uses sillyname).

All affected lockfiles regenerated (root, compat-workspaces/full, server/routerlicious, server/gitrest, server/historian) and verified to contain no packagefeedproxy / ms-feed-* tarball URLs (supply-chain policy).

Intentionally deferred (not in this PR)

  • pm2 (AGPL-3.0 legal flag) — needs strategy decision (permissively-licensed alternative vs. legal exception).
  • quill (CVE-2025-15056, XSS in HTML export) — no upstream fix released; our usage is not the vulnerable HTML-export path.
  • @opentelemetry/core — installed only by the "Upload telemetry to Kusto" pipeline step, not by any repo package; needs pipeline task/agent-image update.

Reviewer Guidance

The review process is outlined on this wiki page.

  • The webpack-dev-server v4→v5 bump is the largest blast-radius change; I grepped all 42 webpack.config.cjs files for v4-only removed APIs and none appear. Please double-check any dev-server configs you're familiar with.
  • The axios@^1.15.0 → 1.18.1 override is an exact pin to preserve the existing supply-chain discipline in this file; do not change to a caret without discussion.
  • The moniker: "-" override in compat-workspaces relies on the fact that current server-services-client uses sillyname; if any back-compat published version actually invokes moniker at runtime during compat tests, the compat matrix will surface it.

kian-thompson and others added 7 commits July 24, 2026 18:43
Address 33 Component Governance alerts by updating pnpm-workspace
overrides (manifest-only; lockfile regeneration to follow):

Root pnpm-workspace.yaml:
- axios@<1: ^0.32.0            -> ^0.33.0   (CVE-2026-44486/87/90/92, GHSA-gcfj-64vw-6mp9)
- axios@^1.15.0: 1.16.0         -> ^1.18.1   (GHSA-gcfj/jqh4/mmx7/7q8q/mwf2/f4gw/xj6q)
- brace-expansion@>=5 <6: ^5.0.6 -> ^5.0.7   (CVE-2026-13149)
- brace-expansion@>=1 <2: ^1.1.16 (new)      (CVE-2026-13149)
- brace-expansion@>=2 <3: ^2.1.2  (new)      (CVE-2026-13149)
- js-yaml@>=3 <4: ^3.15.0         (new)      (CVE-2026-59869)
- js-yaml@>=4 <5: ^4.3.0          (new)      (CVE-2026-59869)
- webpack@>=5 <6: ^5.104.1        (new)      (CVE-2025-68157/68458)
- websocket-driver@>=0 <1: ^0.7.5 (new)      (CVE-2026-54466/54490)
- fast-uri: ^3.1.2               -> ^4.1.1   (CVE-2026-16221)

packages/test/test-version-utils/compat-workspaces/full/pnpm-workspace.yaml:
- axios@<1: ^0.31.1              -> ^0.33.0
- axios@>=1 <2: ^1.15.2          -> ^1.18.1
- brace-expansion@>=1<2, >=2<3, >=5<6 (new)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Regenerated root and compat-workspaces/full lockfiles to pick up the
override changes in the previous commit. Confirmed no packagefeedproxy
or ms-feed-* tarball URLs were introduced.

Notable resolved versions:
- axios: 0.33.0 and 1.18.1
- brace-expansion: 1.1.16, 2.1.2, 5.0.7
- js-yaml: 3.15.0, 4.3.0
- webpack: 5.109.0
- websocket-driver: 0.7.5
- fast-uri: 4.1.1

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Address CG alerts on webpack-dev-server 4.15.2 (CVE-2025-30359,
CVE-2025-30360, CVE-2026-6402, CVE-2026-9595, CVE-2026-14620,
CVE-2026-14631). All patched in 5.2.6.

The v4 -> v5 upgrade is drop-in for this repo:
- Repo already requires node >=22 (v5 requires >=18.12)
- Webpack is already ^5.94.0 (v5 requires >=5)
- All 42 webpack.config.cjs files already use setupMiddlewares;
  none use the removed onBefore/onAfterSetupMiddleware, http2, or
  https:{} options.

Updated 41 package.json files (examples/**, devtools-test-app) and
regenerated the root lockfile; verified no packagefeedproxy/ms-feed-*
tarball URLs. Smoke-tested config load with wds@5.2.6.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
morgan 1.11.0 neutralizes CR/LF in the :remote-user token, resolving
the log-forging CVE affecting 1.2.0 through 1.10.1.

Updated tinylicious and services-utils; regenerated
server/routerlicious/pnpm-lock.yaml (verified no proxy/tarball URLs).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The alert on uuid@3.4.0 in server/routerlicious, server/gitrest, and
server/historian is transitive from kafka-node@5.0.0. kafka-node
declares uuid@^3.0.0 in its package.json but does not import it in
any .js file (dead dependency), so overriding to the patched 11.x
line is safe API-wise.

Complements the existing uuid@>=7 <12 -> ^11.1.1 override in each
server pnpm-workspace.yaml. Lockfiles regenerated (no proxy/tarball URLs).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
moniker (Creative Commons Attribution-NoDerivatives license) is flagged
by Component Governance as a legal-compliance issue.

Current source: @fluidframework/server-services-client generates names
via sillyname, not moniker. The three package.json 'browser' aliases
mapping 'moniker' -> generateNames.js are dead code (no source imports
moniker).

Fixes:
- Add `moniker: "-"` override in
  packages/test/test-version-utils/compat-workspaces/full/pnpm-workspace.yaml
  to drop the transitive dep pulled in by historical published
  @fluidframework/server-memory-orderer@0.10xx versions. Verified moniker
  removed from that lockfile.
- Remove the now-unused browser aliases from webpack-fluid-loader,
  local-driver, and memory-orderer package.json files.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Restore intentional exact-pin discipline for supply-chain-sensitive
packages:

- axios@^1.15.0 override: ^1.18.1 -> 1.18.1 (exact)
- axios@>=1<2 in compat-workspaces: ^1.18.1 -> 1.18.1 (exact)
- webpack-dev-server direct dep: ^5.2.6 -> ~5.2.6 (tilde) across
  41 example/tool packages

The exact axios pin matches the pre-existing convention (see the
axios supply-chain compromise notes and neverBuiltDependencies list
in the root pnpm-workspace.yaml).

Lockfiles regenerated; resolved versions unchanged (axios 1.18.1,
webpack-dev-server 5.2.6).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added area: examples Changes that focus on our examples area: server Server related issues (routerlicious) area: tools area: driver Driver related issues area: repo Repo related work dependencies Pull requests that update a dependency file area: website area: tests Tests to add, test infrastructure improvements, etc base: main PRs targeted against main branch labels Jul 24, 2026
@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Hi! Thank you for opening this PR. Want me to review it?

Based on the diff (12774 lines, 59 files), I've queued these reviewers:

  • Correctness — logic errors, race conditions, lifecycle issues
  • Security — vulnerabilities, secret exposure, injection
  • API Compatibility — breaking changes, release tags, type design
  • Performance — algorithmic regressions, memory leaks
  • Testing — coverage gaps, hollow tests

How this works

  • Adjust the reviewer set by ticking/unticking boxes above. Reviewer toggles alone don't trigger anything.

  • Tick Start review below to dispatch the review fleet.

  • After review finishes, tick Start review again to request another run — it auto-resets after each dispatch.

  • This comment updates as new commits land; your reviewer selections are preserved.

  • Start review

kian-thompson and others added 7 commits July 24, 2026 20:21
webpack-dev-server@5.x .d.ts references open@10 (ESM-only), which trips
TS1479 for the two packages that 'import type' from webpack-dev-server
under Node16 CJS module resolution.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Regenerating the lockfile with the CG-override bumps caused pnpm to
resolve two puppeteer peer variants (via debug's supports-color peer:
8.1.1 and 10.2.2). That produced a nominal Page-type mismatch in the
presence-tracker jest suite (TS2345, #private field mismatch).

Force supports-color to ^10.2.2 so debug and its dependents dedup to
a single puppeteer resolution.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The supports-color override didn't dedupe puppeteer peer variants and
broke chalk@3 (which requires CJS supports-color <9). After merging
upstream/main (which reverted the internal registry setting), a clean
lockfile regen resolves the puppeteer TS2345 issue in jest tests without
needing this override.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Historical @fluidframework/server-memory-orderer@0.10xx published versions
require('moniker') at runtime (in localNode.js), so the transitive dep
cannot be dropped without breaking realsvc test loading. My earlier
assumption that moniker was dead code was incorrect for these older
published versions.

The moniker CG legal alert on those historical packages returns, but
it's isolated to the compat sub-workspace's test-time installs of older
published server-memory-orderer versions — not our shipped code.

Fixes: Error: Cannot find module 'moniker' in
test:realsvc:tinylicious:report and test:realsvc:local:report.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The webpack-dev-server 4→5 bump (needed for CG CVE fixes) introduced
supports-color@10.2.2 into presence-tracker's transitive dep chain,
which caused pnpm to create a new debug@4.4.3(supports-color@10.2.2)
peer variant. types_jest-environment-puppeteer, which had no webpack-dev-server
dep, kept resolving the older debug@4.4.3(supports-color@8.1.1) variant.

That variant divergence cascaded up through jest-environment-puppeteer
→ puppeteer, producing two nominally-incompatible Page types:
- The Page imported by presence-tracker's test resolved via the
  (supports-color@10.2.2) puppeteer variant.
- The Page returned by the jest-environment-puppeteer 'page' global
  (typed via @types/jest-environment-puppeteer, which links to this
  workspace package) resolved via the (supports-color@8.1.1) variant.
- Result: TS2345 mismatched Page in presenceTracker.test.ts.

Add puppeteer, typescript, and webpack-dev-server as devDeps on the
types workspace so its jest-environment-puppeteer resolution shares
the same peer axis as presence-tracker's. Verified via lockfile diff
that both importers now resolve
  jest-environment-puppeteer@10.1.4(debug@4.4.3(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.4.5)
identically, and confirmed locally with presence-tracker test:jest,
full ci:test:jest sweep, ci:build, and test:realsvc:local:report:full.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Root's puppeteer devDep and presence-tracker's puppeteer resolve to
different pnpm peer variants (root:supports-color@8.1.1 vs
presence-tracker:supports-color@10.2.2). The shim was declaring
'page: JestPuppeteerGlobal["page"]', which pulled Page transitively
through jest-environment-puppeteer.d.ts's own 'import from "puppeteer"'.
That import resolves at the .pnpm real path of jest-env-puppeteer, whose
ancestor node_modules only contains root's (8.1.1) variant — a different
real file from presence-tracker's (10.2.2) variant.

TypeScript deduplicated by Package ID locally but not consistently on CI,
producing TS2345 mismatched-Page errors in presenceTracker.test.ts.

Importing Page directly from 'puppeteer' inside the shim resolves via
types_jest-environment-puppeteer/node_modules/puppeteer (10.2.2), the
identical real path as consumers, so type identity is unambiguous.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Bundle size comparison

Base commit: 105abcb748df4491dafe568c9930b0107569110e
Head commit: 1e43521c7a74dcdeb073f7a9a89a70b0f81b0fd9

⚠️ Comparison unavailable.

The PR's CI build failed — fix the build and the comment will update once the next run succeeds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: driver Driver related issues area: examples Changes that focus on our examples area: repo Repo related work area: server Server related issues (routerlicious) area: tests Tests to add, test infrastructure improvements, etc area: tools area: website base: main PRs targeted against main branch dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant