Skip to content

fix(deps): upgrade OpenTelemetry and nyc to resolve audit vulns, drop protobufjs overrides#1508

Merged
JacksonWeber merged 2 commits into
microsoft:mainfrom
JacksonWeber:jacksonweber/upgrade-otel-remove-protobufjs-overrides
Jun 24, 2026
Merged

fix(deps): upgrade OpenTelemetry and nyc to resolve audit vulns, drop protobufjs overrides#1508
JacksonWeber merged 2 commits into
microsoft:mainfrom
JacksonWeber:jacksonweber/upgrade-otel-remove-protobufjs-overrides

Conversation

@JacksonWeber

@JacksonWeber JacksonWeber commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Resolves npm audit vulnerabilities by upgrading to safe packages directly and removing the protobufjs overrides.

Vulnerability count dropped from 35 (1 high, 33 moderate, 1 low) to 31 (all moderate).

Changes

  • Bump @azure/monitor-opentelemetry to ^1.18.1 and the OpenTelemetry 0.x exporters/sdk deps to ^0.218.0. @opentelemetry/otlp-transformer@0.218 no longer depends on protobufjs, so the only protobufjs left in the tree is the safe 7.x line (via @grpc/proto-loader). This resolves the high-severity protobufjs advisories without any override.
  • Remove the @opentelemetry/otlp-transformer and @grpc/proto-loader -> protobufjs overrides.
  • Bump nyc to ^18.0.0, which resolves the @babel/core and uuid (dev) advisories via patched istanbul-lib-instrument and istanbul-lib-processinfo.

Resolved without overrides

Advisory Severity Fix
protobufjs HIGH OTel 0.218 upgrade (only protobufjs@7.6.4 remains)
@babel/core moderate nyc@18 patched transitive
uuid moderate nyc@18 -> istanbul-lib-processinfo@3.0.1

Validation

  • npm run build
  • npm run test:unit247 passing, 0 failing

… protobufjs overrides

- Bump @azure/monitor-opentelemetry to ^1.18.1 and OTel 0.x exporters/sdk to ^0.218.0.
  otlp-transformer@0.218 no longer pulls protobufjs, so the only protobufjs left is
  the safe 7.x line via @grpc/proto-loader. Resolves the high-severity protobufjs
  advisories without overrides.
- Remove the @opentelemetry/otlp-transformer and @grpc/proto-loader protobufjs overrides.
- Bump nyc to ^18.0.0, which resolves the @babel/core and uuid (dev) advisories via
  patched istanbul-lib-instrument and istanbul-lib-processinfo.
- Keep the mocha -> serialize-javascript override: it is the only fix for a high-severity
  advisory since no mocha release ships a patched serialize-javascript (dev-only).

Remaining audit findings are upstream-gated (@opentelemetry/core <2.8.0, pending the
Azure Monitor distro) or dev-only with no patched release (js-yaml via nyc).

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

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.

Pull request overview

This PR updates dependency versions to address npm audit findings by upgrading the Azure Monitor OpenTelemetry distro and OpenTelemetry 0.x packages, upgrading nyc, and removing now-unneeded protobufjs overrides.

Changes:

  • Bump @azure/monitor-opentelemetry to ^1.18.1 and related OpenTelemetry 0.x deps to ^0.218.0.
  • Upgrade nyc to ^18.0.0 to pick up patched transitive dependencies.
  • Remove protobufjs overrides for @opentelemetry/otlp-transformer / @grpc/proto-loader from package.json and refresh the lockfile accordingly.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.

File Description
package.json Updates direct dependency versions and removes protobufjs overrides while keeping the remaining mocha -> serialize-javascript override.
package-lock.json Updates the resolved dependency graph to reflect the new versions and removed overrides.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json
The perf harness installs the candidate applicationinsights, which pulls
@opentelemetry/instrumentation-pg -> @types/pg -> pg-protocol@1.14.0 whose
.d.ts uses a generic Buffer<...>. With the harness's @types/node@18 (non-generic
Buffer), tsc failed with TS2315. Enable skipLibCheck (matching the root tsconfig)
so type-checking of third-party .d.ts files no longer breaks the perf build.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@JacksonWeber JacksonWeber merged commit 24d6657 into microsoft:main Jun 24, 2026
13 checks passed
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.

3 participants