{"action":"created","issue":{"url":"https://api.github.com/repos/w3c/reporting/issues/4","repository_url":"https://api.github.com/repos/w3c/reporting","labels_url":"https://api.github.com/repos/w3c/reporting/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/w3c/reporting/issues/4/comments","events_url":"https://api.github.com/repos/w3c/reporting/issues/4/events","html_url":"https://github.com/w3c/reporting/issues/4","id":231601602,"number":4,"title":"Add count of reports to reduce duplication in payload","user":{"login":"ScottHelme","id":5352840,"avatar_url":"https://avatars2.githubusercontent.com/u/5352840?v=3","gravatar_id":"","url":"https://api.github.com/users/ScottHelme","html_url":"https://github.com/ScottHelme","followers_url":"https://api.github.com/users/ScottHelme/followers","following_url":"https://api.github.com/users/ScottHelme/following{/other_user}","gists_url":"https://api.github.com/users/ScottHelme/gists{/gist_id}","starred_url":"https://api.github.com/users/ScottHelme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ScottHelme/subscriptions","organizations_url":"https://api.github.com/users/ScottHelme/orgs","repos_url":"https://api.github.com/users/ScottHelme/repos","events_url":"https://api.github.com/users/ScottHelme/events{/privacy}","received_events_url":"https://api.github.com/users/ScottHelme/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-05-26T11:30:11Z","updated_at":"2017-05-26T13:26:19Z","closed_at":null,"body":"In the new reporting API could we introduce a count for the number of times a report was triggered?\r\n\r\nRight now the UA typically does de-duplication of reports to avoid sending multiple of the same POST requests. In the new reporting API I imagine a similar thing will happen and each payload will not contain duplicate reports. Whilst I understand the decision from a performance perspective, it could alter the perception of reports received when sites filter to see their 'most common report', for example. \r\n\r\nI'd suggest adding a count field the new report format:\r\n\r\n    [{\r\n      type: \"csp\",\r\n      age: 10,\r\n      url: \"https://example.com/vulnerable-page/\",\r\n      count: 42\r\n      report: {\r\n        \"blocked\": \"https://evil.com/evil.js\",\r\n\r\nThis would allow the UA to report that this particular violation is occurring with a high frequency, but without consuming the traditionally large amount of resources required to do so. "},"comment":{"url":"https://api.github.com/repos/w3c/reporting/issues/comments/304281969","html_url":"https://github.com/w3c/reporting/issues/4#issuecomment-304281969","issue_url":"https://api.github.com/repos/w3c/reporting/issues/4","id":304281969,"user":{"login":"igrigorik","id":10652,"avatar_url":"https://avatars3.githubusercontent.com/u/10652?v=3","gravatar_id":"","url":"https://api.github.com/users/igrigorik","html_url":"https://github.com/igrigorik","followers_url":"https://api.github.com/users/igrigorik/followers","following_url":"https://api.github.com/users/igrigorik/following{/other_user}","gists_url":"https://api.github.com/users/igrigorik/gists{/gist_id}","starred_url":"https://api.github.com/users/igrigorik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igrigorik/subscriptions","organizations_url":"https://api.github.com/users/igrigorik/orgs","repos_url":"https://api.github.com/users/igrigorik/repos","events_url":"https://api.github.com/users/igrigorik/events{/privacy}","received_events_url":"https://api.github.com/users/igrigorik/received_events","type":"User","site_admin":false},"created_at":"2017-05-26T13:26:19Z","updated_at":"2017-05-26T13:26:19Z","body":"> Right now the UA typically does de-duplication of reports to avoid sending multiple of the same POST requests.\r\n\r\nWhere / how is this done? \r\n\r\nDe-duplication *is* nice, but it has all kinds of unrelated implications: what does `age` report exactly (newest, oldest, random report?), ditto for timestamp, a trivial change in payload will break this logic. In terms of consumed resources, compressing the request payload would get rid of most of the byte overhead.. if they're duplicates or close."}}
{"actor":{"display_login":"igrigorik"}}