0
Fork 0
mirror of https://github.com/mastra-ai/mastra.git synced 2026-11-17 08:44:46 +00:00
mastra/observability
mastra-platform[bot] 93b823a847
fix(deps): patch @opentelemetry/resources (GHSA-qrww-3xmv-qhgm) (#30580)
## Summary

Fixes the open dependency advisories from the Security board in the
mastra monorepo (outside templates). After checking every lockfile in
the repo, only one advisory was still open; the other three already
resolve to fixed versions on `main`.

### Advisories

| Item | Package | Advisory | Status |
| --- | --- | --- | --- |
| SEC-323 | `@opentelemetry/resources` <2.12.1 / >=3.0.0 <3.1.1 |
GHSA-qrww-3xmv-qhgm | **Fixed in this PR** |
| SEC-262 | `fastify` 5.12.6 → 5.12.8 | AIKIDO-2026-576509 | Already
fixed on `main`. Every lockfile resolves `fastify@5.12.8` and the direct
specifiers are `^5.12.7` / `5.12.8` |
| SEC-243 | `@opentelemetry/core` 1.30.1 → 2.8.0 | GHSA-8988-4f7v-96qf |
Already fixed on `main`. No lockfile has `@opentelemetry/core@1.x`; only
2.9.0+/2.12.x/3.x are present, all at or above the fixed 2.8.0, so no
major bump is needed |
| SEC-252 | `follow-redirects` 1.16.1 → 1.16.2 | — | Already fixed on
`main`. Only `follow-redirects@1.16.2` is present outside templates |

`hono` and `templates/template-mongodb-bedrock-agent` are out of scope
because other sessions are handling them.

### Changes (SEC-323)

- **Direct bumps:** `@opentelemetry/resources` `^2.12.0` → `^2.12.1` in
`@mastra/arize`, `@mastra/laminar` and `@mastra/otel-exporter`.
- **Root overrides** (`pnpm-workspace.yaml`), scoped to the affected
ranges: `@opentelemetry/resources@>=2.0.0 <2.12.1 → 2.12.1` and
`@opentelemetry/resources@>=3.0.0 <3.1.1 → 3.1.1`. Older OTel SDK lines
(0.207 / 0.211 / 0.220 / 0.300, via third-party deps) pin `resources` to
an exact version, and both fixes are patch releases in the same major.
- **Nested example lockfiles** get the same scoped overrides:
- `observability/_examples/otel-bridge/agent-hub`: also changes the
pinned direct `2.10.0` to `2.12.1`.
- `observability/_examples/otel-bridge/hono-multi`: also raises
`instrumentation`'s `^2.0.1` to `^2.12.1`.
- `examples/durable-agents`: added to `package.json` `pnpm.overrides`,
because this project runs pnpm 10.
- As a side effect, `@opentelemetry/core` moves to 2.12.1 / 3.1.1, the
versions those `resources` releases depend on. No other resolutions
changed.
- A changeset for the three published packages.

## Test plan

- [x] `pnpm why @opentelemetry/resources -r`: only `2.12.1` and `3.1.1`
remain (previously 2.2.0, 2.5.0, 2.9.0, 2.12.0, 3.0.0).
- [x] Nested lockfiles (`durable-agents`, `agent-hub`, `hono-multi`) now
resolve only `@opentelemetry/resources@2.12.1`.
- [x] `pnpm turbo build --filter=@mastra/arize...
--filter=@mastra/laminar... --filter=@mastra/otel-exporter...`: 19/19
tasks pass.
- [x] Tests pass: `@mastra/arize` (27), `@mastra/laminar` (6),
`@mastra/otel-exporter` (187), `@mastra/otel-bridge` (52, a transitive
consumer).

Fixes SEC-323
Ref SEC-262
Ref SEC-243
Ref SEC-252


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

**ELI5:** Some tools send app performance data with an OpenTelemetry
library that has a known security bug. This change updates those tools
and example projects to fixed versions, so the bug no longer applies.

## Summary

This change updates `@opentelemetry/resources` to address advisory
GHSA-qrww-3xmv-qhgm. It changes 15 files, with 581 lines added and 355
removed.

### Published packages

Four published packages receive patch changesets: `@mastra/arize`,
`@mastra/arthur`, `@mastra/laminar`, and `@mastra/otel-exporter`.

- `@mastra/arize` raises `@opentelemetry/core`,
`@opentelemetry/resources`, and `@opentelemetry/sdk-trace-base` from
`^2.12.0` to `^2.12.1`. It raises the OTLP trace exporter from
`^0.223.0` to `^0.223.1`.
- `@mastra/laminar` sets `@opentelemetry/resources` and
`@opentelemetry/sdk-trace-base` to `^2.12.1`. It sets
`@opentelemetry/exporter-trace-otlp-proto` to `^0.223.1`.
- `@mastra/otel-exporter` raises the core, resources, trace SDK, and
Zipkin packages from `^2.12.0` to `^2.12.1`. It raises the logs SDK and
OTLP log and trace exporters from `^0.223.0` to `^0.223.1`.
- `@mastra/arthur` raises `@opentelemetry/core` and
`@opentelemetry/sdk-trace-base` from `^2.12.0` to `^2.12.1`. It raises
`@opentelemetry/exporter-trace-otlp-proto` from `^0.223.0` to
`^0.223.1`.
- `.changeset/otel-resources-sec-323.md` contains the patch changesets
for these four packages. It states the minimum raised versions. It says
that older SDK or OTLP exporter versions can resolve to
`@opentelemetry/resources` 2.12.0, which GHSA-qrww-3xmv-qhgm affects. It
advises projects with direct OpenTelemetry dependencies to check for
`@opentelemetry/resources` 2.12.1 or later on the 2.x line, or 3.1.1 or
later on the 3.x line.

### Root workspace

- `pnpm-workspace.yaml` adds two overrides:
- `@opentelemetry/resources` versions `>=2.0.0 <2.12.1` resolve to
`2.12.1`.
- `@opentelemetry/resources` versions `>=3.0.0 <3.1.1` resolve to
`3.1.1`.

### Example projects

- `examples/durable-agents/package.json` adds the same two version
constraints under `pnpm.overrides`. The existing `glob` override is
unchanged.
- `observability/_examples/otel-bridge/agent-hub/`:
- `package.json` changes `@opentelemetry/resources` from `2.10.0` to
`2.12.1`.
- `pnpm-workspace.yaml` adds the same two overrides, with a comment that
cites the advisory.
- `observability/_examples/otel-bridge/hono-multi/`:
- `instrumentation/package.json` changes `@opentelemetry/resources` from
`^2.0.1` to `^2.12.1`.
- `pnpm-workspace.yaml` adds the same two overrides, with a dated
security comment.

### Lockfiles

- The root `pnpm-lock.yaml` and the nested lockfiles for
`durable-agents`, `agent-hub`, and `hono-multi` change to match these
ranges and overrides.
- The author reports that `@opentelemetry/core` also moves to 2.12.1 and
3.1.1. The lockfile contents were not inspected for this summary.

## Validation

The author reports these results. This review did not rerun them. No
completed CI results were available for this review.

- `pnpm why @opentelemetry/resources -r` shows only `2.12.1` and
`3.1.1`.
- Nested lockfiles for `durable-agents`, `agent-hub`, and `hono-multi`
resolve only `2.12.1`.
- `pnpm turbo build` for the published packages and their dependencies
passed 19/19 tasks.
- Tests passed for `@mastra/arize` (27), `@mastra/laminar` (6),
`@mastra/otel-exporter` (187), and `@mastra/otel-bridge` (52).

## Scope notes

- The author reports that the `fastify` (SEC-262), `@opentelemetry/core`
(SEC-243), and `follow-redirects` (SEC-252) advisories were already
resolved on `main`. This change does not address them.
- The `hono` project and `templates/template-mongodb-bedrock-agent` are
out of scope.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastra-platform[bot] <mastra-platform[bot]@users.noreply.github.com>
Co-authored-by: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
Co-authored-by: shreyas-mastra <shreyas@mastra.ai>
History 2026-11-16 18:33:08 -05:00
..
_examples/otel-bridge fix(deps): patch @opentelemetry/resources (GHSA-qrww-3xmv-qhgm) (#30580) 2026-11-16 18:33:08 -05:00
_test-utils refactor(lint): flatten lone if statements in else branches (#28431) 2026-10-26 18:44:48 +01:00
arize fix(deps): patch @opentelemetry/resources (GHSA-qrww-3xmv-qhgm) (#30580) 2026-11-16 18:33:08 -05:00
arthur fix(deps): patch @opentelemetry/resources (GHSA-qrww-3xmv-qhgm) (#30580) 2026-11-16 18:33:08 -05:00
braintrust chore: version packages (alpha) (#30261) 2026-11-13 19:58:20 -08:00
clickhouse-design Clickhouse vNext (#14696) 2026-04-01 17:38:47 +02:00
datadog chore: version packages (alpha) (#30261) 2026-11-13 19:58:20 -08:00
deepeval chore: version packages (alpha) (#30261) 2026-11-13 19:58:20 -08:00
laminar fix(deps): patch @opentelemetry/resources (GHSA-qrww-3xmv-qhgm) (#30580) 2026-11-16 18:33:08 -05:00
langfuse chore: version packages (alpha) (#30261) 2026-11-13 19:58:20 -08:00
langsmith chore: version packages (alpha) (#30261) 2026-11-13 19:58:20 -08:00
mastra chore: version packages (alpha) (#30261) 2026-11-13 19:58:20 -08:00
otel-bridge chore: version packages (alpha) (#30261) 2026-11-13 19:58:20 -08:00
otel-exporter fix(deps): patch @opentelemetry/resources (GHSA-qrww-3xmv-qhgm) (#30580) 2026-11-16 18:33:08 -05:00
posthog chore: version packages (alpha) (#30261) 2026-11-13 19:58:20 -08:00
sentry chore: version packages (alpha) (#30261) 2026-11-13 19:58:20 -08:00