- From: Mike West <mkwst@google.com>
- Date: Thu, 4 Sep 2014 17:24:34 +0200
- To: Pawel Krawczyk <pawel.krawczyk@hush.com>, Dan Veditz <dveditz@mozilla.com>, Brad Hill <bhill@paypal.com>
- Cc: public-webappsec@w3.org
- Message-ID: <CAKXHy=f7dfvriL8Q92GuKfUaH9x8g0V7PH261PZ-=q=QKw4Djw@mail.gmail.com>
This seems pretty reasonable. My only concern is that existing parsers wouldn't appreciate invalid URLs in the 'blocked-uri' field. This might be small enough to sneak into CSP2 at the last minute. WDYT Dan, Brad? -mike On Sep 4, 2014 2:12 PM, "Pawel Krawczyk" <pawel.krawczyk@hush.com> wrote: > A small issue we have just discussed at GitHub > https://github.com/w3c/webappsec/issues/52: > > CSP violation reports sent when browser blocks eval() and inline script > are identical in their contents, which makes it difficult to determine what > really caused them. > > In both cases the fields violated-directive will be set to script-scr and > blocked-uri will be empty. So when I'm trying to analyse received reports > I can't really say what I should allow - unsafe-eval or unsafe-inline. > Sample fields extracted from such reports: > > "blocked-uri":"" > > "violated-directive":"script-src 'none’" > The solution might be either sending some kind of meaningful blocked-url value > - such as self-eval or self-inline, or adding an additional field to the > report, such as blocked-feature set to eval or inline respectively. > Sample full report: > > > 1. {"csp-report":{"document-uri":"http://webcookies.info/","referrer":" > ","violated-directive":"script-src 'none'","original-policy":"base-uri > http://webcookies.info; connect-src 'none'; font-src 'none'; > form-action 'none'; frame-ancestors 'none'; child-src 'none'; default-src > 'none'; frame-src 'none'; img-src 'none'; media-src 'none'; object-src > 'none'; script-src 'none'; style-src 'none'; report-uri > http://new.cspbuilder.info:8080/report/9018643792216450862", > "blocked-uri":"","source-file":" > http://pagead2.googlesyndication.com","line-number":101,"column-number":236,"status-code":200} > } > > > > -- > Pawel Krawczyk > pawel.krawczyk@hush.com +44 7879 180015 > CISSP, OWASP > > > >
Received on Thursday, 4 September 2014 15:25:03 UTC