-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add CSP to help.expensify.com #15607
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
@cristipaval Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
I have read the CLA Document and I hereby sign the CLA |
Sorry, this is my first APP pr, let me figure out the PR Author checklist. I'll comment when were ready for review. |
@nathanmetcalf Do you need any help here? |
Just trying to get it running locally so I can test it. I seem to have some version issues - I'll post them when I come back to this. |
@marcochavezf @roryabraham @cristipaval This is now ready for review, I managed to get it running locally, and all seems well :) |
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromemobile.chrome.movMobile Web - Safarimobile.safari.movDesktopdesktop.moviOSios.native.movAndroidandroid.native.mov |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/nathanmetcalf in version: 1.2.91-0 🚀
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.2.91-1 🚀
|
This PR adds a content security policy to help.expensify.com. This is using the http meta-equiv tag as we intend to implement this with a cloudflare worker as part of https://expensify.slack.com/archives/CC7NECV4L/p1670264158167419
Details
The only "fishy" thing going on here is using "style-src 'unsafe-inline'" this is required because we have style in .svg resources that we can't currently control. We intend on moving this to a 'nonce' as part of the CF implementation.
Fixed Issues
Fixes: https://github.com/Expensify/Expensify/issues/264123
Tests
Tested using CSP tester in chrome.
No CSP violations in console.
Offline tests
N/A
QA Steps
N/A
PR Author Checklist
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
N/A help.expensify.com change only.