Add a user counter for XSSAuditor
Reported by
fbr...@mozilla.com,
Aug 31 2016
|
||||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0 Steps to reproduce the problem: Looking into existing data, it seems there is no use counter for XSSAuditor. What is the expected behavior? What went wrong? It would be useful if there was a use counter that informs how often XSSAuditor triggers. Maybe this should be in 'XSSAuditorDelegate::didBlockScript'? Did this work before? N/A Chrome version: Channel: canary OS Version: Flash Version:
,
Aug 31 2016
,
Aug 31 2016
Could you be more specific about what you mean by "How Often"? Do you mean the number of times per million page loads? The number of distinct sites that trip this in a given day? The number of monthly users that see at least one of these? Or something else? Also, to whom would this be useful? [note what high school English teachers call the weak passive voice in your statement "It would be useful ...:" :) ] The only principal that can do anything about it is the site owner, and there's already a report= mechanism in the X-XSS-Protect header in chromium to get these notifications (along the lines of CSP failures). We've talked about this in the past and we could never come up with a good definition of what we wanted to measure and to whom it would be useful, so there hasn't been any work here. If you can present a stronger, more specific argument we'd love to reconsider this.
,
Sep 5 2016
I am currently doing some light-weight research on XSS filters and I wondered if we could add the following[1]: Add a new UseCounter Feature e.g., "XSSAuditorBlockedScript" Add this line to XSSAuditorDelegate::didBlockScript [2]: > UseCounter::count(m_document, UseCounter::XSSAuditorBlockedScript); This could give an indication about the prevalence of XSS (modulo false positives, that we can't really track). It could also guide decisions about prioritizing work on the XSSAuditor code in general. [1] I'm in fact willing to write the patch myself, but I am new to the chromium codebase and the details of UseCounter. [2] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/html/parser/XSSAuditorDelegate.cpp?q=Xssauditor+file:%5Esrc/third_party/WebKit/Source/core/html/parser/&sq=package:chromium&l=103
,
Sep 6 2016
I'm not sure that would produce any statistically useful data. What would you compare it against to get a baseline? How would you know how a specific number of events would correlate to "presence"?
,
Sep 6 2016
+aaj, who I mentioned this to earlier today. Counting via `UseCounter::count` would automagically count the occurrences of blocked script against a baseline of page views, which seems like a reasonable thing to measure. fbraun@: Are you planning on implementing an auditor-like thing in Firefox? Or are you doing general research on the prevalence of auditor-detectable XSS on the web? The goal's not clear to me, so it's hard to determine what kind of data would be helpful.
,
Sep 6 2016
,
Sep 6 2016
Ok, sorry if I seem difficult, but the hard part isn't writing the patch, it's being sure we are measuring the right thing. These take several months to roll out to a stable release before we get any data, and if it isn't useful, we repeat the whole cycle over ...
,
Sep 7 2016
> fbraun@: Are you planning on implementing an auditor-like thing in Firefox? Or are you doing general research on the prevalence of auditor-detectable XSS on the web? The goal's not clear to me, so it's hard to determine what kind of data would be helpful. There are no official plans. I (personally) would like to get a report-only auditor-like thing into Firefox at some point, to find out if there's a tangible positive user impact. > Counting via `UseCounter::count` would automagically count the occurrences of blocked script against a baseline of page views, which seems like a reasonable thing to measure. This would also allow us comparing stats between browsers, once there is progress on the Firefox end. @tsepez: No worries. Thanks for asking the hard questions :)
,
Sep 26 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/239fdac4d03219287e6f8aef8e7f372f615e2a2b commit 239fdac4d03219287e6f8aef8e7f372f615e2a2b Author: mkwst <mkwst@chromium.org> Date: Mon Sep 26 15:44:04 2016 Add usage counters to XSSAuditor. BUG= 642747 Review-Url: https://codereview.chromium.org/2330353007 Cr-Commit-Position: refs/heads/master@{#420892} [modify] https://crrev.com/239fdac4d03219287e6f8aef8e7f372f615e2a2b/third_party/WebKit/Source/core/frame/UseCounter.h [modify] https://crrev.com/239fdac4d03219287e6f8aef8e7f372f615e2a2b/third_party/WebKit/Source/core/html/parser/XSSAuditor.cpp [modify] https://crrev.com/239fdac4d03219287e6f8aef8e7f372f615e2a2b/third_party/WebKit/Source/core/html/parser/XSSAuditorDelegate.cpp [modify] https://crrev.com/239fdac4d03219287e6f8aef8e7f372f615e2a2b/tools/metrics/histograms/histograms.xml
,
Nov 18 2016
,
Nov 10 2017
,
Nov 14 2017
mkwst, tsepez - this is fixed now right thanks to c#10?
,
Nov 14 2017
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by fbr...@mozilla.com
, Aug 31 2016