-
Notifications
You must be signed in to change notification settings - Fork 84
ENG-1855 Privacy Center security headers #6906
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
75c47e3 to
afd7826
Compare
Greptile OverviewGreptile SummaryAdds security headers to Privacy Center responses when Major Issues Found:
Architecture:
Confidence Score: 2/5
Important Files ChangedFile Analysis
|
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.
9 files reviewed, 2 comments
Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format
clients/privacy-center/app/server-utils/recommendedSecurityHeaderService.ts
Outdated
Show resolved
Hide resolved
clients/privacy-center/app/server-utils/recommendedSecurityHeaderService.ts
Outdated
Show resolved
Hide resolved
|
@tvandort when I test this locally, it breaks the Demo page |
clients/privacy-center/app/server-utils/recommendedSecurityHeaderService.ts
Outdated
Show resolved
Hide resolved
clients/privacy-center/app/server-utils/loadEnvironmentVariables.ts
Outdated
Show resolved
Hide resolved
clients/privacy-center/app/server-utils/nullSecurityHeaderService.ts
Outdated
Show resolved
Hide resolved
Yeah I noticed this just after putting the PR. I need to do something more nuanced than what I've done here so I'm currently working on that. Will address other review comments and rerequest when done. |
eb5b641 to
4b8be9d
Compare
930c3ab to
0c72c09
Compare
|
@gilluminate I refactored this pretty significantly which I think in turn addressed all your review comments. Of course... everything is now pretty different so it might be worthwhile to pretend it's new. |
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.
10 files reviewed, 3 comments
clients/privacy-center/app/server-utils/recommendedSecurityHeaders.ts
Outdated
Show resolved
Hide resolved
clients/privacy-center/app/server-utils/recommendedSecurityHeaders.ts
Outdated
Show resolved
Hide resolved
clients/privacy-center/__tests__/server-utils/recommendedSecurityHeaders.test.ts
Show resolved
Hide resolved
6694589 to
df95e02
Compare
clients/privacy-center/app/server-utils/recommendedSecurityHeaders.ts
Outdated
Show resolved
Hide resolved
clients/privacy-center/__tests__/server-utils/recommendedSecurityHeaders.test.ts
Outdated
Show resolved
Hide resolved
ac75f85 to
166853f
Compare
0826f3a to
78df792
Compare
Co-authored-by: Jason Gill <jason.gill@ethyca.com>
…ders.ts Co-authored-by: Jason Gill <jason.gill@ethyca.com>
…ityHeaders.test.ts Co-authored-by: Jason Gill <jason.gill@ethyca.com>
78df792 to
22fab20
Compare
Co-authored-by: Jason Gill <jason.gill@ethyca.com>
Ticket ENG-1855
Description Of Changes
This PR adds security related headers to Privacy Center responses when the Privacy Center environment variable
FIDES_PRIVACY_CENTER__SECURITY_HEADERS_MODEis set torecommended.The security headers added to every response are:
X-Content-Type-Options: "nosniff"Cache-Control: "no-cache, no-store, must-revalidate"Strict-Transport-Security: "max-age=31536000"The security headers conditionally added are:
X-Frame-OptionsSAMEORIGINon everything but/embedded-consent.htmlThe security headers added to "page like" responses are:
Content-Security-Policy. This Policy changes depend on the mode and configuration of Fides please review the PR.Steps to Confirm
FIDES_PRIVACY_CENTER__SECURITY_HEADERS_MODEtorecommended/index/fides.js_next/*pathsPre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works