-
Notifications
You must be signed in to change notification settings - Fork 0
[Snyk] Security upgrade react-scripts from 3.4.0 to 5.0.0 #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-IP-12704893 - https://snyk.io/vuln/SNYK-JS-IP-12761655
|
⏳ Code review in progress. Analyzing for code quality issues and best practices. Detailed findings will be posted upon completion. Using Amazon Q Developer for GitHubAmazon Q Developer1 is an AI-powered assistant that integrates directly into your GitHub workflow, enhancing your development process with intelligent features for code development, review, and transformation. Slash Commands
FeaturesAgentic Chat Code Review CustomizationYou can create project-specific rules for Amazon Q Developer to follow:
Example rule: FeedbackTo provide feedback on Amazon Q Developer, create an issue in the Amazon Q Developer public repository. For more detailed information, visit the Amazon Q for GitHub documentation. Footnotes
|
|
Important Review skippedIgnore keyword(s) in the title. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. 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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Security Upgrade Review Summary
This PR addresses critical SSRF vulnerabilities by upgrading react-scripts from 3.4.0 to 5.0.0, which is an important security improvement. However, this upgrade introduces significant compatibility challenges that need to be addressed before merging.
Critical Issues to Address:
- Breaking Change: React Scripts 5.0.0 requires React 17+ but this project uses React 16.10.1, which will cause build failures
- Dependency Chain: Multiple dependencies (Material-UI v4, react-error-boundary v1.2.5) may be incompatible with newer React versions
- Runtime Requirements: Ensure Node.js 14+ is available in all environments
Recommended Approach:
Consider creating a comprehensive dependency upgrade plan that includes:
- Upgrading React and React DOM to v17 or v18
- Updating Material-UI to v5 (@mui/material)
- Upgrading react-error-boundary to v4+
- Testing thoroughly in a development environment before merging
While the security fixes are important, the current approach may break the application. A phased upgrade strategy would be safer than this isolated react-scripts update.
| "react-dom": "^16.10.1", | ||
| "react-error-boundary": "^1.2.5", | ||
| "react-scripts": "3.4.0" | ||
| "react-scripts": "5.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛑 Breaking Change Risk: This upgrade from react-scripts 3.4.0 to 5.0.0 spans multiple major versions and introduces significant breaking changes. React Scripts 5.0.0 requires React 17+ and Node.js 14+, but this project is still using React 16.10.1. This version mismatch will likely cause build failures and runtime issues1.
Footnotes
-
CWE-1104: Use of Unmaintained Third Party Components - https://cwe.mitre.org/data/definitions/1104.html ↩
| "react-dom": "^16.10.1", | ||
| "react-error-boundary": "^1.2.5", | ||
| "react-scripts": "3.4.0" | ||
| "react-scripts": "5.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current React version (16.10.1) is incompatible with react-scripts 5.0.0, which requires React 17+. This dependency mismatch will cause build failures. Consider upgrading React and React DOM to version 17 or 18 alongside this react-scripts upgrade to ensure compatibility.
| "react-dom": "^16.10.1", | ||
| "react-error-boundary": "^1.2.5", | ||
| "react-scripts": "3.4.0" | ||
| "react-scripts": "5.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Material-UI v4 components may have compatibility issues with newer React versions. If you upgrade React to support react-scripts 5.0.0, consider also upgrading to Material-UI v5 (now @mui/material) to avoid potential deprecation warnings and ensure long-term support.
| "react-dom": "^16.10.1", | ||
| "react-error-boundary": "^1.2.5", | ||
| "react-scripts": "3.4.0" | ||
| "react-scripts": "5.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
React Scripts 5.0.0 includes webpack 5 and may require Node.js 14+ to run properly. Verify that your development and deployment environments meet these minimum requirements before merging this upgrade.
| "react-dom": "^16.10.1", | ||
| "react-error-boundary": "^1.2.5", | ||
| "react-scripts": "3.4.0" | ||
| "react-scripts": "5.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The react-error-boundary version (1.2.5) is quite outdated and may not be compatible with newer React versions. Consider upgrading to react-error-boundary v4+ which provides better TypeScript support and React 18 compatibility.
Snyk has created this PR to fix 2 vulnerabilities in the npm dependencies of this project.
Snyk changed the following file(s):
demo/package.jsonVulnerabilities that will be fixed with an upgrade:
SNYK-JS-IP-12704893
SNYK-JS-IP-12761655
Important
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:
🦉 Server-side Request Forgery (SSRF)