Skip to content

fix: bump vulnerable transitive dependencies - #13841

Merged
gkartalis merged 2 commits into
mainfrom
gkartalis/PHIRE-3321-pt3
Jul 29, 2026
Merged

gkartalis merged 2 commits into
mainfrom
gkartalis/PHIRE-3321-pt3

Conversation

@gkartalis

@gkartalis gkartalis commented Jul 28, 2026 •

Copy link
Copy Markdown
Member

This PR resolves PHIRE-3321

Description

Follow-up to #13838 and #13840. Addresses the remaining open high-severity Dependabot alerts across yarn.lock and bin/yarn.lock (the eas-cli tooling workspace).

Dependency Bump Method Alerts closed
postcss 8.4.x→8.5.23 resolutions #440, #443
fast-xml-parser 5.3.7→5.5.6 resolutions #301
js-yaml 4.1.0→4.3.0 yarn up #419
ws 6.2.4→6.2.6, 7.5.10→7.5.13, 8.20.1→8.21.1 yarn up #393, #394
picomatch (root, bin) 4.0.3/4.0.4→4.0.5 yarn up #312, #313
node-forge (bin) 1.3.1→1.4.0 yarn up #222, #317, #318, #319
express 4.21.2→4.22.2, 5.1.0→5.2.1 yarn up (unblocks path-to-regexp below) —
path-to-regexp 0.1.12→0.1.13, 8.3.0→8.4.2 yarn up (via express bump) #329, #331
react-use 17.6.0→17.6.1 yarn up (unblocks js-cookie below) —
js-cookie 2.2.1→3.0.8 yarn up (via react-use bump) #374
sharp 0.34.5→0.35.0 resolutions #438
tmp 0.1.0→0.2.7 resolutions #377
brace-expansion already 5.0.8 / 2.1.2 on disk from a prior PR none needed, included for tracking #442, #445

Where a dependency's requester pins a narrower range that excludes the patched version, a resolutions override was added (following the existing shell-quote pattern), with a comment explaining why and what to remove it once fixed upstream:

  • postcss — expo (via @expo/metro-config@55.0.21) exact-pins postcss@~8.4.32, and styled-components@6.1.19 exact-pins postcss@8.4.49; neither is patched.
  • fast-xml-parser — bumped past the version pinned by an existing resolution to additionally close a second, newer advisory on the same package.
  • sharp — react-native-bootsplash@7.1.0 exact-caret-pins sharp@^0.34.5 (excludes 0.35.0). We're intentionally not bumping react-native-bootsplash itself in this PR — that would require 7.3.2+, a native-touching config-plugin bump worth its own testing pass — remove this resolution once that bump happens.
  • tmp — @artsy/update-repo@0.8.2 (latest available) exact-pins tmp@^0.1.0, and no patched release exists on that line (patched is 0.2.6+). Remove once @artsy/update-repo bumps its tmp dependency upstream.

Known follow-up (not fixed here)

  • parse-git-config (#190, GHSA-8g77-54rh-46hx) has no patched release at all. It's pulled in by danger@11.2.3 (our Dangerfile CI tool). The only fix path is a major bump to danger@13.0.10, which drops the dependency entirely — deferred to a separate PR since it needs its own compatibility pass against dangerfile.ts and CI.

All 19 scanned high-severity alerts have been assigned to me for tracking.

PR Checklist

  • I have tested my changes on the following platforms:
    • Android.
    • iOS.
  • I hid my changes behind a [feature flag], or they don't need one.
  • I have included screenshots or videos at least on Android, or I have not changed the UI.
  • I have added tests, or my changes don't require any.
  • I added an [app state migration], or my changes do not require one.
  • I have documented any follow-up work that this PR will require, or it does not require any.
  • I have added a changelog entry below, or my changes do not require one.

To the reviewers 👀

  • I would like at least one of the reviewers to run this PR on the simulator or device.

#nochangelog

🤖 Generated with Claude Code

…-cookie, path-to-regexp, ws, and more)

Follow-up to #13838 and #13840. Addresses the remaining open high-severity
Dependabot alerts across yarn.lock, bin/yarn.lock, and Gemfile.lock.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.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 JavaScript and Ruby lockfiles (and adds/adjusts Yarn resolutions) to remediate high-severity Dependabot alerts across Eigen’s main workspace and the bin/ (eas-cli tooling) workspace.

Changes:

  • Bump multiple vulnerable transitive JS dependencies in yarn.lock via a mix of yarn up and resolutions (e.g. postcss, fast-xml-parser, sharp, tmp, ws, path-to-regexp, js-yaml).
  • Add/expand dependenciesComments and resolutions entries in package.json to document and enforce overrides that upstream packages currently prevent.
  • Update Ruby locked gems in Gemfile.lock (concurrent-ruby, faraday, jwt).
  • Partially bump bin/ workspace dependencies in bin/yarn.lock (e.g. picomatch, node-forge descriptors).

Reviewed changes

Copilot reviewed 1 out of 4 changed files in this pull request and generated no comments.

File Description
yarn.lock Updates resolved JS dependency graph to patched versions; introduces new/updated transitive entries consistent with added resolutions.
package.json Adds documented resolutions (postcss/fast-xml-parser/sharp/tmp) and bumps react-use range to allow patched transitive deps.
Gemfile.lock Bumps a small set of Ruby gems to patched versions.
bin/yarn.lock Updates bin/ workspace lock entries for tooling dependencies (notably adds a node-forge@1.4.0 descriptor, but retains 1.3.1).

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

Comment thread bin/yarn.lock
Comment thread Gemfile.lock Outdated
Comment thread package.json
Comment thread package.json
These will be handled separately from the JS-focused dependency bump PR.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions github-actions Bot deleted a comment from claude Bot Jul 29, 2026
@artsyit

artsyit commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator
Warnings
⚠️

✅ No changelog changes

Generated by 🚫 dangerJS against d04d9e3

Comment thread bin/yarn.lock
linkType: hard

"node-forge@npm:1.3.1, node-forge@npm:^1.2.1, node-forge@npm:^1.3.1":
"node-forge@npm:1.3.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.

node-forge@npm:1.3.1 is still resolved to 1.3.1 here — the yarn up only moved the ^1.2.1 / ^1.3.1 ranges. The exact 1.3.1 descriptor comes from eas-cli@16.9.0 (bin/yarn.lock:1624, node-forge: "npm:1.3.1"), so the vulnerable copy stays in the tree and alerts #222/#317/#318/#319 won't close.

bin/package.json already has the pattern for exactly this case ("minimatch@npm:5.1.2": "5.1.8", "tar@npm:6.2.1": "7.5.22"). Add:

"node-forge@npm:1.3.1": "1.4.0"

plus a dependenciesComments entry to match the others.

Comment thread package.json
"react-relay": "18.2.0",
"react-tracking": "9.3.2",
"react-use": "17.6.0",
"react-use": "^17.6.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.

This caret is the only ranged version in the whole file — every other entry in dependencies and devDependencies is an exact pin. .yarnrc.yml doesn't set defaultSemverRangePrefix: "", so yarn up added the ^ on its own rather than by intent. Pin it to match everything else:

Suggested change
"react-use": "^17.6.1",
"react-use": "17.6.1",

@claude

claude Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Code Review

Summary

Closes the remaining open high-severity Dependabot alerts by bumping transitive deps in yarn.lock and bin/yarn.lock, using resolutions where a requester pins a range that excludes the patched version. Every new resolutions entry has a matching dependenciesComments entry explaining the pin and its exit condition, following the existing shell-quote / braces pattern — good.

Verified in the lock: picomatch 4.0.5, ws 6.2.6 / 7.5.13 / 8.21.1, js-yaml 4.3.0, path-to-regexp 0.1.13 / 8.4.2, postcss 8.5.23 and tmp 0.2.7 are the only remaining entries for those packages — no stale vulnerable copies left behind in the root lock. One exception, below.


Issues Found

🟡 bin/yarn.lock:3123 — node-forge 1.3.1 is still in the tree, so those four alerts will not close

"node-forge@npm:1.3.1":
  version: 1.3.1
  resolution: "node-forge@npm:1.3.1"

The yarn up split the entry and moved only the ^1.2.1 / ^1.3.1 ranges to 1.4.0. The exact 1.3.1 descriptor comes from eas-cli@16.9.0 (bin/yarn.lock:1624, node-forge: "npm:1.3.1"), so 1.3.1 stays installed and alerts 222, 317, 318, 319 stay open.

bin/package.json already handles this exact shape for other eas-cli exact pins ("minimatch@npm:5.1.2": "5.1.8", "tar@npm:6.2.1": "7.5.22"). Add "node-forge@npm:1.3.1": "1.4.0" and a matching comment.

🟡 package.json:217 — "react-use": "^17.6.1" is the only ranged version in the file

Every other entry across dependencies and devDependencies is exact-pinned, and .yarnrc.yml has no defaultSemverRangePrefix: "", so yarn up added the caret rather than anyone choosing it. Pin to 17.6.1.

The js-cookie 2→3 major riding along with this bump looks fine: every react-use import in src/ is a deep import of an individual hook — react-use/lib/usePrevious, useDebounce, useInterval, useThrottle, useTimeoutFn, useFirstMountState — and nothing imports useCookie.

🟡 package.json:360 — the tmp resolution pushes @artsy/update-repo from 0.1.0 to 0.2.7 on a CI path

tmp is already a direct devDependency at 0.2.7 on main, so the new unqualified resolution exists purely to move @artsy/update-repo@0.8.2 (tmp: "npm:^0.1.0") across the 0.1 → 0.2 line. That is a breaking line for a 0.x package, and part of what changed in 0.2.x is exactly the dir/template path validation that GHSA-ph9p-34f9-6g65 hardened.

@artsy/update-repo is used by scripts/update-metaphysics.js, wired up as yarn update-metaphysics in .circleci/config.yml:353 and gated on the deploy workflow at line 588. A break there will not show up in PR CI — it surfaces on a deploy. Worth exercising the script once, or checking how update-repo calls tmp.


Areas Reviewed

Security — the point of the PR. Scope checks out: express, ws, js-yaml, picomatch, path-to-regexp, body-parser and friends are all dev/build tooling (@rozenite/*, expo-atlas, expo-asset), not shipped app code, so nothing here changes the runtime attack surface.

sharp 0.34.5 → 0.35.0 — low blast radius. react-native-bootsplash@7.1.0 is the only requester, no bootsplash config plugin is registered in app.json's plugins array, and no package.json script or CI job invokes bootsplash generation. The forced 0.35.0 is only reachable through a manual asset regeneration, so whoever runs it next may hit an API change on the 0.34 → 0.35 boundary. Fine to land as-is.

Comment accuracy — spot-checked the dependenciesComments claims against the lock and they hold: styled-components@6.1.19 and ~8.4.32 are the two postcss requesters, react-native-bootsplash@7.1.0 requests sharp@^0.34.5, @artsy/update-repo@0.8.2 requests tmp@^0.1.0. The description's "brace-expansion already 5.0.8 / 2.1.2 on disk" also checks out.

Testing — nothing to add; dependency-only.


Questions for Author

  1. Did an actual iOS and Android build run against fast-xml-parser@5.5.6? The requesters are @react-native-community/cli-config-android@20.0.0 (yarn.lock:6710) and @react-native-community/cli-platform-apple@20.0.0 (yarn.lock:6785), both declaring ^4.4.1 and both force-resolved past a major. The v4→v5 force already existed on main, so that is not new — but 5.5.6 restructured the package (the lock picks up new fast-xml-builder@^1.1.4, xml-naming@^0.3.0, path-expression-matcher deps), and these CLI packages parse AndroidManifest.xml and iOS plists during builds. The checklist reason "dependency-only change, no platform-specific code" does not quite hold for this one dep — it sits directly on the native build tooling path. A green yarn ios / yarn android would settle it.

  2. "sharp": "0.35.0" — is 0.35.0 the patched release for GHSA-f88m-g3jw-g9cj? The comment mentions ^0.35.2 in the same breath (as bootsplash 7.3.2's range), which makes the boundary ambiguous on a read. If the patched floor is above 0.35.0, the resolution will not close the alert.

@gkartalis
gkartalis merged commit 6a55f81 into main Jul 29, 2026
12 checks passed
@gkartalis
gkartalis deleted the gkartalis/PHIRE-3321-pt3 branch July 29, 2026 12:37
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