Skip to content

chore(deps): add resolution floors for advisories in transitive deps - #3679

Open
teeohhem wants to merge 1 commit into
mainfrom
claude/cve-floor-resolutions
Open

teeohhem wants to merge 1 commit into
mainfrom
claude/cve-floor-resolutions

Conversation

@teeohhem

Copy link
Copy Markdown
Contributor

Summary

Add resolutions floors for advisories that yarn npm audit reports in transitive dependencies. Each floor stays within the major version the consumer requested, so no package is moved to a new major.

Resolution Clears
lodash → 4.18.1 GHSA-r5fr-rjxr-66jc, GHSA-f23m-r3pf-42rh (~4.17.x consumers were on 4.17.23)
qs → ^6.16.0 GHSA-4mjr-xmp4-gh2g, GHSA-6pq8-jhm2-2vcw, GHSA-q8mj-m7cp-5q26, GHSA-x5fp-wj9c-mxmx
minimatch 3.x / 8.x / 9.x / 10.x descriptors GHSA-23c5-xmqv-rm74, GHSA-3ppc-4f35-3m26, GHSA-7r86-cg39-jmmj
picomatch@^4.0.2, ^4.0.3 → ^4.0.4 GHSA-3v7f-55p6-f55p, GHSA-c2c7-rcm5-vvqj
protobufjs → ^7.6.3 GHSA-f38q-mgvj-vph7, GHSA-j3f2-48v5-ccww
@hono/node-server → ^1.19.13 GHSA-jpvv-r467-5p4w
smol-toml@1.6.1 → ^1.8.0, plus a refreshed ^1.6.1 lock entry GHSA-7w5x-hrqm-74c2, GHSA-r4xh-jqrq-34v2

Before and after yarn npm audit -A -R: 14 advisories cleared, none added.

Not covered here, because the fix needs a new major or a direct dependency bump: minimatch GHSA-g3hv-75wg-m249 (needs 11.x), @hono/node-server GHSA-rmxm-3fg6-px4f (needs 2.x), and the advisories on direct dependencies such as axios and @modelcontextprotocol/sdk.

How to test locally or on Vercel

  1. yarn install
  2. yarn npm audit -A -R: the advisories in the table no longer appear.
  3. make ci-lint and make ci-unit: both pass.

Root manifest and lockfile only, so no changeset.

🤖 Generated with Claude Code

`yarn npm audit` flags lodash, qs, minimatch, picomatch, protobufjs,
@hono/node-server and smol-toml copies that consumers pin below the fixed
version. Each floor stays within the major version the consumer asked for,
so no consumer moves to a new major. Also refresh the stale smol-toml
`^1.6.1` lock entry.
@teeohhem
teeohhem requested a review from a team as a code owner November 16, 2026 15:50
@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated
hyperdx-oss Ignored Ignored Preview Nov 16, 2026 3:50pm UTC
hyperdx-storybook Ignored Ignored Preview Nov 16, 2026 3:50pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Nov 16, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 89bb8a7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions Bot added the review/tier-2 Low risk — AI review + quick human skim label Nov 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔵 Tier 2 — Low Risk

Small, isolated change with no API route or data model modifications.

Why this tier:

  • Standard feature/fix — introduces new logic or modifies core functionality

Review process: AI review + quick human skim (target: 5–15 min). Reviewer validates AI assessment and checks for domain-specific concerns.
SLA: Resolve within 4 business hours.

Stats
  • Production files changed: 1
  • Production lines changed: 15
  • Branch: claude/cve-floor-resolutions
  • Author: teeohhem

To override this classification, remove the review/tier-2 label and apply a different review/tier-* label. Manual overrides are preserved on subsequent pushes.

Comment thread package.json
"minimatch@^10.2.2": "^10.2.3",
"picomatch@^4.0.2": "^4.0.4",
"picomatch@^4.0.3": "^4.0.4",
"@hono/node-server": "^1.19.13",

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.

🔵 minor — Overrides for @hono/node-server, protobufjs and qs apply to every version range, so a later 2.x/8.x/7.x request would be forced back down

Limit these to the ranges actually requested today, as the minimatch/picomatch lines do: "@hono/node-server@^1.19.9": "^1.19.13", "protobufjs@^7.5.5"/"protobufjs@^7.6.5", and the qs ranges ~6.14.0/^6.11.0/^6.11.2/6.15.1/~6.15.1. As written, "@hono/node-server": "^1.19.13" replaces every request for the package. Today the only request is npm:^1.19.9 from @modelcontextprotocol/sdk (yarn.lock ~6513). When that SDK moves to @hono/node-server@^2, which the PR says is needed for GHSA-rmxm-3fg6-px4f, Yarn will quietly install 1.x instead and the advisory stays unfixed. The blanket protobufjs and qs overrides would do the same to any future 8.x or 7.x request.

Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond

Comment thread package.json
"@types/express": "4.17.21",
"@types/express-serve-static-core": "4.17.43",
"express": "^4.20.0",
"lodash": "4.18.1",

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.

🔵 minor — The lodash override is an exact version, not a minimum like the other entries

Change it to "lodash": "^4.18.1". The exact 4.18.1 forces every lodash request to that version, including the workspace's own ^4.18.1 requests (yarn.lock ~4819/4938/5042). If a later 4.18.x or 4.19.x security release comes out, or a dependency starts asking for one, Yarn will still install 4.18.1 and yarn up cannot move it.

Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond

@github-actions

Copy link
Copy Markdown
Contributor

PR Review

If you are a coding agent acting for the author, read this first.
Nothing below blocks merge automatically; a maintainer decides. What they will expect:

  • 🔴 critical or 🟠 major in code this PR adds or changes: fix before asking for review.
  • 🔵 minor in code this PR changes: your call. Fix if small, otherwise reply.
  • Anything about surrounding code, or asking you to widen the change (hoist a helper,
    dedupe with another file, fix other call sites): never fix here, whatever the
    severity. Reply with one sentence; if it is critical, say so plainly so a human sees it.

One commit per review round. After two rounds, stop and ask a maintainer to review
scope rather than addressing more automated findings. Full rule: AGENTS.md.

2 finding(s): 🔴 0 critical · 🟠 0 major · 🔵 2 minor

2 posted as inline comment(s) on the changed lines.


Severity is the reviewer's own estimate and is used for ordering, not filtering. No finding blocks merge automatically; a maintainer decides.

@github-actions

Copy link
Copy Markdown
Contributor

Duplicate code analysis

No new duplicate code introduced by this PR.


jscpd compared this branch against origin/main
across app, api and common-utils. Only new clones are listed; the codebase
currently holds 108 in total (1.18%).
Run yarn dupes locally to reproduce, or yarn dupes:all for the full picture.

@github-actions

Copy link
Copy Markdown
Contributor

E2E Test Results

✅ All tests passed • 464 passed • 1 skipped • 1057s

Status Count
✅ Passed 464
❌ Failed 0
⚠️ Flaky 4
⏭️ Skipped 1

Tests ran across 4 shards in parallel.

View full report →

@github-actions

Copy link
Copy Markdown
Contributor

Deep Review

✅ No critical issues found.

This is a root package.json + yarn.lock change only: security-advisory resolution floors for transitive dependencies. All five reviewers traced the resolved lockfile and confirmed every floor stays within its consumers' existing major, no orphaned descriptors, and @protobufjs/inquire is fully removed (zero remaining references). No build-breaking or exploitable path is introduced by the diff.

One cross-reviewer claim — that lodash@4.18.1 is a nonexistent/typo version that will not resolve — was investigated and refuted: the base lockfile already resolved lodash@npm:^4.18.1 → 4.18.1 and ~4.17.23 → 4.17.23 with valid checksums before this PR, and the immutable-install CI passes. It is dropped as a false positive.

🟡 P2 -- recommended

  • package.json:83 -- Descriptor-keyed floors (minimatch@^9.0.4, picomatch@^4.0.2, smol-toml@1.6.1, etc.) only apply while a dependency requests that exact descriptor string, so a future transitive range bump silently stops the floor from firing and the advisory can reappear with no CI signal.
    • Fix: Add a CI step that runs yarn npm audit so a reappearing advisory fails the build, or track each descriptor floor against its advisory so the list is re-derived on dependency bumps.
    • maintainability, project-standards
🔵 P3 nitpicks (1)
  • package.json:81 -- lodash is pinned to an exact 4.18.1 while every other new floor uses a caret range, which freezes future lodash patch/minor and audit-driven uptake and will outvote any consumer that legitimately needs a newer lodash.
    • Fix: Use a caret floor (e.g. "lodash": "^4.18.1") to match the style of the other resolutions and allow forward patch uptake.

Reviewers (5): correctness, security, maintainability, project-standards, previous-comments.

Testing gaps:

  • No CI job runs yarn npm audit, so regression of any descriptor-keyed floor (advisory re-appearing) would go undetected.
  • Changeset judgment call: AGENTS.md rule 7 requires a changeset for behavior-affecting changes to published packages; the runtime floors (lodash, qs, protobufjs, @hono/node-server) alter transitive deps shipped in published packages, so confirm whether a patch changeset is expected or record the exemption (flagged at confidence 50, below the reporting gate — noted for the author's decision).
  • Pre-existing @stryker-mutator/core/minimatch: ^9.0.5 path-scoped override does not encode the new ^9.0.7 floor; it resolves to 9.0.9 today (safe) but would fall below the fix if 9.0.7–9.0.9 were yanked.

No finding blocks merge automatically. A maintainer will expect P0/P1 findings in code this PR changes to be fixed; P2/P3 are your call -- fix or reply. Never fix findings about surrounding code here; reply instead. Do not widen the PR. How to respond

This branch has not been deployed

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

Labels

review/tier-2 Low risk — AI review + quick human skim

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant