Skip to content

fix(deps): bump fast-uri override; dismiss stream-json alert as not-used - #98

Merged
acamarata merged 3 commits into
mainfrom
p6/deps-stream-json
Sep 4, 2026
Merged

acamarata merged 3 commits into
mainfrom
p6/deps-stream-json

Conversation

@acamarata

@acamarata acamarata commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Why stream-json is dismissed, not bumped

An earlier commit on this branch added "stream-json": ">=3.5.0", which broke the Next.js webpack build (Multi-Arch Check failed on both amd64 and arm64: Module not found: Can't resolve 'stream-json/jsonl/Parser.js'). Root cause:

  • minio@8.0.7 (latest; no newer release exists) declares stream-json: ^1.8.0 and imports only stream-json/jsonl/Parser.js (S3 event-notification JSONL parsing).
  • Every version that fixes GHSA-528h-pc64-c93x (>=3.5.0) is also a full ESM rewrite: files moved under src/, package.json gained "type": "module" and a restrictive exports map ("./*": "./src/*"). stream-json/jsonl/Parser.js no longer resolves under any fixed version.
  • The vulnerability itself (O(depth^2) DoS in the pick/ignore/filter/replace path filters, filter-base.js) lives in code minio never imports — confirmed by grepping minio's dist/esm/*.mjs for every stream-json import; only the unrelated JSONL parser is used.

Reverted the override; stream-json now resolves to 1.9.1 via minio's own declared range (same as main). Dismissed alert #175 via gh api (reason: not_used) with a comment linking this reasoning and PR.

Resolved versions

Package Alert(s) Before Action Resolved
fast-uri #169-172 (high) 4.1.2 override bumped >=3.1.2 -> >=4.1.3 4.1.4
stream-json #175 (medium) 3.4.0 override reverted; alert dismissed (not_used) 1.9.1 (unchanged, matches main)

Test plan

  • pnpm install --no-frozen-lockfile (under heavy-lock, x3 across the branch's history) — final state resolves fast-uri@4.1.4, stream-json@1.9.1
  • pnpm install --frozen-lockfile — exit 0
  • pnpm run build (the exact command Multi-Arch Check runs inside Docker) — passes locally, confirming the fix; previously failed with the stream-json override in place
  • pnpm audit --prod — timed out (npm advisory endpoint outage, unrelated); resolved versions verified directly in pnpm-lock.yaml instead
  • pnpm why stream-json confirms only minio -> stream-json, no direct usage in src/

Ticket: P6 DEPS-ADVISORIES unit (nself PPI phase P6)

Adds a pnpm.overrides entry for stream-json (transitive dep of minio,
resolved 3.4.0 -> 3.6.0) to clear the open medium Dependabot alert #175.
No source code touches stream-json directly; frozen-lockfile install
verified clean.
Existing override floor >=3.1.2 still admitted the vulnerable 4.x range
(resolved 4.1.2), leaving alerts #169-172 open (all high). Bump to
>=4.1.3; resolved 4.1.4. frozen-lockfile install verified clean.
@acamarata acamarata changed the title fix(deps): bump stream-json override to >=3.5.0 fix(deps): bump stream-json and fast-uri overrides Sep 4, 2026
The stream-json >=3.5.0 override broke the Next.js webpack build:
minio@8.0.7 declares stream-json ^1.8.0 and imports only
stream-json/jsonl/Parser.js. Every version that fixes
GHSA-528h-pc64-c93x (>=3.5.0) is also a full ESM rewrite (files moved
under src/, exports map added) that no longer exposes that path,
producing 'Module not found: stream-json/jsonl/Parser.js' during
'next build --webpack' (Multi-Arch Check job, both amd64 and arm64).

The vulnerable code (pick/ignore/filter/replace path filters in
filter-base.js, an O(depth^2) DoS) is never invoked by minio's
notification listener, which only uses the unrelated JSONL parser --
confirmed by grepping minio's dist/esm for every stream-json import.
No newer minio release exists (8.0.7 is latest).

Reverted the override; stream-json now resolves to 1.9.1 via minio's
own declared range, matching main. Dismissed Dependabot alert #175
via gh api with reason not_used and a comment explaining the
unreachable code path. Verified 'pnpm run build' passes locally
(previously failed with the override in place).
@acamarata acamarata changed the title fix(deps): bump stream-json and fast-uri overrides fix(deps): bump fast-uri override; dismiss stream-json alert as not-used Sep 4, 2026
@acamarata
acamarata merged commit 9835e63 into main Sep 4, 2026
34 checks passed
@acamarata
acamarata deleted the p6/deps-stream-json branch September 4, 2026 05:48
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