Thanks to visit codestin.com
Credit goes to github.com

Skip to content

chore(deps): update dependency cryptography to v45 #13375

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate-bot
Copy link
Contributor

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
cryptography (changelog) ==44.0.2 -> ==45.0.1 age adoption passing confidence

Release Notes

pyca/cryptography (cryptography)

v45.0.1

Compare Source

v45.0.0

Compare Source

v44.0.3

Compare Source


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Never, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate-bot renovate-bot requested review from a team as code owners May 17, 2025 19:19
@trusted-contributions-gcf trusted-contributions-gcf bot added kokoro:force-run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels May 17, 2025
@product-auto-label product-auto-label bot added samples Issues that are directly related to samples. api: cloudkms Issues related to the Cloud Key Management Service API. api: compute Issues related to the Compute Engine API. api: edgecache Issues related to the Media CDN API. api: iap Issues related to the Identity-Aware Proxy API. api: security-privateca Issues related to the Certificate Authority Service API. labels May 17, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Hello @renovate-bot, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

Summary of Changes

Hello team, gemini-code-assist here to provide a summary of this pull request. This PR, automatically generated by renovate-bot, focuses on a routine dependency update. The primary goal is to upgrade the cryptography Python package to its latest version, 45.0.1, from the previous version 44.0.2. This update is applied across several requirements.txt files within different sample directories to ensure they are using the most current and potentially more secure or performant version of the library.

Highlights

  • Dependency Update: The core change is the update of the cryptography Python dependency from version 44.0.2 to 45.0.1.
  • Affected Files: This dependency version bump is applied to the requirements.txt files located in the following directories: compute/encryption, iap, kms/attestations, kms/snippets, media_cdn, and privateca/snippets (specifically requirements-test.txt).

Changelog

Click here to see the changelog
  • compute/encryption/requirements.txt
    • Updated cryptography dependency from 44.0.2 to 45.0.1.
  • iap/requirements.txt
    • Updated cryptography dependency from 44.0.2 to 45.0.1.
  • kms/attestations/requirements.txt
    • Updated cryptography dependency from 44.0.2 to 45.0.1.
  • kms/snippets/requirements.txt
    • Updated cryptography dependency from 44.0.2 to 45.0.1.
  • media_cdn/requirements.txt
    • Updated cryptography dependency from 44.0.2 to 45.0.1.
  • privateca/snippets/requirements-test.txt
    • Updated cryptography dependency from 44.0.2 to 45.0.1.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


A package version, old and slow,
Renovate helps the numbers grow.
From forty-four to forty-five,
Keep dependencies alive.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 17, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request, generated by Mend Renovate, updates the cryptography dependency from version 44.0.2 to 45.0.1 across multiple requirements.txt files.

This is a beneficial update as cryptography v45.x includes:

  • Security hardening through stricter validation (these are the backward-incompatible changes noted below).
  • Bug fixes (e.g., in PEM-encoded EC private key loading, PKCS12 handling).
  • Support for new algorithms like AES-GCM-SIV and HKDF-Expand-Label.
  • Updated OpenSSL version (3.2.1) for pre-built wheels.

The primary consideration for this update is cryptography v45.0.0, which introduced several backward-incompatible changes and deprecations:

Backward-Incompatible Changes (v45.0.0):

  • Stricter validation for DSA key loading (load_pem_private_key, load_der_private_key) regarding q lengths.
  • Stricter validation in DHParameterNumbers.validate_private_key.
  • Stricter validation in DSAParameterNumbers.validate_private_key.
  • Stricter validation in DSAPublicNumbers.verify_signature.
  • EllipticCurvePrivateKey.exchange now errors if the peer public key is on a different curve.
  • utils.int_from_bytes and utils.int_to_bytes now require byteorder to be big or little.

Deprecations (v45.0.0):

  • encode_point and from_encoded_point on EllipticCurvePublicNumbers.
  • signer and verifier methods on CMAC.
  • update_into and finalize_into methods on Hash and HMAC.

A review of the Python files in this repository that utilize cryptography (either directly or via libraries like PyJWT and jwcrypto) suggests that the current codebase does not directly use the APIs affected by the backward-incompatible changes. The samples primarily use RSA and Ed25519, and the affected changes are mostly related to DSA, DH, and specific EC operations or utility functions not commonly exposed or used in these samples.

Therefore, the risk of this update breaking existing functionality appears low, but thorough CI testing is essential to confirm this. The benefits of the update, especially security hardening and bug fixes, are valuable.

Summary of Findings

  • Dependency Update with Backward-Incompatible Changes: The cryptography library is updated from v44.0.2 to v45.0.1. Version 45.0.0 (part of this update range) introduces several documented backward-incompatible changes, primarily focused on stricter validation for DSA and DH parameters, and specific Elliptic Curve operations. A review of the repository's Python code indicates that these specific changes are unlikely to directly impact the current usage patterns, making the direct risk to this codebase low. This was assessed as a low-severity concern for the current code, and per review settings, a specific code comment was not added for low-severity items. Maintainers should be aware of these changes and rely on comprehensive CI testing to ensure full compatibility. This update also brings beneficial security hardening, bug fixes, and deprecations of some older APIs.

Merge Readiness

This dependency update to cryptography v45.0.1 appears to be a positive change, bringing security enhancements and bug fixes. While there are backward-incompatible changes in this new version, they don't seem to directly affect the analyzed codebase.

It is recommended to ensure all continuous integration checks and tests pass successfully before merging. As an AI reviewer, I am not authorized to approve pull requests. Please ensure this change is reviewed and approved by a human maintainer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: cloudkms Issues related to the Cloud Key Management Service API. api: compute Issues related to the Compute Engine API. api: edgecache Issues related to the Media CDN API. api: iap Issues related to the Identity-Aware Proxy API. api: security-privateca Issues related to the Certificate Authority Service API. owlbot:run Add this label to trigger the Owlbot post processor. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants