Dependencies & Supply Chain
medium Severity
Free Check

Subresource Integrity (SRI) Hashes

Verifies external CDN scripts and stylesheets include cryptographic hashes (integrity="sha384-...") to block CDN tampering.

Test Your Website for Subresource Integrity (SRI) Hashes

Run this check along with 90+ automated tests across your domain.

Why It Matters

If a third-party CDN (like cdnjs or unpkg) is compromised, attackers can inject malicious malware directly into your visitors’ browsers.

How We Check This

We check all <script> and <link> tags pointing to external CDNs for valid integrity attributes.

How to Fix & Implement

Copy-paste configuration blocks tailored for your web server or edge proxy.

nginx snippet
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous"></script>

Frequently Asked Questions

What happens when an SRI hash fails to match?

The browser refuses to execute the script or apply the stylesheet and throws a cryptographic integrity error in the console.