Skip to content

[Snyk] Fix for 2 vulnerabilities#93719

Open
MelvinBot wants to merge 1 commit into
mainfrom
snyk-fix-a855c9d95b9fa67e9f811acf96a425a3
Open

[Snyk] Fix for 2 vulnerabilities#93719
MelvinBot wants to merge 1 commit into
mainfrom
snyk-fix-a855c9d95b9fa67e9f811acf96a425a3

Conversation

@MelvinBot

@MelvinBot MelvinBot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Explanation of Change

Fixed Issues

$
PROPOSAL:

Tests

  • Verify that no errors appear in the JS console

Offline tests

QA Steps

// TODO: These must be filled out, or the issue title must include "[No QA]."

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

@MelvinBot MelvinBot requested a review from a team as a code owner June 16, 2026 14:58
@melvin-bot melvin-bot Bot requested review from iwiznia and removed request for a team June 16, 2026 14:58
@melvin-bot

melvin-bot Bot commented Jun 16, 2026

Copy link
Copy Markdown

@iwiznia Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c993027e54

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread package.json
"react-is": "^18.3.1",
"react-map-gl": "^7.1.3",
"react-native": "0.83.1",
"react-native": "0.85.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Regenerate the lockfile for these upgrades

This bump changes the top-level dependency spec, but the commit does not update package-lock.json; it still records react-native as 0.83.1 at package-lock.json:102 (and jest/jest-cli as 29.7.0 at package-lock.json:261-263, plus webpack-bundle-analyzer as ^4.5.0 at package-lock.json:301). The repo's setup action installs with npm ci (.github/actions/composite/setupNode/action.yml:50-56), so clean CI/deploy installs no longer have a lockfile that matches package.json, and the patched versions this Snyk PR is supposed to apply are not committed; please regenerate and commit the lockfile with these dependency changes.

Useful? React with 👍 / 👎.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

Failing checks analysis

Every check on this PR fails for the same reason, and it isn't a real test/build regression: this Snyk PR edited package.json but never regenerated package-lock.json, so npm ci aborts during setup before any check can run:

npm error code EUSAGE
npm error `npm ci` can only install packages when your package.json and package-lock.json are in sync.
npm error Invalid: lock file's react-native@0.83.1 does not satisfy react-native@0.85.0
npm error Invalid: lock file's jest@29.7.0 does not satisfy jest@30.0.0
npm error Invalid: lock file's jest-cli@29.7.0 does not satisfy jest-cli@30.0.0
npm error Invalid: lock file's webpack-bundle-analyzer@4.10.2 does not satisfy webpack-bundle-analyzer@5.3.0

That's why typecheck, ESLint, Prettier, spellcheck, build, and all test jobs fail identically — none of them got past npm ci.

Why I'm not auto-pushing a lockfile regen

Running npm install to sync the lockfile would only trade the EUSAGE error for a cascade of build/test failures, because this is a coordinated major upgrade that was only half-applied:

  • react-native was bumped 0.83.1 → 0.85.0, but the matching toolchain was left behind:

    • @react-native/babel-preset: still 0.83.1
    • @react-native/metro-config: still 0.83.1

    These must move in lockstep with react-native, and the dozens of react-native-* native modules + the HybridApp / Mobile-Expensify submodule are all pinned against the 0.83 line.

  • jest / jest-cli 29.7.0 → 30.0.0 is a major (note jest-circus, jest-environment-jsdom were left at 29) — a major Jest bump on its own.

  • webpack-bundle-analyzer 4 → 5 is a major.

Recommendation

This Snyk auto-PR can't be safely made green by a mechanical fix. The react-native 0.85 bump in particular needs to be done as a deliberate, coordinated upgrade (toolchain packages, native modules, patches, and the Mobile-Expensify side all moving together), not bundled into a Snyk vulnerability PR. Best path is to close this PR and pursue the RN upgrade through the normal coordinated upgrade process, optionally splitting out the lower-risk bumps (e.g. webpack-bundle-analyzer) into their own PRs where the lockfile is regenerated.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

Following up on my previous analysis: I'm unable to push a fix here.

  • The only mechanical fix (regenerating package-lock.json so npm ci stops failing) requires running npm install, which is not available in my environment.
  • And even that wouldn't make this PR pass — the Snyk bump is a half-applied coordinated major upgrade: react-native was moved to 0.85.0 while @react-native/babel-preset and @react-native/metro-config stayed at 0.83.1, plus jest 29→30 and webpack-bundle-analyzer 4→5 majors. Syncing the lockfile would just swap the npm ci error for a cascade of build/typecheck/test breakage.

Recommendation stands: close this auto-PR and handle the react-native 0.85 upgrade as a deliberate, coordinated migration (toolchain + native modules + patches + Mobile-Expensify together). The lower-risk bumps (e.g. webpack-bundle-analyzer) can be split into their own PRs where a human regenerates the lockfile.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

I'm unable to push a fix for this one.

The mechanical fix is to regenerate package-lock.json (it's out of sync with the bumped package.json, which is why npm ci fails with EUSAGE before any check runs — see my earlier analysis). That requires running npm install, which is blocked in my execution environment, so I can't produce or commit the updated lockfile.

Even if I could, regenerating the lockfile alone wouldn't make this green: the bump is internally inconsistent — react-native was moved to 0.85.0 while its required toolchain stayed behind (@react-native/babel-preset and @react-native/metro-config are still 0.83.1), and jest 29→30 / webpack-bundle-analyzer 4→5 are majors.

Recommended: a human runs npm install locally to sync the lockfile, or — given this is a coordinated react-native major upgrade that shouldn't ride on a Snyk vulnerability PR — close this PR and pursue the RN upgrade through the normal coordinated-upgrade process.

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.

2 participants