-
Notifications
You must be signed in to change notification settings - Fork 85
ENG-2192: Security Headers #7134
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
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
1014390 to
decc150
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7134 +/- ##
==========================================
- Coverage 87.17% 87.17% -0.01%
==========================================
Files 535 536 +1
Lines 35330 35371 +41
Branches 4113 4120 +7
==========================================
+ Hits 30800 30835 +35
- Misses 3639 3643 +4
- Partials 891 893 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ab3f5f4 to
ee621ed
Compare
5d2649e to
d9517e8
Compare
Greptile SummaryAdds configurable security headers ( Key changes:
Critical issues found:
Confidence Score: 2/5
Important Files Changed
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4 files reviewed, 6 comments
|
|
||
| from fides.config import CONFIG | ||
|
|
||
| apply_recommended_headers = CONFIG.security.headers_mode == "recommended" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Module-level config evaluation will freeze the value at import time. If headers_mode changes at runtime, this won't reflect the change. Move this check inside the middleware dispatch method.
| apply_recommended_headers = CONFIG.security.headers_mode == "recommended" | |
| # Remove this line - the check should be done at request time in the middleware |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is intended to make sure we don't access the config object on each request.
|
@grepileai review again pls |
Ticket ENG-2192
Description Of Changes
Adds good practice security headers to Admin UI & Fides API.
Code Changes
Adds the following headers on routes:
Steps to Confirm
FIDES__SECURITY__HEADERS_MODE="recommended"Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works