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

DSEGOG-368 fix api dependabot security vulnerability #145

Merged

Conversation

moonraker595
Copy link
Contributor

The CI has been failing due to a security vulnerability in one of the dependencies that fast API uses, called Starlette.

Updating the version of fast API to the latest (0.115.5) increased the version of Starlette, patching the security vulnerability.

However, older versions of Starlette were more lenient and implicitly converted raw dictionaries to JSON strings for JSON fields. The newer version enforces stricter adherence to the type hints. This meant that a lot of endpoints were failing the tests as the application could no longer convert the default provided value to a JSON string.

The solution was to simply wrap the default dict in quotes, manually setting default values to a JSON-compatible string.

Copy link

codecov bot commented Nov 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.67%. Comparing base (8ba1a40) to head (9971b33).
Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #145   +/-   ##
=======================================
  Coverage   95.67%   95.67%           
=======================================
  Files          73       73           
  Lines        3765     3765           
  Branches      387      387           
=======================================
  Hits         3602     3602           
  Misses        113      113           
  Partials       50       50           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@moonraker595 moonraker595 merged commit d3953df into main Nov 27, 2024
9 checks passed
@moonraker595 moonraker595 deleted the DSEGOG-368-Fix-API-Dependabot-security-vulnerability branch November 27, 2024 16:11
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