Skip to content
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

[Snyk] Fix for 43 vulnerabilities #1135

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sfahad1414
Copy link
Collaborator

@sfahad1414 sfahad1414 commented Feb 9, 2024

This PR was automatically created by Snyk using the credentials of a real user.


Snyk has created this PR to fix one or more vulnerable packages in the `pip` dependencies of this project.

Changes included in this PR

  • Changes to the following files to upgrade the vulnerable dependencies to a fixed version:
    • requirements.txt
⚠️ Warning
torch 1.13.1 requires nvidia-cuda-runtime-cu11, which is not installed.
torch 1.13.1 requires nvidia-cuda-nvrtc-cu11, which is not installed.
torch 1.13.1 requires nvidia-cublas-cu11, which is not installed.
torch 1.13.1 requires nvidia-cudnn-cu11, which is not installed.
tensorflow-text 2.11.0 requires tensorflow, which is not installed.
SQLAlchemy 1.4.51 has requirement greenlet!=0.4.17; python_version >= "3" and (platform_machine == "aarch64" or (platform_machine == "ppc64le" or (platform_machine == "x86_64" or (platform_machine == "amd64" or (platform_machine == "AMD64" or (platform_machine == "win32" or platform_machine == "WIN32")))))), but you have greenlet 0.4.17.
sentence-transformers 2.2.2 requires transformers, which is not installed.
sentence-transformers 2.2.2 requires scipy, which is not installed.
scikit-learn 1.0.2 requires scipy, which is not installed.
sanic 23.3.0 has requirement sanic-routing>=22.8.0, but you have sanic-routing 0.7.2.
rasa 3.5.6 requires tensorflow, which is not installed.
rasa 3.5.6 requires scipy, which is not installed.
rasa 3.5.6 has requirement prompt-toolkit<3.0.29,>=3.0, but you have prompt-toolkit 3.0.43.
rasa 3.5.6 has requirement sanic<21.13,>=21.12, but you have sanic 23.3.0.
rasa 3.5.6 has requirement joblib<1.3.0,>=0.15.1, but you have joblib 1.3.2.
rasa 3.5.6 has requirement pydantic<1.10.3, but you have pydantic 1.10.13.
rasa 3.5.6 has requirement sentry-sdk<1.15.0,>=0.17.0, but you have sentry-sdk 1.40.2.
rasa 3.5.6 has requirement redis<5.0,>=4.5.3, but you have redis 5.0.1.
rasa 3.5.6 has requirement pymongo[srv,tls]<3.11,>=3.8, but you have pymongo 3.12.0.
rasa 3.5.6 has requirement protobuf<3.20,>=3.9.2, but you have protobuf 3.20.2.
rasa 3.5.6 has requirement aio-pika<8.2.4,>=6.7.1, but you have aio-pika 9.3.1.
rasa-sdk 3.5.1 has requirement prompt-toolkit<3.0.29,>=3.0, but you have prompt-toolkit 3.0.43.
rasa-sdk 3.5.1 has requirement sanic<22.0.0,>=21.12.0, but you have sanic 23.3.0.
pytest 6.1.2 has requirement pluggy<1.0,>=0.12, but you have pluggy 1.2.0.
pytest-httpx 0.15.0 has requirement httpx==0.21.*, but you have httpx 0.23.3.
networkx 2.6 requires scipy, which is not installed.
jsonschema-spec 0.1.6 has requirement typing-extensions<4.6.0; python_version < "3.8", but you have typing-extensions 4.7.1.
gevent 22.10.2 has requirement greenlet>=2.0.0; platform_python_implementation == "CPython", but you have greenlet 0.4.17.
fastapi 0.103.2 has requirement starlette<0.28.0,>=0.27.0, but you have starlette 0.29.0.
boto3 1.26.100 has requirement botocore<1.30.0,>=1.29.100, but you have botocore 1.23.23.

Vulnerabilities that will be fixed

By pinning:
Severity Issue Upgrade Breaking Change Exploit Maturity
medium severity HTTP Request Smuggling
SNYK-PYTHON-AIOHTTP-5798483
aiohttp:
3.8.0 -> 3.9.2
No Proof of Concept
medium severity HTTP Request Smuggling
SNYK-PYTHON-AIOHTTP-6057353
aiohttp:
3.8.0 -> 3.9.2
No Proof of Concept
medium severity Improper Input Validation
SNYK-PYTHON-AIOHTTP-6091621
aiohttp:
3.8.0 -> 3.9.2
No Proof of Concept
medium severity Improper Input Validation
SNYK-PYTHON-AIOHTTP-6091622
aiohttp:
3.8.0 -> 3.9.2
No Proof of Concept
medium severity HTTP Request Smuggling
SNYK-PYTHON-AIOHTTP-6091623
aiohttp:
3.8.0 -> 3.9.2
No No Known Exploit
medium severity Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
SNYK-PYTHON-AIOHTTP-6209406
aiohttp:
3.8.0 -> 3.9.2
No No Known Exploit
medium severity HTTP Request Smuggling
SNYK-PYTHON-AIOHTTP-6209407
aiohttp:
3.8.0 -> 3.9.2
No Proof of Concept
medium severity Race Condition
SNYK-PYTHON-AIOPIKA-5880689
aio-pika:
6.8.2 -> 9.1.5
No Proof of Concept
high severity Regular Expression Denial of Service (ReDoS)
SNYK-PYTHON-FASTAPI-6228055
fastapi:
0.78.0 -> 0.109.1
No Proof of Concept
high severity Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')
SNYK-PYTHON-GEVENT-5906371
gevent:
22.10.2 -> 23.9.0
No No Known Exploit
critical severity Arbitrary Code Execution
SNYK-PYTHON-JOBLIB-3027033
joblib:
1.0.1 -> 1.1.1
No Proof of Concept
high severity Remote Code Execution (RCE)
SNYK-PYTHON-NLTK-5926697
nltk:
3.6.6 -> 3.8.1
No Proof of Concept
medium severity Cross-site Scripting (XSS)
SNYK-PYTHON-NLTK-5926698
nltk:
3.6.6 -> 3.8.1
No Proof of Concept
low severity NULL Pointer Dereference
SNYK-PYTHON-NUMPY-2321964
numpy:
1.21.3 -> 1.22.2
No Proof of Concept
low severity Buffer Overflow
SNYK-PYTHON-NUMPY-2321966
numpy:
1.21.3 -> 1.22.2
No No Known Exploit
low severity Denial of Service (DoS)
SNYK-PYTHON-NUMPY-2321970
numpy:
1.21.3 -> 1.22.2
No Proof of Concept
critical severity Heap-based Buffer Overflow
SNYK-PYTHON-PILLOW-5918878
pillow:
9.5.0 -> 10.2.0
No Mature
high severity Uncontrolled Resource Consumption ('Resource Exhaustion')
SNYK-PYTHON-PILLOW-6043904
pillow:
9.5.0 -> 10.2.0
No No Known Exploit
high severity Eval Injection
SNYK-PYTHON-PILLOW-6182918
pillow:
9.5.0 -> 10.2.0
No Proof of Concept
high severity Denial of Service (DoS)
SNYK-PYTHON-PILLOW-6219984
pillow:
9.5.0 -> 10.2.0
No No Known Exploit
high severity Denial of Service (DoS)
SNYK-PYTHON-PILLOW-6219986
pillow:
9.5.0 -> 10.2.0
No No Known Exploit
low severity Race Condition
SNYK-PYTHON-PROMPTTOOLKIT-6141120
prompt-toolkit:
2.0.10 -> 3.0.13
No No Known Exploit
medium severity Regular Expression Denial of Service (ReDoS)
SNYK-PYTHON-RASA-5665551
rasa:
2.8.15 -> 3.5.6
No No Known Exploit
low severity Exposure of Data Element to Wrong Session
SNYK-PYTHON-REDIS-5291195
redis:
3.5.3 -> 4.3.6
No Proof of Concept
medium severity Denial of Service (DoS)
SNYK-PYTHON-SANIC-2404810
sanic:
20.9.1 -> 20.12.6
No No Known Exploit
high severity Denial of Service (DoS)
SNYK-PYTHON-SANIC-5500163
sanic:
20.9.1 -> 20.12.6
No No Known Exploit
medium severity Information Exposure
SNYK-PYTHON-SENTRYSDK-3367401
sentry-sdk:
1.2.0 -> 1.14.0
No No Known Exploit
medium severity Race Condition
SNYK-PYTHON-SENTRYSDK-5812122
sentry-sdk:
1.2.0 -> 1.14.0
No No Known Exploit
medium severity Denial of Service (DoS)
SNYK-PYTHON-STARLETTE-3319937
starlette:
0.19.1 -> 0.27.0
No No Known Exploit
high severity Directory Traversal
SNYK-PYTHON-STARLETTE-5538332
starlette:
0.19.1 -> 0.27.0
No Proof of Concept
medium severity Insecure Temporary File
SNYK-PYTHON-TRANSFORMERS-5563628
transformers:
4.23.0 -> 4.37.0
No Proof of Concept
high severity Deserialization of Untrusted Data
SNYK-PYTHON-TRANSFORMERS-6134594
transformers:
4.23.0 -> 4.37.0
No Proof of Concept
critical severity Deserialization of Untrusted Data
SNYK-PYTHON-TRANSFORMERS-6135747
transformers:
4.23.0 -> 4.37.0
No Proof of Concept
medium severity Command Injection
SNYK-PYTHON-TRANSFORMERS-6220003
transformers:
4.23.0 -> 4.37.0
No No Known Exploit
high severity Out-of-Bounds Write
SNYK-PYTHON-UJSON-2359034
ujson:
4.3.0 -> 5.4.0
No No Known Exploit
medium severity Double Free
SNYK-PYTHON-UJSON-2940619
ujson:
4.3.0 -> 5.4.0
No No Known Exploit
medium severity Improper Handling of Syntactically Invalid Structure
SNYK-PYTHON-UJSON-2942122
ujson:
4.3.0 -> 5.4.0
No Proof of Concept
medium severity Information Exposure Through Sent Data
SNYK-PYTHON-URLLIB3-5926907
urllib3:
1.26.15 -> 1.26.18
No No Known Exploit
medium severity Information Exposure Through Sent Data
SNYK-PYTHON-URLLIB3-6002459
urllib3:
1.26.15 -> 1.26.18
No No Known Exploit
medium severity Regular Expression Denial of Service (ReDoS)
SNYK-PYTHON-VALIDATORS-6008990
validators:
0.20.0 -> 0.21.0
No Proof of Concept
low severity Access Restriction Bypass
SNYK-PYTHON-WERKZEUG-3319935
werkzeug:
2.1.2 -> 2.3.8
No No Known Exploit
high severity Denial of Service (DoS)
SNYK-PYTHON-WERKZEUG-3319936
werkzeug:
2.1.2 -> 2.3.8
No No Known Exploit
medium severity Inefficient Algorithmic Complexity
SNYK-PYTHON-WERKZEUG-6035177
werkzeug:
2.1.2 -> 2.3.8
No No Known Exploit

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.

Check the changes in this PR to ensure they won't cause issues with your project.


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

🛠 Adjust project settings

📚 Read more about Snyk's upgrade and patch logic


Learn how to fix vulnerabilities with free interactive lessons:

🦉 Improper Input Validation
🦉 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
🦉 Regular Expression Denial of Service (ReDoS)
🦉 More lessons are available in Snyk Learn

Summary by CodeRabbit

  • Chores
    • Updated package versions in requirements.txt to enhance performance and compatibility:
      • rasa to 3.5.6
      • fastapi to 0.109.1
      • transformers to 4.37.0
      • validators to 0.21.0
      • numpy to 1.22.2
      • nltk to 3.8.1
      • aiohttp to 3.9.2
      • urllib3 to 1.26.18

The following vulnerabilities are fixed by pinning transitive dependencies:
- https://snyk.io/vuln/SNYK-PYTHON-AIOHTTP-5798483
- https://snyk.io/vuln/SNYK-PYTHON-AIOHTTP-6057353
- https://snyk.io/vuln/SNYK-PYTHON-AIOHTTP-6091621
- https://snyk.io/vuln/SNYK-PYTHON-AIOHTTP-6091622
- https://snyk.io/vuln/SNYK-PYTHON-AIOHTTP-6091623
- https://snyk.io/vuln/SNYK-PYTHON-AIOHTTP-6209406
- https://snyk.io/vuln/SNYK-PYTHON-AIOHTTP-6209407
- https://snyk.io/vuln/SNYK-PYTHON-AIOPIKA-5880689
- https://snyk.io/vuln/SNYK-PYTHON-FASTAPI-6228055
- https://snyk.io/vuln/SNYK-PYTHON-GEVENT-5906371
- https://snyk.io/vuln/SNYK-PYTHON-JOBLIB-3027033
- https://snyk.io/vuln/SNYK-PYTHON-NLTK-5926697
- https://snyk.io/vuln/SNYK-PYTHON-NLTK-5926698
- https://snyk.io/vuln/SNYK-PYTHON-NUMPY-2321964
- https://snyk.io/vuln/SNYK-PYTHON-NUMPY-2321966
- https://snyk.io/vuln/SNYK-PYTHON-NUMPY-2321970
- https://snyk.io/vuln/SNYK-PYTHON-PILLOW-5918878
- https://snyk.io/vuln/SNYK-PYTHON-PILLOW-6043904
- https://snyk.io/vuln/SNYK-PYTHON-PILLOW-6182918
- https://snyk.io/vuln/SNYK-PYTHON-PILLOW-6219984
- https://snyk.io/vuln/SNYK-PYTHON-PILLOW-6219986
- https://snyk.io/vuln/SNYK-PYTHON-PROMPTTOOLKIT-6141120
- https://snyk.io/vuln/SNYK-PYTHON-RASA-5665551
- https://snyk.io/vuln/SNYK-PYTHON-REDIS-5291195
- https://snyk.io/vuln/SNYK-PYTHON-SANIC-2404810
- https://snyk.io/vuln/SNYK-PYTHON-SANIC-5500163
- https://snyk.io/vuln/SNYK-PYTHON-SENTRYSDK-3367401
- https://snyk.io/vuln/SNYK-PYTHON-SENTRYSDK-5812122
- https://snyk.io/vuln/SNYK-PYTHON-STARLETTE-3319937
- https://snyk.io/vuln/SNYK-PYTHON-STARLETTE-5538332
- https://snyk.io/vuln/SNYK-PYTHON-TRANSFORMERS-5563628
- https://snyk.io/vuln/SNYK-PYTHON-TRANSFORMERS-6134594
- https://snyk.io/vuln/SNYK-PYTHON-TRANSFORMERS-6135747
- https://snyk.io/vuln/SNYK-PYTHON-TRANSFORMERS-6220003
- https://snyk.io/vuln/SNYK-PYTHON-UJSON-2359034
- https://snyk.io/vuln/SNYK-PYTHON-UJSON-2940619
- https://snyk.io/vuln/SNYK-PYTHON-UJSON-2942122
- https://snyk.io/vuln/SNYK-PYTHON-URLLIB3-5926907
- https://snyk.io/vuln/SNYK-PYTHON-URLLIB3-6002459
- https://snyk.io/vuln/SNYK-PYTHON-VALIDATORS-6008990
- https://snyk.io/vuln/SNYK-PYTHON-WERKZEUG-3319935
- https://snyk.io/vuln/SNYK-PYTHON-WERKZEUG-3319936
- https://snyk.io/vuln/SNYK-PYTHON-WERKZEUG-6035177
Copy link

coderabbitai bot commented Feb 9, 2024

Walkthrough

Walkthrough

The recent update to the requirements.txt file brings several key package upgrades across the board, enhancing functionality and stability. Noteworthy changes include significant version jumps for rasa, fastapi, and transformers, indicating substantial improvements or additions in features. Minor updates to validators, numpy, nltk, aiohttp, and urllib3 suggest incremental improvements and bug fixes, ensuring better compatibility and performance across the project's dependencies.

Changes

Files Change Summary
rasa Version updated from 2.8.15 to 3.5.6
fastapi Version updated from 0.78.0 to 0.109.1
transformers Version updated from 4.23.0 to 4.37.0
validators, numpy, nltk, aiohttp, urllib3 Minor version updates

🐇✨
In the code's garden, updates bloom bright,
From Rasa's leap to FastAPI's flight.
With Transformers' might and Numpy's slight tweak,
A smoother path we joyfully seek.
🌼🚀

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between eb1a360 and eceb479.
Files selected for processing (1)
  • requirements.txt (5 hunks)
Additional comments: 8
requirements.txt (8)
  • 5-6: Ensure compatibility of rasa==3.5.6 and fastapi~=0.109.1 with other project dependencies, especially given the PR's note on potential compatibility issues with upgraded packages.
  • 21-21: The upgrade to validators==0.21.0 is noted. Verify this version's compatibility with the project's validation logic.
  • 25-25: transformers==4.37.0 upgrade should be checked for compatibility with the project's NLP features, considering the significant version jump.
  • 44-44: aiohttp==3.9.2 upgrade requires validation for async HTTP requests throughout the project to ensure no breaking changes.
  • 49-49: numpy==1.22.2 upgrade should be tested for numerical operations' accuracy and performance within the project.
  • 52-52: Ensure nltk==3.8.1 upgrade does not affect the project's text processing functionalities adversely.
  • 73-73: urllib3==1.26.18 upgrade needs verification for HTTP communication stability and security.
  • 89-99: Pinned versions for packages not directly required, such as aio-pika, gevent, joblib, pillow, prompt-toolkit, redis, sanic, sentry-sdk, starlette, ujson, and werkzeug, to avoid vulnerabilities, should be thoroughly tested for indirect impacts on the project's functionality and performance.

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