Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions python/third_party/TradingAgents/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ questionary
langchain_anthropic
langchain-google-genai
python-dotenv
protobuf>=6.33.5 # not directly required, pinned by Snyk to avoid a vulnerability
zipp>=3.19.1 # not directly required, pinned by Snyk to avoid a vulnerability
Comment on lines +26 to +27

Choose a reason for hiding this comment

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

high

While pinning these transitive dependencies in requirements.txt might resolve the reported Snyk vulnerabilities for one installation path, it doesn't address the root cause and introduces further inconsistency. This project defines dependencies in multiple places (pyproject.toml, setup.py, and this requirements.txt), which is a significant maintenance concern and can lead to unpredictable environments.

The presence of pyproject.toml and uv.lock suggests uv is the intended package manager. The best practice is to consolidate all dependency management within pyproject.toml to create a single source of truth.

To properly resolve these vulnerabilities, I recommend adding explicit constraints to pyproject.toml and regenerating the lock file. For example, to fix the protobuf vulnerability, you should add protobuf >= "6.33.5" to the dependencies in python/third_party/TradingAgents/pyproject.toml. After updating pyproject.toml, run uv lock to update the lock file.

This approach will fix the vulnerability correctly for the uv-based workflow and is a step towards a more maintainable dependency setup. I recommend removing these additions to requirements.txt and instead updating pyproject.toml.