This addon edits the CSP header(s) to include a missing 'report-sample' for certain directives if a report-uri endpoint is included.

Latest Version

Version
1.2
Update
November 24, 2019
Size
8.03KiB
Developer
Category
Users
1
Rating
0 ★
Manifest Version
2
Web Store Status
Languages Support
English (UK)
See more
Permissions
WebRequest

WebRequestBlocking
See more

Report-Sample-Injector Extension

This addon edits incoming CSP header(s) to include the 'report-sample' value for the 'script-src', 'script-src-elem', 'script-src-attr', 'style-src', 'style-src-elem', and 'style-src-attr' directives, only if the specific directive is present and does not include 'report-sample', and the directive 'report-uri' is present with an endpoint specified.

This addon assumes that, if a developer specifies a report-uri endpoint within the CSP, they are interested in receiving violation reports. However, without an explicit 'report-sample' value for certain directives, the reports might (the behaviour is browser-dependent at the moment) look indistinguishable for different kinds of violations (e.g., inline handlers vs. inline scripts vs. javascript URIs for script-src).

The keyword 'report-sample', when specified for certain CSP directives, makes compliant browsers include the first 40 characters of the code that caused the violation in the report that is POSTed to the report-uri endpoint.

By injecting 'report-sample' where it is missing, if report-uri is present, this addon aims to help developers understand which portion of the website code is responsible for the violation(s).
Read more

Source Manifest.json

{"update_url": "https://clients2.google.com/service/update2/crx", "manifest_version": 2, "name": "Report-Sample-Injector", "version": "1.2", "description": "This addon edits the CSP header(s) to include a missing 'report-sample' for certain directives if a report-uri endpoint is included.", "icons": { "48": "icons/rsi.png", "64": "icons/rsi.png", "96": "icons/rsi.png", "128": "icons/rsi.png" }, "permissions": [ "webRequest", "", "webRequestBlocking" ], "background": { "scripts": ["report-sample.js"] }}
Read more

Similar Extensions

icon

Custom Style Script Extension · Developer Tools 1 37 ★ 49.86KiB

icon

GrowthBook DevTools Extension · Developer Tools 1 5 ★ 694KiB

icon

Modify Header Value (HTTP Headers) Extension · Developer Tools 1 46 ★ 94.33KiB

icon

Inssman: Open-Source: Modify HTTP Request Extension · Developer Tools 1 10 ★ 3.51MiB

icon

Allow CSP: Content-Security-Policy Extension · Developer Tools 1 2 ★ 49.95KiB

icon

CSP Evaluator Extension · Developer Tools 1 29 ★ 297KiB

icon

Page Edit Extension · Developer Tools 1 31 ★ 229KiB

icon

ModHeader - Modify HTTP headers Extension · Developer Tools 1 1061 ★ 676KiB

icon

simple-modify-headers Extension · Developer Tools 1 18 ★ 144KiB

icon

Content Security Policy (CSP) Generator Extension · Developer Tools 1 14 ★ 2.65MiB

icon

Ahrefs SEO Toolbar: On-Page and SERP Tools Extension · Productivity 1 306 ★ 802KiB

icon

The Stream Detector PLUS Extension · Developer Tools 1 1 ★ 24.25KiB

icon

CSP Unblock Extension · Developer Tools 1 2 ★ 114KiB

icon

Disable-CSP Extension · Developer Tools 1 0 ★ 34.07KiB

icon

Disable Content Security Policy Extension · Developer Tools 1 5 ★ 14.05KiB

icon

Text Spacing Editor Extension · Accessibility 1 5 ★ 101KiB

icon

Canvas LMS Mods (Basic) Extension · Productivity 1 10 ★ 245KiB

icon

Code Formatter - JSON, CSS & JavaScript Extension · Developer Tools 1 15 ★ 1.38MiB

icon

FlexHeaders - Modify HTTP Headers Extension · Developer Tools 1 6 ★ 416KiB

icon

Gdoc Process Feedback Extension · Productivity 1 2 ★ 57.15KiB

icon

Sitecore Author Toolbox Extension · Productivity 1 20 ★ 7.22MiB

icon

WME Toolbox Extension · Developer Tools 1 232 ★ 905KiB

icon

ConstEdit Word Processor Extension · Productivity 1 3 ★ 3.2MiB

icon

DreamFactory API Tools Extension · Developer Tools 1 11 ★ 220KiB