Skip to content

[Snyk] Security upgrade requests from 2.31.0 to 2.33.0#629

Open
revan-zhang wants to merge 1 commit intotouchfrom
snyk-fix-c491fc514b9018a5c7756dbbb8dbf8c1
Open

[Snyk] Security upgrade requests from 2.31.0 to 2.33.0#629
revan-zhang wants to merge 1 commit intotouchfrom
snyk-fix-c491fc514b9018a5c7756dbbb8dbf8c1

Conversation

@revan-zhang
Copy link
Copy Markdown
Contributor

@revan-zhang revan-zhang commented Mar 28, 2026

snyk-top-banner

Snyk has created this PR to fix 1 vulnerabilities in the pip dependencies of this project.

Snyk changed the following file(s):

  • python/requirements-optional.txt
⚠️ Warning
web3 6.20.4 requires requests, which is not installed.

Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • Max score is 1000. Note that the real score may have changed since the PR was raised.
  • This PR was automatically created by Snyk using the credentials of a real user.
  • Some vulnerabilities couldn't be fully fixed and so Snyk will still find them when the project is tested again. This may be because the vulnerability existed within more than one direct dependency, but not all of the affected dependencies could be upgraded.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic


Learn how to fix vulnerabilities with free interactive lessons:

🦉 Insecure Temporary File


Open with Devin

Note

Low Risk
Low risk dependency change limited to optional Python installs/test envs; potential risk is minor compatibility issues if any code relies on older requests behavior.

Overview
Adds an explicit requests>=2.33.0 entry to python/requirements-optional.txt, pinning the optional dependency to a Snyk-recommended secure version (and ensuring requests is installed when optional deps are used, e.g. tox's full env).

Written by Cursor Bugbot for commit 2e27449. This will update automatically on new commits. Configure here.

The following vulnerabilities are fixed by pinning transitive dependencies:
- https://snyk.io/vuln/SNYK-PYTHON-REQUESTS-15763443
@revan-zhang revan-zhang requested a review from a team as a code owner March 28, 2026 12:18
@revan-zhang
Copy link
Copy Markdown
Contributor Author

revan-zhang commented Mar 28, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

View 1 additional finding in Devin Review.

Open in Devin Review

Pillow
stellar-sdk>=4.0.0,<6.0.0
rlp>=1.1.0 ; python_version<'3.7'
requests>=2.33.0 # not directly required, pinned by Snyk to avoid a vulnerability
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 Security version pin placed in optional requirements instead of main requirements where requests is a direct dependency

The Snyk security pin requests>=2.33.0 is added to requirements-optional.txt with the comment "not directly required", but requests is a direct dependency declared in python/requirements.txt:3 as requests>=2.4.0. Users who install only the base requirements (the standard case) will still resolve requests to any version >=2.4.0, potentially pulling in the vulnerable version that this pin was supposed to prevent. The fix should update the minimum version in python/requirements.txt from >=2.4.0 to >=2.33.0 instead.

Prompt for agents
The security pin for requests should be applied in python/requirements.txt (line 3), not in python/requirements-optional.txt. In python/requirements.txt, change line 3 from `requests>=2.4.0` to `requests>=2.33.0`. Then remove line 6 (`requests>=2.33.0 # not directly required, pinned by Snyk to avoid a vulnerability`) from python/requirements-optional.txt, since `requests` is a direct (not optional) dependency.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Pillow
stellar-sdk>=4.0.0,<6.0.0
rlp>=1.1.0 ; python_version<'3.7'
requests>=2.33.0 # not directly required, pinned by Snyk to avoid a vulnerability
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Security fix applied to wrong requirements file

Medium Severity

The requests version pin (>=2.33.0) is added to requirements-optional.txt, but requests is already a direct core dependency in requirements.txt at >=2.4.0. The optional file is only consumed by the full tox test environment, so the vast majority of users installing via pip install (which uses setup.py reading requirements.txt) remain exposed to the vulnerable requests versions. The version bump belongs in requirements.txt where the direct requests>=2.4.0 dependency is declared.

Fix in Cursor Fix in Web

Pillow
stellar-sdk>=4.0.0,<6.0.0
rlp>=1.1.0 ; python_version<'3.7'
requests>=2.33.0 # not directly required, pinned by Snyk to avoid a vulnerability
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Version pin breaks Python 3.9 and earlier compatibility

Medium Severity

requests>=2.33.0 requires Python 3.10+ (it dropped Python 3.9 support), but this project declares python_requires=">=3.6" and its tox.ini runs py{36,37,38,39,310}-full environments that install requirements-optional.txt. This pin will cause dependency resolution failures for all full test environments on Python 3.6 through 3.9. The line needs a Python version environment marker (e.g., ; python_version>='3.10') to avoid breaking older supported runtimes.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants