-
Notifications
You must be signed in to change notification settings - Fork 84
Description
CSP reporting is incredibly useful and provides heaps of valuable data, but it can be difficult for smaller sites to implement. This was my main motivating factor in building https://report-uri.io, a free CSP reporting service.
In the course of running this service I've come to terms with lots of odd browser behaviours and created a fairly robust set of filters to eliminate both noise and potentially sensitive information in reports.
I recently came across an issue where a report was being sent from a page that contained sensitive information in the URL as a query string. As the recipient of the report, report-uri.io had access to this sensitive information. With the above filters the query string is stripped at my edge and never hits storage, nor do I inspect or use the data for any other purposes, but it would be nice if the host had the ability to limit the information sent in the report. As more and more sites use CSP reporting, and CSP reporting as a service increases in popularity, this issue seems like it will only get bigger.
Could we have some way of limiting the data sent in a report? The first thing that jumps to mind is the ability to strip the fragment and/or query string from locations like the referrer, document-uri and blocked-uri. We could be flexible and even strip the path or provide the option to not send the referrer at all.
Given the nature of CSP reporting I don't think we can work on the assumption that reports will be sent to an endpoint under the control of the organisation.