← Back to release summary

CSP require-sri-for for scripts

Category
Security
Type
New or changed feature
Status
On hold (Chrome On hold)
Intent stage
None

WPT details: https://wpt.fyi/results/content-security-policy/tentative/require-sri-for?label=experimental&label=master&aligned

Summary

The `require-sri-for` directive gives developers the ability to assert that every resource of a given type needs to be integrity checked. If a resource of that type is attempted to be loaded without integrity metadata, that attempt will fail and trigger a CSP violation report. This intent covers the "script" value of this directive.

Motivation

Subresource-Integrity (SRI) enables developers to make sure the assets they intend to load are indeed the assets they are loading. But there's no current way for developers to be sure that all of their scripts are validated using SRI. The `require-sri-for` CSP directive would enable developers achieve that.

Standards & signals

Ecosystem

Explainers: https://github.com/w3c/webappsec-subresource-integrity/pull/129#:~:text=for%20some%20assets.-,require%2Dsri%2Dfor%20CSP%20directive,-Subresource%2DIntegrity%20

View on chromestatus.com