Skip to content
ferkesh.HOSTING

Verify Subresource Integrity for Versioned Website Assets

SSL and Website Security 63 προβολές Markdown

Subresource Integrity lets a browser check a fetched script or stylesheet against a digest. A mismatch blocks the resource. Pinning the file and its integrity metadata to the same release is important.

Pinned asset: Stable file bytes; Metadata: Matching encoded digest; Browser check: Load or block.

Choose a stable file

On staging identify a versioned asset with known bytes. Compute the supported integrity value using an approved build process. A hexadecimal checksum is not the Base64 digest notation expected by HTML integrity metadata. Record the filename and digest format.

Test the expected response

For another origin, confirm CORS and the appropriate crossorigin attribute. Inspect the browser network and console. On your own staging fixture, check failure behavior with an intentionally mismatched digest and restore the approved metadata before continuing.

Keep URLs and hashes together

Deploy the new versioned URL and matching digest as one reviewed change. Recheck critical flows and keep the previous matching pair for rollback. If a supplier changes an unversioned asset unexpectedly, inspect the changed file before approving its bytes.

Ferkesh Tools

Official references

Last reviewed .

Ήταν χρήσιμο;

Ευχαριστίες για τα σχόλιά σας!

Χρειάζεστε ακόμη βοήθεια;

Η ομάδα υποστήριξης είναι διαθέσιμη όλο το εικοσιτετράωρο για οτιδήποτε δεν βρίσκετε στη βάση γνώσεων.