Skip to content
This repository has been archived by the owner on Nov 16, 2022. It is now read-only.

Interpret and filter CSP reports #1118

Closed
chadwhitacre opened this issue Jul 18, 2017 · 10 comments
Closed

Interpret and filter CSP reports #1118

chadwhitacre opened this issue Jul 18, 2017 · 10 comments
Labels

Comments

@chadwhitacre
Copy link
Contributor

With gratipay/gratipay.com#4542 we are now sending CSP reports to Sentry, which makes them much more visible. That's great! But there's a lot of them. What do they mean? How should we process them?

@chadwhitacre
Copy link
Contributor Author

They all use the csp logger:

https://sentry.io/gratipay/gratipay-com/?query=logger%3A%22csp%22

@chadwhitacre
Copy link
Contributor Author

screen shot 2017-07-18 at 2 41 05 pm

@chadwhitacre
Copy link
Contributor Author

Worst addressed in gratipay/gratipay.com#4552.

@rohitpaulk
Copy link
Contributor

I've turned off notifications (slack/email) for logger:csp on Sentry due to the noise.

@chadwhitacre
Copy link
Contributor Author

Sorta defeats the purpose, but understandable for now. 😛

@chadwhitacre
Copy link
Contributor Author

chadwhitacre commented Jul 24, 2017

gratipay/gratipay.com#4552 doesn't solve the style-src problem in widget.html. We're still getting CSP violations, and Chrome is showing a different hash. From https://gratipay.com/~ask/widget.html:

screen shot 2017-07-24 at 7 10 19 am

How is the hash computed, I wonder?

@chadwhitacre
Copy link
Contributor Author

Ah! We have variable URLs in there, for assets.


<style>
--
  | body {
  | margin: 0;
  | padding: 0;
  | overflow: hidden;
  | }
  | button {
  | font: normal 12pt/12pt "Lato", sans-serif;
  | text-decoration: none;
  |  
  | width: auto;
  | overflow: visible;
  | display: inline-block;
  | cursor: pointer;
  |  
  | border: 1pt solid #999;
  | border-radius: 7pt;
  |  
  | background: #F7F7F6 url("https://assets.gratipay.com/button-bg.png?etag=HDqGyL5qCGOoHnue-Gh6uw~~") repeat-x bottom left;


@chadwhitacre
Copy link
Contributor Author

Lol, and etags, so it's variable per-deploy. 🙈

@chadwhitacre
Copy link
Contributor Author

Alright, back to the drawing board. 😛

@chadwhitacre
Copy link
Contributor Author

@/mattrobenolt suggests (IRL at PyOhio) that we send CSP reports to a separate project for better filterability.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants