Skip to content

Bump urllib3 to patched release in Python container requirements#38467

Open
arpitjain099 wants to merge 1 commit into
apache:masterfrom
arpitjain099:security/bump-urllib3-container-images
Open

Bump urllib3 to patched release in Python container requirements#38467
arpitjain099 wants to merge 1 commit into
apache:masterfrom
arpitjain099:security/bump-urllib3-container-images

Conversation

@arpitjain099
Copy link
Copy Markdown

Summary

  • Update pinned urllib3 versions from 2.6.3 to 2.7.0 in Python SDK container requirements for:
    • sdks/python/container/py310, py311, py313, py314
    • sdks/python/container/ml/py310, py311, py312, py313 (including GPU image requirements)

Why

Dependabot reports high-severity advisories for urllib3 < 2.7.0 across these container requirement manifests. This change keeps the updates narrowly scoped to the patched urllib3 version.

Validation

  • Verified all targeted requirement files now consistently pin urllib3==2.7.0.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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!

This pull request addresses a security vulnerability by bumping the urllib3 dependency to version 2.7.0 in the Python SDK container environment configurations. This ensures that all container images are built with a patched version of the library, mitigating known security risks identified by Dependabot.

Highlights

  • Security Update: Updated the pinned version of urllib3 from 2.6.3 to 2.7.0 across all Python SDK container requirement files to address high-severity security advisories.
  • Scope: The update covers various Python versions (3.10, 3.11, 3.12, 3.13, 3.14) for both base and ML/GPU container images.
New Features

🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the 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 may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

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.

Copy link
Copy Markdown
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 updates the urllib3 dependency version across various Python container requirement files. However, the reviewer identified that the specified version 2.7.0 (as well as the previous 2.6.3) does not exist on PyPI, which will result in container build failures. Additionally, the update was found to be applied inconsistently, with several relevant requirement files for Python 3.12 and 3.13 missing from the changes.

tzlocal==5.3.1
uritemplate==4.2.0
urllib3==2.6.3
urllib3==2.7.0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

security-critical critical

The version "2.7.0" for urllib3 does not appear to exist on PyPI (the current latest stable version is 2.3.0). Pinning to a non-existent version will cause container build failures. Please verify the intended version; if this is meant to address recent security advisories, you likely intended to use 2.2.2, 2.2.3, or 2.3.0. Additionally, the previous version 2.6.3 also appears to be non-existent on PyPI, suggesting a systematic typo in these requirement files that should be corrected across all instances.

typing_extensions==4.15.0
tzdata==2025.3
urllib3==2.6.3
urllib3==2.7.0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

security-critical critical

As noted in other files, urllib3==2.7.0 is not a valid version on PyPI. Please correct this to a valid patched version (e.g., 2.3.0) to avoid build failures.

tzlocal==5.3.1
uritemplate==4.2.0
urllib3==2.6.3
urllib3==2.7.0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

security-high high

This security update is inconsistent across the container requirement files. The following files are missing from this PR: sdks/python/container/py312/base_image_requirements.txt (Standard Python 3.12) and sdks/python/container/ml/py313/gpu_image_requirements.txt (ML Python 3.13 GPU). Please ensure all relevant containers are updated to maintain a consistent security posture.

@github-actions
Copy link
Copy Markdown
Contributor

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

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.

1 participant