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

chore: Bump cryptography #24657

Merged
merged 8 commits into from Aug 3, 2023
Merged

chore: Bump cryptography #24657

merged 8 commits into from Aug 3, 2023

Conversation

suryadev99
Copy link
Contributor

Fixing security vulnerability: updating cryptography package to fix vulnerability

SUMMARY

Updating cryptography package to 41.0.0

image

TESTING INSTRUCTIONS

just changing the package versions

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

updating cryptography package to fix vulnerability
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Congrats on making your first PR and thank you for contributing to Superset! 🎉 ❤️

We hope to see you in our Slack community too! Not signed up? Use our Slack App to self-register.

@mdeshmu
Copy link
Contributor

mdeshmu commented Jul 11, 2023

You have to update the cryptography version in setup.py and then use the following commands to update all other requirement files.

pip install -r requirements/integration.txt
pip-compile-multi --no-upgrade

updating cryptography in setup.py
@suryadev99
Copy link
Contributor Author

yeah sorry forget to change it in setup.py. have done that now

@eschutho
Copy link
Member

I'm not sure if you've run the application with this version of Cryptography, but we've found that it has some prohibitive performance issues. @betodealmeida do you have any suggestions here about how we can keep this versioning flexible so that people can continue to use the current version if they choose?

Copy link
Member

@betodealmeida betodealmeida left a comment

Choose a reason for hiding this comment

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

Safety first!

setup.py Outdated
@@ -78,7 +78,7 @@ def get_git_sha() -> str:
"colorama",
"croniter>=0.3.28",
"cron-descriptor",
"cryptography>=39.0.1, <40",
"cryptography>=41.0.0",
Copy link
Member

Choose a reason for hiding this comment

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

Can you put up a warning in the UPDATING.md file about this, since there are some backwards incompatible changes from 39.x to 41.x?

Copy link
Member

@eschutho eschutho Jul 12, 2023

Choose a reason for hiding this comment

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

@betodealmeida good catch! I saw the Python 3.6 version which shouldn't affect Superset since we're already running on a minimum of 3.9, but do you think that the versions for OpenSSL and LibreSSL could be an issue? I'm wondering if this change would be considered a potential breaking change for Superset, and if so, if we need to think about cherrying it into 3.0 or wait until 4.0. I checked my local for example, and it seems likely that we could be running LibreSSL < 3.6

Copy link
Member

Choose a reason for hiding this comment

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

@betodealmeida
Copy link
Member

I'm not sure if you've run the application with this version of Cryptography, but we've found that it has some prohibitive performance issues. @betodealmeida do you have any suggestions here about how we can keep this versioning flexible so that people can continue to use the current version if they choose?

The big performance hit was from 36.x to 37.x, reading the changelog there seems to be no problem with going from 39.x to 41.x, other than they way it gets compiled.

@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Merging #24657 (424dbd1) into master (ea17dd6) will increase coverage by 1.86%.
Report is 1 commits behind head on master.
The diff coverage is n/a.

❗ Current head 424dbd1 differs from pull request most recent head ce23794. Consider uploading reports for the commit ce23794 to get more accurate results

@@            Coverage Diff             @@
##           master   #24657      +/-   ##
==========================================
+ Coverage   67.14%   69.00%   +1.86%     
==========================================
  Files        1904     1904              
  Lines       74106    74106              
  Branches     8194     8194              
==========================================
+ Hits        49755    51140    +1385     
+ Misses      22232    20847    -1385     
  Partials     2119     2119              
Flag Coverage Δ
hive 54.13% <ø> (?)
mysql 79.22% <ø> (ø)
postgres 79.32% <ø> (ø)
presto 54.03% <ø> (?)
python 83.37% <ø> (+3.90%) ⬆️
sqlite 77.89% <ø> (ø)
unit 55.00% <ø> (?)

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

Files Changed Coverage Δ
...ins/legacy-preset-chart-nvd3/src/transformProps.js 7.40% <ø> (ø)

... and 101 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

setup.py Outdated
@@ -78,7 +78,7 @@ def get_git_sha() -> str:
"colorama",
"croniter>=0.3.28",
"cron-descriptor",
"cryptography>=39.0.1, <40",
"cryptography>=41.0.0",
Copy link
Member

Choose a reason for hiding this comment

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

@suryadev99 can we reintroduce the lower bound (which could be increased) otherwise one could install a version older than 39.0.1 and thus (in theory) could be exposed to the issue @betodealmeida mentioned in #24657 (comment).

@john-bodley john-bodley changed the title Update base.txt chore: Bump cryptography Jul 12, 2023
@rusackas
Copy link
Member

@suryadev99 are you able to address this?

Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

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

Blocking merging for the moment based on #24657 (comment)

There was also a less-blocking comment above about making an addition in UPGRADING.md that would be a nice addition.

Holler if we can help address these issues further.

@suryadev99 suryadev99 requested a review from rusackas July 29, 2023 06:03
@suryadev99
Copy link
Contributor Author

@rusackas I have made the changes, please do look into it

Copy link
Member

@john-bodley john-bodley left a comment

Choose a reason for hiding this comment

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

Thanks @suryadev99 for making the changes. There's a couple of minor formatting suggestions I recommended. Once accepted I'll go ahead and merge the PR.

UPDATING.md Outdated Show resolved Hide resolved
UPDATING.md Outdated Show resolved Hide resolved
suryadev99 and others added 2 commits August 1, 2023 16:47
Co-authored-by: John Bodley <4567245+john-bodley@users.noreply.github.com>
Co-authored-by: John Bodley <4567245+john-bodley@users.noreply.github.com>
@suryadev99
Copy link
Contributor Author

Hey @john-bodley I have incorporated the suggestions

@john-bodley
Copy link
Member

@rusackas would you mind stamping this as I believe your blocking request has been resolved.

Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

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

Thank you!!!

@john-bodley john-bodley merged commit cfadbeb into apache:master Aug 3, 2023
26 checks passed
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.1.0 labels Mar 8, 2024
Copy link

@Hanae1963 Hanae1963 left a comment

Choose a reason for hiding this comment

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

Y

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XS 🚢 3.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants