Skip to content
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

Bump underscore.string to version 3.3.6 to fix ReDoS vulnerability #4750

Closed
wants to merge 1 commit into from

Conversation

manasvinibs
Copy link
Member

Description

Before applying this change -

yarn why underscore.string
yarn why v1.22.19
[1/4] Why do we have the module "underscore.string"...?
[2/4] Initialising dependency graph...
warning Resolution field "[email protected]" is incompatible with requested version "typescript@~4.5.2"
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "grunt#[email protected]"
info Reasons this module exists
   - "_project_#grunt#grunt-legacy-util" depends on it
   - Hoisted from "_project_#grunt#grunt-legacy-util#underscore.string"
   - in the nohoist list ["/_project_/**/@types/*","/_project_/**/@types/*/**","/_project_/**/grunt-*","/_project_/**/grunt-*/**","/_project_/@elastic/eui/rehype-react","/_project_/@elastic/eui/remark-rehype","/_project_/@elastic/eui/remark-rehype/**"]
info Disk size without dependencies: "444KB"
info Disk size with unique dependencies: "548KB"
info Disk size with transitive dependencies: "548KB"
info Number of shared dependencies: 2
Done in 0.82s.

With the current state in main, package manager is already installing underscore.string 3.3.6 version as its locked in the yarn.lock file. This change is explicitly locking the versions to 3.3.6 by resolving underscore.string in package.json.

Issues Resolved

#4734

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
    • yarn test:ftr
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

@codecov
Copy link

codecov bot commented Aug 16, 2023

Codecov Report

Merging #4750 (791850b) into main (ca70d5e) will decrease coverage by 0.01%.
Report is 1 commits behind head on main.
The diff coverage is n/a.

❗ Current head 791850b differs from pull request most recent head 46ee97d. Consider uploading reports for the commit 46ee97d to get more accurate results

@@            Coverage Diff             @@
##             main    #4750      +/-   ##
==========================================
- Coverage   66.14%   66.13%   -0.01%     
==========================================
  Files        3316     3316              
  Lines       63944    63944              
  Branches    10135    10135              
==========================================
- Hits        42294    42292       -2     
+ Misses      19248    19169      -79     
- Partials     2402     2483      +81     
Flag Coverage Δ
Linux_1 34.75% <ø> (ø)
Linux_2 55.10% <ø> (ø)
Linux_3 42.98% <ø> (ø)
Linux_4 35.05% <ø> (ø)
Windows_1 34.77% <ø> (ø)
Windows_2 55.07% <ø> (ø)
Windows_3 42.98% <ø> (-0.01%) ⬇️
Windows_4 35.05% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 20 files with indirect coverage changes

@ananzh
Copy link
Member

ananzh commented Aug 16, 2023

I agree with you @manasvinibs. Since underscore.string is already 3.3.6 in yarn lock, we don’t need to add another resolution. Maybe we should just resolve the issue with comments.

@manasvinibs
Copy link
Member Author

Closing this one as we already resolve to suggested version in lock file and don't need explicit dependency resolution in package json.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants