-
Notifications
You must be signed in to change notification settings - Fork 2.6k
chore: bump min starlette version to patch vulnerabilities #3796
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
base: main
Are you sure you want to change the base?
chore: bump min starlette version to patch vulnerabilities #3796
Conversation
Summary of ChangesHello @MarlzRana, 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 enhances the project's security posture by updating core dependencies. It specifically addresses a known vulnerability in Starlette by upgrading its minimum version, which in turn required a corresponding update to the FastAPI dependency to maintain a compatible and satisfiable dependency tree. This ensures the application remains secure and functional with updated libraries. Highlights
Using Gemini Code AssistThe 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
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 Limitations & Feedback Gemini Code Assist 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. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. 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. Footnotes
|
There was a problem hiding this 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 addresses a vulnerability in starlette by upgrading it to version 0.49.1. As a necessary follow-up, fastapi is also upgraded to 0.120.1 to maintain compatibility. The changes are well-justified and correctly implemented in pyproject.toml. I have one suggestion to improve the consistency of the version pinning for fastapi.
| "authlib>=1.5.1, <2.0.0", # For RestAPI Tool | ||
| "click>=8.1.8, <9.0.0", # For CLI tools | ||
| "fastapi>=0.115.0, <0.119.0", # FastAPI framework | ||
| "fastapi>=0.120.1, <0.123.5", # FastAPI framework |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While the lower bound bump for fastapi is well-justified, the upper bound <0.123.5 seems a bit arbitrary. For consistency and better readability, consider using a rounder upper bound like <0.124.0. If there's a specific reason to avoid versions >=0.123.5, it would be helpful to add a comment explaining it.
| "fastapi>=0.120.1, <0.123.5", # FastAPI framework | |
| "fastapi>=0.120.1, <0.124.0", # FastAPI framework |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Hi @MarlzRana, Thank you for your contribution through this pull request! This PR has merge conflicts that require changes from your end. Could you please rebase your branch with the latest main branch to address these? Once this is complete, please let us know so we can proceed with the review. |
Link to Issue or Description of Change
Versions of
starlette>= 0.39.0 and < 0.49.1, contain CVE-2025-62727. Let's bump to patch this vulnerability.Testing Plan
Unit Tests:
Checklist
Additional context
We also have to bump
fastapias well, to make the project's requirements satisfiable, otherwise one gets this:Hence, we need to min-version
fastapiat 0.120.1 to get this commit in which enables us to bumpstarlettein ourpyproject.toml.