Skip to content

fix(deps): raise stale pnpm override floors to current advisory patched versions - #2446

Open
dcccrypto wants to merge 1 commit into
playgroundfrom
fix/launch-brace-expansion-audit-floor
Open

fix(deps): raise stale pnpm override floors to current advisory patched versions#2446
dcccrypto wants to merge 1 commit into
playgroundfrom
fix/launch-brace-expansion-audit-floor

Conversation

@dcccrypto

Copy link
Copy Markdown
Owner

Problem

pnpm audit --audit-level=high is a blocking step in the Security Tests job. On current playground it fails hard:

56 vulnerabilities found
Severity: 5 low | 32 moderate | 17 high (1 ignored) | 2 critical

This is not visible on recent PRs only because that job is path-filtered and has been skipping — e.g. #2444 shows Security Tests skipping. The next PR that actually touches a filtered path will hit a wall.

The root cause is one coherent pattern rather than 13 unrelated findings: several override floors were written against older advisories and have since drifted below the patched version, so they no longer protect anything they claim to.

Override Declared floor Advisory now requires
axios >=1.15.2 >=1.18.0GHSA-gcfj-64vw-6mp9
undici >=7.24.0 >=7.28.0GHSA-vmh5-mc38-953g (+2 more)
vite >=7.3.2 >=8.0.16GHSA-fx2h-pf6j-xcff
brace-expansion >=5.0.5 >=5.0.7GHSA-3jxr-9vmj-r5cp

Plus three with no override at all: protobufjs (2 criticals + 5 highs), js-yaml, vitest (1 critical).

Fix

Raise the four stale floors, add the three missing ones, and upper-bound every range to its current major, following the fast-uri: '>=3.1.2 <4' convention already in this file.

Two findings worth calling out

1. Unbounded ranges are not safe here — I broke the test suite proving it.

My first attempt used a bare undici: '>=7.28.0'. That resolves to undici@8.8.0, whose module layout jsdom@28 cannot load. The entire app suite collapsed:

Serialized Error: { code: 'MODULE_NOT_FOUND', requireStack: [ .../jsdom/lib/jsdom/browser/resources/jsdom-dispatcher.js, ... ] }
Test Files  3 passed (3)      <-- only 3 of 259 files even ran
     Errors  256 errors

Bounding to >=7.28.0 <8 pins undici@7.28.0 and the suite runs normally. Every range in this change is bounded for the same reason.

2. An override alone could not move vite.

vite is not a declared dependency anywhere — it exists only as an auto-installed peer of @vitejs/plugin-react. pnpm wrote the new constraint into the lockfile's overrides: block and into the recorded peerDependencies, but kept resolving the locked peer at the vulnerable 8.0.5. pnpm update vite -r and a scoped '@vitejs/plugin-react>vite' override both failed to shift it.

Declaring vite explicitly in app/devDependencies is what actually moves it. Note the production build is next build — vite is only used by vitest for test transforms, so this is test-path only.

Verification

Resolved versions after the change — all inside their intended major:

undici 7.28.0   vite 8.1.5   vitest 4.1.10   axios 1.18.1
protobufjs 7.6.5   js-yaml 4.3.0   brace-expansion 5.0.7

Audit gate:

before after
pnpm audit --audit-level=high exit 15 low | 32 moderate | 17 high (1 ignored) | 2 critical exit 03 low | 7 moderate | 1 high (1 ignored)

Both criticals and all unignored highs are gone. The one remaining high is the pre-existing GHSA-3gc7-fjrx-p6mg already listed in pnpm.auditConfig.ignoreGhsas.

No test regression. I ran the app suite on clean origin/playground and on this branch, same machine, same command:

Test Files Tests
origin/playground (baseline) 28 failed | 230 passed | 1 skipped (259) 95 failed | 2591 passed | 16 skipped (2702)
this branch 28 failed | 230 passed | 1 skipped (259) 95 failed | 2591 passed | 16 skipped (2702)

Byte-identical. Those 95 failures are pre-existing on playground and are not touched by this change — worth their own investigation, but out of scope here.

Related

Same advisory, same class of problem, filed separately: dcccrypto/percolator-indexer#180 (indexer had no brace-expansion override at all and is red on every PR right now). percolator-keeper and percolator-api also resolve vulnerable brace-expansion but have no pnpm audit step in CI, so nothing is blocked there.

🤖 Generated with Claude Code

…ed versions

`pnpm audit --audit-level=high` is a blocking step in the Security Tests job.
Several override floors in pnpm.overrides were written against older advisories
and have since drifted *below* the patched version, so they no longer protect
anything:

  axios       >=1.15.2  ->  GHSA-gcfj-64vw-6mp9 needs >=1.18.0
  undici      >=7.24.0  ->  GHSA-vmh5-mc38-953g needs >=7.28.0
  vite        >=7.3.2   ->  GHSA-fx2h-pf6j-xcff needs >=8.0.16
  brace-expansion >=5.0.5 -> GHSA-3jxr-9vmj-r5cp needs >=5.0.7

and three packages had no override at all: protobufjs (2 criticals),
js-yaml, vitest.

Each range is upper-bounded to its current major, following the existing
`fast-uri: '>=3.1.2 <4'` convention. An unbounded `undici: '>=7.28.0'`
resolves to 8.x, which jsdom@28 cannot load — that breaks the whole app test
run with MODULE_NOT_FOUND on jsdom-dispatcher.

vite is declared explicitly in app/devDependencies because it is otherwise only
present as an auto-installed peer of @vitejs/plugin-react, and pnpm will not
re-resolve a locked peer from an override alone — it stayed pinned at the
vulnerable 8.0.5 until the dependency was made explicit.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 21, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
percolator-launch Ready Ready Preview, Comment Jul 21, 2026 2:39am
percolator-mainnet Ready Ready Preview, Comment Jul 21, 2026 2:39am
percolator-playground Ready Ready Preview, Comment Jul 21, 2026 2:39am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ddd35829-cc17-4226-814a-78393755c9a5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/launch-brace-expansion-audit-floor

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@dcccrypto

Copy link
Copy Markdown
Owner Author

Correction to my own PR description — I got the mechanism wrong.

I wrote that Security Tests is "path-filtered and has been skipping" and that "the next PR that actually touches a filtered path will hit a wall." That is not right, and it understates the problem.

It is not a path filter. The job is gated on detect-packages, which probes for packages/shared/package.json:

security-tests:
  if: needs.detect-packages.outputs.has_packages == 'true'

packages/ does not exist on playground or main — both contain only app/. So Security Tests is permanently skipped and will never run on this branch, no matter what a PR touches. Note it is skipping on this very PR — the gate this change fixes cannot validate the fix.

What this does not change: the vulnerabilities are real and present in the dependency tree app/ actually ships — 2 criticals in protobufjs and vitest reachable from @solana/wallet-adapter-trezor and the test path. Fixing them is worth doing whether or not CI ever checks. The measured before/after ( → ) and the zero-regression baseline comparison in the description both stand; I ran those locally, not in CI.

What it does change: merging this will not turn any check green, because the check does not run. Please review it as a dependency-hygiene fix, not as a CI unblock.

The wider problem — no tests of any kind run in CI on playground, and the ✅ Merge Gate passes anyway because skipped ≠ failed — is now written up with full evidence in #2447.

@dcccrypto

Copy link
Copy Markdown
Owner Author

Independent verification — not an approval (QA/Security own that). Safe at compile level; one sequencing gap worth knowing given the two major bumps.

What I verified

This PR's own CI is green on the bumps: Build & Fast Tests, Type Check, and ✅ Merge Gate all SUCCESS. Since the install uses pnpm install --frozen-lockfile, that also confirms the committed pnpm-lock.yaml resolves the new floors to real, installable versions. So axios, brace-expansion, undici, protobufjs, js-yaml — the minor/patch floor raises — are low-risk and clear their advisories.

The part that isn't fully exercised: vite >=8 and vitest >=4

Those two are major bumps (vite 7→8, vitest 3→4), and this PR's green CI does not actually run the app's vitest suite under them. The reason is timing:

Net: build + type-check prove the toolchain compiles under vitest 4, but "the suite still runs correctly under vitest 4" is unverified by this PR's own CI. A major vitest bump can change matcher behaviour, default pool/isolation, and mock semantics — exactly the surface my #2451#2456 test fixes touch.

Sequencing note (three PRs interact)

If #2446 lands before #2450, nothing runs the suite under vitest 4 until #2450 merges, and any vitest-4 behavioural break surfaces then, attributed to whichever PR merged last rather than to the bump. Cleanest order is #2450 first (so the suite runs and the count is visible), then #2446, then re-check the count didn't jump from a vitest-4 change rather than a real regression.

Not blocking — the advisory floors are correct and the compile-level check passes. Flagging because a major test-runner bump whose test run is deferred to a not-yet-merged PR is an easy way to misattribute a later failure.

(Disclosure: I authored #2450 and #2451#2456, so I have a stake in the sequencing — calling it out rather than staying quiet.)

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