Skip to content

Bump vulnerable deps flagged by Component Governance - #27757

Merged
kian-thompson merged 13 commits into
microsoft:mainfrom
kian-thompson:kian-thompson/cg-alerts-fix
Jul 27, 2026
Merged

Bump vulnerable deps flagged by Component Governance#27757
kian-thompson merged 13 commits into
microsoft:mainfrom
kian-thompson:kian-thompson/cg-alerts-fix

Conversation

@kian-thompson

@kian-thompson kian-thompson commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Description

Address ~50 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.

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).

Build fixes triggered by the bumps above

  • webpack-dev-server@5 .d.ts references open@10 (ESM-only), which trips TS1479 under Node16 CJS resolution. Enabled skipLibCheck in the two consumer tsconfigs (examples/utils/example-webpack-integration, examples/utils/webpack-fluid-loader).
  • The wds@5 bump also introduced supports-color@10.2.2 into presence-tracker's transitive chain, which created a second puppeteer@23.10.3 pnpm peer variant. The existing @types/jest-environment-puppeteer workspace shim resolved through the root's older supports-color@8.1.1 variant, producing TS2345 mismatched-Page errors in presenceTracker.test.ts. Fixed by:
    • Adding puppeteer, typescript, and webpack-dev-server as devDeps on the types shim so its jest-environment-puppeteer resolution shares the same peer axis as consumers.
    • Importing Browser/BrowserContext/Page directly from "puppeteer" inside the shim so Page resolves via types_jest-environment-puppeteer/node_modules/puppeteer — identical real path as consumers, unambiguous type identity even under CI's non-deterministic dedup.

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). moniker is no longer present in any lockfile.

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 types_jest-environment-puppeteer devDep additions look larger than necessary; they are load-bearing. Removing typescript causes the shim's puppeteer to resolve to a different typescript peer variant than consumers, reintroducing TS2345. Removing webpack-dev-server still type-checks locally but reintroduces mixed supports-color@8/10 peer variants in the lockfile and matches the CI-flake conditions noted above.

kian-thompson and others added 5 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>
@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 (12764 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 27, 2026 17:44
moniker (Creative Commons Attribution-NoDerivatives license) is flagged
by Component Governance as a legal-compliance issue.

The three package.json `browser` aliases mapping `moniker` ->
`@fluidframework/server-services-client/dist/generateNames.js` are dead
code — no source in webpack-fluid-loader, local-driver, or memory-orderer
imports `moniker`, and the current name-generation path already uses
`sillyname` via `@fluidframework/server-services-client`. Remove them.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5e47fcd1-edae-44de-a5e8-7361327091dc
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>
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>
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>
@kian-thompson
kian-thompson force-pushed the kian-thompson/cg-alerts-fix branch from 05c6a56 to 05c4773 Compare July 27, 2026 18:02
@kian-thompson
kian-thompson marked this pull request as ready for review July 27, 2026 22:51
Copilot AI review requested due to automatic review settings July 27, 2026 22:51

Copilot AI 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.

Copilot reviewed 53 out of 59 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • server/gitrest/pnpm-lock.yaml: Generated file

@github-actions

Copy link
Copy Markdown
Contributor

Bundle size comparison

Base commit: 225b18601d1c2c820b87e67ac426546197322cd6
Head commit: a2e1c02a6922cf4af4acfb7d1d123107243c280a

Notable changes

  • 🟢 odspClient.js: parsed 592948 → 592435 (-513), gzip 159133 → 158546 (-587)
  • 748.js: removed (was parsed 58793, gzip 17827)
  • 985.js: removed (was parsed 44491, gzip 13726)
  • 578.js: added (parsed 58686, gzip 17657)
  • 252.js: added (parsed 44371, gzip 13732)
Per-bundle deltas

@fluid-example/bundle-size-tests

  • azureClient.js: parsed 620222 → 620158 (-64), gzip 165026 → 165428 (+402)
  • 🟢 odspClient.js: parsed 592948 → 592435 (-513), gzip 159133 → 158546 (-587)
  • aqueduct.js: parsed 526711 → 526745 (+34), gzip 140914 → 140959 (+45)
  • fluidFramework.js: parsed 398397 → 398037 (-360), gzip 113043 → 112908 (-135)
  • sharedTree.js: parsed 387784 → 387417 (-367), gzip 110441 → 110291 (-150)
  • containerRuntime.js: parsed 305061 → 305105 (+44), gzip 83401 → 83558 (+157)
  • sharedString.js: parsed 175984 → 176228 (+244), gzip 49445 → 49719 (+274)
  • experimentalSharedTree.js: parsed 160798 → 160677 (-121), gzip 45804 → 46276 (+472)
  • matrix.js: parsed 159845 → 160073 (+228), gzip 45411 → 45713 (+302)
  • loader.js: parsed 145256 → 145473 (+217), gzip 39063 → 39234 (+171)
  • odspDriver.js: parsed 104329 → 103927 (-402), gzip 32625 → 32410 (-215)
  • directory.js: parsed 66616 → 66881 (+265), gzip 18533 → 18762 (+229)
  • 748.js: removed (was parsed 58793, gzip 17827)
  • map.js: parsed 46709 → 46872 (+163), gzip 14310 → 14328 (+18)
  • odspPrefetchSnapshot.js: parsed 45642 → 45649 (+7), gzip 15277 → 15249 (-28)
  • 985.js: removed (was parsed 44491, gzip 13726)
  • summarizerDelayLoadedModule.js: parsed 30749 → 30717 (-32), gzip 7753 → 7716 (-37)
  • socketModule.js: parsed 26476 → 26476 (0), gzip 7886 → 7903 (+17)
  • createNewModule.js: parsed 12480 → 12454 (-26), gzip 4786 → 4797 (+11)
  • summaryModule.js: parsed 3797 → 3789 (-8), gzip 1860 → 1857 (-3)
  • connectionState.js: parsed 724 → 909 (+185), gzip 429 → 500 (+71)
  • sharedTreeAttributes.js: parsed 666 → 854 (+188), gzip 433 → 507 (+74)
  • debugAssert.js: parsed 429 → 429 (0), gzip 299 → 299 (0)
  • FluidFramework-HashFallback.js: parsed 422 → 419 (-3), gzip 316 → 313 (-3)
  • 578.js: added (parsed 58686, gzip 17657)
  • 252.js: added (parsed 44371, gzip 13732)

@kian-thompson
kian-thompson merged commit 0b78c58 into microsoft:main Jul 27, 2026
47 checks passed
@kian-thompson
kian-thompson deleted the kian-thompson/cg-alerts-fix branch July 27, 2026 23:42
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.

3 participants