Skip to content

[Snyk] Fix for 2 vulnerabilities#10382

Open
revan-zhang wants to merge 1 commit intoxfrom
snyk-fix-02d2655c932ef0bd146555aba818bccc
Open

[Snyk] Fix for 2 vulnerabilities#10382
revan-zhang wants to merge 1 commit intoxfrom
snyk-fix-02d2655c932ef0bd146555aba818bccc

Conversation

@revan-zhang
Copy link
Contributor

@revan-zhang revan-zhang commented Feb 27, 2026

snyk-top-banner

Snyk has created this PR to fix 2 vulnerabilities in the yarn dependencies of this project.

Snyk changed the following file(s):

  • package.json

Note for zero-installs users

If you are using the Yarn feature zero-installs that was introduced in Yarn V2, note that this PR does not update the .yarn/cache/ directory meaning this code cannot be pulled and immediately developed on as one would expect for a zero-install project - you will need to run yarn to update the contents of the ./yarn/cache directory.
If you are not using zero-install you can ignore this as your flow should likely be unchanged.

⚠️ Warning
Failed to update the yarn.lock, please update manually before merging.

Vulnerabilities that will be fixed with an upgrade:

Issue
high severity Regular Expression Denial of Service (ReDoS)
SNYK-JS-MINIMATCH-15353387
high severity Inefficient Algorithmic Complexity
SNYK-JS-MINIMATCH-15353389

Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • Max score is 1000. Note that the real score may have changed since the PR was raised.
  • This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic


Learn how to fix vulnerabilities with free interactive lessons:

🦉 Regular Expression Denial of Service (ReDoS)


Open with Devin

@revan-zhang
Copy link
Contributor Author

revan-zhang commented Feb 27, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedtailwindcss@​3.4.18961008798100
Addedws@​8.18.39910010088100

View full report

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 2 potential issues.

View 3 additional findings in Devin Review.

Open in Devin Review

"react-dom": "19.1.0",
"react-mobile-cropper": "^0.10.0",
"react-native": "0.81.5",
"react-native": "0.84.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

🔴 react-native upgrade to 0.84.0 is nullified by resolutions field still pinning 0.81.5

The dependencies field at line 175 changes react-native from 0.81.5 to 0.84.0, but the resolutions field at package.json:333 still pins react-native to 0.81.5. In Yarn workspaces, the resolutions field takes precedence over dependencies for version resolution across the entire workspace. This means the vulnerability fix is completely ineffectivereact-native will still resolve to 0.81.5 everywhere.

Root Cause and Full Impact

The Snyk bot only modified the dependencies section but failed to also update the resolutions section. The resolutions override at package.json:333 reads:

"react-native": "0.81.5"

This forces all react-native resolutions across the monorepo to 0.81.5, regardless of what dependencies declares.

Additionally, apps/mobile/package.json still pins react-native to 0.81.5, and the yarn.lock still resolves react-native to npm:0.81.5. The metro resolutions (package.json:336-344) are also pinned to 0.83.2 which is the version compatible with RN 0.81.x, not 0.84.x.

Impact: The stated purpose of this PR — fixing minimatch vulnerabilities by upgrading react-native — is not achieved. The vulnerable version 0.81.5 will continue to be installed. Furthermore, the inconsistency between dependencies (0.84.0) and resolutions (0.81.5) creates a confusing state where the declared dependency doesn't match what's actually installed.

Prompt for agents
To actually apply the react-native upgrade, you need to update multiple locations in addition to the dependencies field:

1. In package.json, update the resolutions field at line 333 from "react-native": "0.81.5" to "react-native": "0.84.0"
2. In apps/mobile/package.json, update "react-native" from "0.81.5" to "0.84.0"
3. In apps/mobile/package.json, update "@react-native/metro-config" from "0.81.5" to the version compatible with RN 0.84.0
4. Update the metro resolution pins (package.json lines 336-344) to versions compatible with RN 0.84.0
5. Run yarn install to regenerate yarn.lock
6. Verify all react-native-* peer dependencies are compatible with 0.84.0 (react-native-reanimated, react-native-screens, react-native-web, etc.)

Note: This is a major React Native version bump (0.81 -> 0.84) that will likely require significant testing and possibly code changes across the mobile app. Consider whether this upgrade is the right approach to fix the minimatch vulnerability, or if a more targeted fix is possible.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines 172 to +175
"react-beautiful-dnd": "13.1.1",
"react-dom": "19.1.0",
"react-mobile-cropper": "^0.10.0",
"react-native": "0.81.5",
"react-native": "0.84.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

🔴 yarn.lock not updated — dependency versions in lockfile don't match package.json

The yarn.lock file was not updated to reflect the dependency changes in package.json. The lockfile still resolves node-gyp to 11.5.0 (under the ^11.5.0 range) and react-native to 0.81.5. Since the lockfile has no entry for node-gyp@^12.0.0 or react-native@0.84.0, running yarn install will either fail or produce inconsistent results.

Detailed Explanation

The PR description itself warns: "Failed to update the yarn.lock, please update manually before merging." The current state of the lockfile shows:

  • node-gyp resolves ^11.2.0, ^11.5.0 to 11.5.0 — there is no resolution for ^12.0.0
  • react-native resolves to npm:0.81.5 — there is no resolution for 0.84.0

Merging this PR without updating yarn.lock means:

  • CI/CD pipelines that run yarn install --immutable (frozen lockfile) will fail immediately
  • Developers pulling this branch will get errors or stale dependency versions
  • The vulnerability fixes are not actually installed

Impact: Build failures in CI and broken developer workflow. The security vulnerabilities remain unpatched.

(Refers to lines 165-175)

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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