chore(deps): update dependency requests to v2.32.2 [security]#1457
chore(deps): update dependency requests to v2.32.2 [security]#1457renovate-bot wants to merge 1 commit intoGoogleCloudPlatform:v1from
Conversation
|
/gcbrun |
There was a problem hiding this comment.
Code Review
This pull request updates the requests library to version 2.32.2 across multiple Python sample projects to address security vulnerabilities. Feedback was provided suggesting the removal of the requests dependency in several projects where it appears to be unused or not utilized, which would help reduce the attack surface and maintain a minimal dependency footprint.
| @@ -1,3 +1,3 @@ | |||
| Flask==2.3.3 | |||
| requests==2.31.0 | |||
| requests==2.32.2 | |||
There was a problem hiding this comment.
While updating requests to version 2.32.2 is important for security (fixing CVE-2024-35195), this dependency appears to be unused in the current sample. It is not imported or used in app.py. If it is not required for the sample's functionality, consider removing it to reduce the project's dependency footprint and attack surface.
| @@ -1,4 +1,4 @@ | |||
| Django==4.2.10 | |||
| requests==2.31.0 | |||
| requests==2.32.2 | |||
There was a problem hiding this comment.
| @@ -1,3 +1,3 @@ | |||
| django==4.2.10 | |||
| requests==2.31.0 | |||
| requests==2.32.2 | |||
There was a problem hiding this comment.
This PR contains the following updates:
==2.31.0→==2.32.2GitHub Vulnerability Alerts
CVE-2024-35195
When using a
requests.Session, if the first request to a given origin is made withverify=False, TLS certificate verification may remain disabled for all subsequent requests to that origin, even ifverify=Trueis explicitly specified later.This occurs because the underlying connection is reused from the session's connection pool, causing the initial TLS verification setting to persist for the lifetime of the pooled connection. As a result, applications may unintentionally send requests without certificate verification, leading to potential man-in-the-middle attacks and compromised confidentiality or integrity.
This behavior affects versions of
requestsprior to 2.32.0.Release Notes
psf/requests (requests)
v2.32.2Compare Source
Deprecations
To provide a more stable migration for custom HTTPAdapters impacted
by the CVE changes in 2.32.0, we've renamed
_get_connectiontoa new public API,
get_connection_with_tls_context. Existing customHTTPAdapters will need to migrate their code to use this new API.
get_connectionis considered deprecated in all versions of Requests>=2.32.0.A minimal (2-line) example has been provided in the linked PR to ease
migration, but we strongly urge users to evaluate if their custom adapter
is subject to the same issue described in CVE-2024-35195. (#6710)
v2.32.1Compare Source
Bugfixes
v2.32.0Compare Source
Security
verify=Falseon the first request from aSession will cause subsequent requests to the same origin to also ignore
cert verification, regardless of the value of
verify.(GHSA-9wx4-h78v-vm56)
Improvements
verify=Truenow reuses a global SSLContext which should improverequest time variance between first and subsequent requests. It should
also minimize certificate load time on Windows systems when using a Python
version built with OpenSSL 3.x. (#6667)
(
chardetorcharset_normalizer) when repackaged or vendored.This enables
pipand other projects to minimize their vendoringsurface area. The
Response.text()andapparent_encodingAPIswill default to
utf-8if neither library is present. (#6702)Bugfixes
calculated in the request content-length. (#6589)
/(path separator) could leadurllib3 to unnecessarily reparse the request URI. (#6644)
Deprecations
Documentation
Packaging
The source files for the projects (formerly
requests) is now locatedin
src/requestsin the Requests sdist. (#6506)using
hatchling. This should not impact the average user, but extremely oldversions of packaging utilities may have issues with the new packaging format.
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.