fix: upgrade core-js to resolve SEC-2158 security vulnerability #673
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR resolves the SEC-2158 security vulnerability by upgrading the deprecated
core-js@3.20.3dependency to version^3.23.3or later.Background:
The vulnerability was identified by Socket.dev with the following details:
core-js@3.20.3core-js@<3.23.3is no longer maintained and not recommended for usage due to performance issues (up to 100x slowdown in V8 engine) and web compatibility issuesImplementation:
Since
core-js@3.20.3was a transitive dependency through@angular-devkit/build-angular@13.3.11, and upgrading Angular DevKit to a newer major version would require updating Angular itself (breaking change), I used npmoverridesto force a newercore-jsversion while maintaining full compatibility with the existing Angular 13 setup.Changes Made:
overridesfield to package.json to forcecore-jsversion to^3.23.3References
Testing
Verification Steps:
npm install- Dependencies install successfully with overridenpm ls core-js- Showscore-js@3.43.0 overriddeninstead of deprecated3.20.3npm run build:dev- Build completes successfullynpm test- All 108 tests passnpm audit- The specificcore-jsvulnerability is no longer reportedEnvironment:
Manual Testing:
The library builds and tests successfully with the new
core-jsversion. All existing functionality remains intact as this is purely a dependency security update with no code changes to the library itself.Checklist