Pytlicek / fastapi-featureflags

FastAPI Feature Flags
https://pypi.org/project/fastapi-featureflags/
MIT License
52 stars 7 forks source link

[Snyk] Security upgrade starlette from 0.17.1 to 0.25.0 #5

Closed Pytlicek closed 1 year ago

Pytlicek commented 1 year ago

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 #### Vulnerabilities that will be fixed ##### By pinning: Severity | Priority Score (*) | Issue | Upgrade | Breaking Change | Exploit Maturity :-------------------------:|-------------------------|:-------------------------|:-------------------------|:-------------------------|:------------------------- ![medium severity](https://res.cloudinary.com/snyk/image/upload/w_20,h_20/v1561977819/icon/m.png "medium severity") | **581/1000**
**Why?** Recently disclosed, Has a fix available, CVSS 5.9 | Denial of Service (DoS)
[SNYK-PYTHON-STARLETTE-3319937](https://snyk.io/vuln/SNYK-PYTHON-STARLETTE-3319937) | `starlette:`
`0.17.1 -> 0.25.0`
| No | No Known Exploit (*) Note that the real score may have changed since the PR was raised. 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](https://app.snyk.io/org/pytlicek/project/fbe29f8e-e8c1-4eff-b631-3d806e2b4cf3?utm_source=github&utm_medium=referral&page=fix-pr) πŸ›  [Adjust project settings](https://app.snyk.io/org/pytlicek/project/fbe29f8e-e8c1-4eff-b631-3d806e2b4cf3?utm_source=github&utm_medium=referral&page=fix-pr/settings) πŸ“š [Read more about Snyk's upgrade and patch logic](https://support.snyk.io/hc/en-us/articles/360003891078-Snyk-patches-to-fix-vulnerabilities) [//]: # (snyk:metadata:{"prId":"bac101e7-6c14-40d1-a400-e6bb4f5267a6","prPublicId":"bac101e7-6c14-40d1-a400-e6bb4f5267a6","dependencies":[{"name":"starlette","from":"0.17.1","to":"0.25.0"}],"packageManager":"pip","projectPublicId":"fbe29f8e-e8c1-4eff-b631-3d806e2b4cf3","projectUrl":"https://app.snyk.io/org/pytlicek/project/fbe29f8e-e8c1-4eff-b631-3d806e2b4cf3?utm_source=github&utm_medium=referral&page=fix-pr","type":"auto","patch":[],"vulns":["SNYK-PYTHON-STARLETTE-3319937"],"upgrade":[],"isBreakingChange":false,"env":"prod","prType":"fix","templateVariants":["updated-fix-title","priorityScore"],"priorityScoreList":[581]}) --- **Learn how to fix vulnerabilities with free interactive lessons:** πŸ¦‰ [Denial of Service (DoS)](https://learn.snyk.io/lessons/redos/javascript/?loc=fix-pr)
Pytlicek commented 1 year ago

@xmatoha could you please look at this? Thanks

xmatoha commented 1 year ago

@Pytlicek python 3.6 is no longer supported. https://devguide.python.org/versions . What do you suggest we stop supporting it as well and remove it from test matrix?

Pytlicek commented 1 year ago

Looks like the new starlette and its starlette.testclient is requiring httpx package πŸ€”:

Traceback:
/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_routes.py:2: in <module>
    from fastapi.testclient import TestClient
venv/lib/python3.9/site-packages/fastapi/testclient.py:1: in <module>
    from starlette.testclient import TestClient as TestClient  # noqa
venv/lib/python3.9/site-packages/starlette/testclient.py:16: in <module>
    import httpx
E   ModuleNotFoundError: No module named 'httpx'

Screenshot 2023-03-03 o 23 27 45

After pip install httpx are all tests green:

Screenshot 2023-03-03 o 23 31 44

@xmatoha could you please confirm and sort this out? πŸ™‚ (by adding that package to the requirements?) Thanks πŸ‘

codecov[bot] commented 1 year ago

Codecov Report

Merging #5 (e68eeae) into main (bcd39f7) will not change coverage. The diff coverage is n/a.

@@            Coverage Diff            @@
##              main        #5   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines           96        96           
=========================================
  Hits            96        96           

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more