[Snyk] Security upgrade protobuf from 4.24.4 to 6.33.5#75
[Snyk] Security upgrade protobuf from 4.24.4 to 6.33.5#75
Conversation
The following vulnerabilities are fixed by pinning transitive dependencies: - https://snyk.io/vuln/SNYK-PYTHON-PROTOBUF-15090738
|
Important Review skippedIgnore keyword(s) in the title. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| @@ -1,2 +1,3 @@ | |||
| -e git+https://github.com/mindee/doctr.git#egg=python-doctr[tf] | |||
| streamlit>=1.0.0 | |||
| protobuf>=6.33.5 # not directly required, pinned by Snyk to avoid a vulnerability | |||
There was a problem hiding this comment.
Bug: The added protobuf>=6.33.5 requirement is incompatible with TensorFlow's dependency on protobuf<3.20, which will cause the demo installation to fail.
Severity: CRITICAL
Suggested Fix
Remove the protobuf>=6.33.5 requirement from demo/tf-requirements.txt. The correct version of protobuf will be installed as a transitive dependency of TensorFlow. If a specific version is needed for another package, it must be compatible with TensorFlow's requirement (e.g., protobuf<3.20).
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: demo/tf-requirements.txt#L3
Potential issue: The `demo/tf-requirements.txt` file is updated to require
`protobuf>=6.33.5`. However, the demo also installs `python-doctr[tf]`, which depends on
TensorFlow (`>=2.11.0,<3.0.0`). TensorFlow versions in this range, such as 2.11, require
an older version of protobuf (`<3.20`). This creates an unsolvable dependency conflict
that will cause the `pip` installation to fail, rendering the TensorFlow demo
non-installable and unusable. The project's own `api/pyproject.toml` already pins
`protobuf` to `<=3.20.2` to avoid similar errors, indicating this is a known constraint.
Did we get this right? 👍 / 👎 to inform future reviews.
Snyk has created this PR to fix 1 vulnerabilities in the pip dependencies of this project.
Snyk changed the following file(s):
demo/tf-requirements.txtImportant
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:
🦉 Learn about vulnerability in an interactive lesson of Snyk Learn.