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

[Security] Bump all babel dependencies from 7.16.x to 7.22.9 #5428

Merged

Conversation

joshuarrrr
Copy link
Member

@joshuarrrr joshuarrrr commented Nov 3, 2023

Description

Also update proposal plugins to their transform equivalents

Resolves CVE-2023-45133

Issues Resolved

Although #5303 is marked closed by mend, it's preferable to also update the deps upstream of the resolution in #5309.

Screenshot

Testing the changes

I verified that all unit tests pass, and I also built all distributions via yarn build --skip-os-packages. But I'd love to here from other maintainers what else we should do to validate these changes. Try diff-ing all the artifacts, maybe?

Check List

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

Comment on lines 36 to 37
// Optional Chaining proposal is stage 4 (https://github.com/tc39/proposal-optional-chaining)
// Need this since we are using TypeScript 3.7+
Copy link
Member Author

Choose a reason for hiding this comment

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

These proposal comments now all seem outdated (particularly because they reference previous version of TypeScript). But I'm not sure I know enough about the relationship between ES proposals, Typescript, and Babel to know how to investigate whether we still need these plugins at all or to update the comments to explain why we still need them. Any help is appreciated!

Copy link

codecov bot commented Nov 3, 2023

Codecov Report

Merging #5428 (61c31aa) into main (088fc66) will increase coverage by 7.89%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #5428      +/-   ##
==========================================
+ Coverage   59.07%   66.96%   +7.89%     
==========================================
  Files        2981     3291     +310     
  Lines       56492    63243    +6751     
  Branches     8714    10055    +1341     
==========================================
+ Hits        33372    42351    +8979     
+ Misses      21362    18431    -2931     
- Partials     1758     2461     +703     
Flag Coverage Δ
Linux_1 35.24% <ø> (-0.01%) ⬇️
Linux_2 55.15% <ø> (?)
Linux_3 43.81% <ø> (?)
Linux_4 35.34% <ø> (+<0.01%) ⬆️
Windows_1 35.26% <ø> (?)
Windows_2 55.12% <ø> (-0.13%) ⬇️
Windows_3 43.82% <ø> (?)
Windows_4 35.34% <ø> (+<0.01%) ⬆️

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

Files Coverage Δ
packages/osd-babel-preset/common_preset.js 100.00% <ø> (ø)

... and 785 files with indirect coverage changes

ZilongX
ZilongX previously approved these changes Nov 7, 2023
manasvinibs
manasvinibs previously approved these changes Nov 8, 2023
ananzh
ananzh previously approved these changes Nov 8, 2023
Update proposal plugins to their transform equivalents

Resolves CVE-2023-45133

Signed-off-by: Josh Romero <rmerqg@amazon.com>
Signed-off-by: Josh Romero <rmerqg@amazon.com>
@AMoo-Miki AMoo-Miki dismissed stale reviews from ananzh, manasvinibs, and ZilongX via 61c31aa November 9, 2023 18:00
@AMoo-Miki AMoo-Miki force-pushed the security/update-babel-deps-7.22.9 branch from e9c8134 to 61c31aa Compare November 9, 2023 18:00
ananzh pushed a commit to ananzh/OpenSearch-Dashboards that referenced this pull request Nov 13, 2023
…opensearch-project#5428)

* chore: Bump all babel dependencies from `7.16.x` to `7.22.9`

Update proposal plugins to their transform equivalents

Resolves CVE-2023-45133

Backport PR
opensearch-project#5428

---------

Signed-off-by: Josh Romero <rmerqg@amazon.com>
ananzh pushed a commit to ananzh/OpenSearch-Dashboards that referenced this pull request Nov 13, 2023
…opensearch-project#5428)

* chore: Bump all babel dependencies from `7.16.x` to `7.22.9`

Update proposal plugins to their transform equivalents

Resolves CVE-2023-45133

Backport PR
opensearch-project#5428

---------

Signed-off-by: Josh Romero <rmerqg@amazon.com>
ananzh pushed a commit to ananzh/OpenSearch-Dashboards that referenced this pull request Nov 14, 2023
…opensearch-project#5428)

* chore: Bump all babel dependencies from `7.16.x` to `7.22.9`

Update proposal plugins to their transform equivalents

Resolves CVE-2023-45133

Backport PR
opensearch-project#5428

---------

Signed-off-by: Josh Romero <rmerqg@amazon.com>
ananzh pushed a commit to ananzh/OpenSearch-Dashboards that referenced this pull request Nov 15, 2023
opensearch-project#5428)

* chore: Bump all babel dependencies from `7.16.x` to `7.22.9`

Update proposal plugins to their transform equivalents

Resolves CVE-2023-45133

Backport PR
opensearch-project#5428

---------

Signed-off-by: Josh Romero <rmerqg@amazon.com>
AMoo-Miki pushed a commit to ananzh/OpenSearch-Dashboards that referenced this pull request Nov 16, 2023
opensearch-project#5428)

* chore: Bump all babel dependencies from `7.16.x` to `7.22.9`

Update proposal plugins to their transform equivalents

Resolves CVE-2023-45133

Backport PR
opensearch-project#5428

---------

Signed-off-by: Josh Romero <rmerqg@amazon.com>
Signed-off-by: Miki <miki@amazon.com>
AMoo-Miki pushed a commit to ananzh/OpenSearch-Dashboards that referenced this pull request Nov 16, 2023
opensearch-project#5428)

* chore: Bump all babel dependencies from `7.16.x` to `7.22.9`

Update proposal plugins to their transform equivalents

Resolves CVE-2023-45133

Backport PR
opensearch-project#5428

---------

Signed-off-by: Josh Romero <rmerqg@amazon.com>
Signed-off-by: Miki <miki@amazon.com>
@ananzh ananzh added v2.11.1 Issues targeting release v2.11.1 v2.12.0 and removed v2.12.0 v2.11.1 Issues targeting release v2.11.1 labels Nov 16, 2023
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this pull request Nov 16, 2023
Signed-off-by: ananzh <ananzh@amazon.com>
ananzh added a commit that referenced this pull request Nov 16, 2023
Signed-off-by: ananzh <ananzh@amazon.com>
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this pull request Nov 17, 2023
… to conflicts

Backport PR
opensearch-project#5491

Signed-off-by: ananzh <ananzh@amazon.com>
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this pull request Nov 17, 2023
…e to conflicts

Backport PR
opensearch-project#5491

Signed-off-by: ananzh <ananzh@amazon.com>
AMoo-Miki pushed a commit that referenced this pull request Nov 17, 2023
)

Backport PR
#5491

Signed-off-by: ananzh <ananzh@amazon.com>
AMoo-Miki pushed a commit that referenced this pull request Nov 17, 2023
Backport PR
#5491

Signed-off-by: ananzh <ananzh@amazon.com>
@joshuarrrr joshuarrrr removed the v1.3.14 label Dec 6, 2023
@joshuarrrr
Copy link
Member Author

skipping backport to 1.3

@aggarwalShivani
Copy link

Hi @joshuarrrr
I have a query on this merged PR - as per CVE-2023-45133, the fixed version of babel is >=7.23.2.
Why are the babel dependencies then updated to 7.22.9? Isn't this an affected version?

@AMoo-Miki
Copy link
Collaborator

@aggarwalShivani , the vulnerability is in @babel/traverse which was bumped to 7.23.2:
https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5428/files#diff-51e4f558fae534656963876761c95b83b6ef5da5103c4adef6768219ed76c2deR1363

The others are not vulnerable on their own.

@AMoo-Miki
Copy link
Collaborator

Manually backported with #5464

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x cve Security vulnerabilities detected by Dependabot or Mend distinguished-contributor v2.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants