Greasy Fork is available in English.

Discussies » Greasy Fork-feedback

New feature - validation of subresource integrity hashes

§
Geplaatst: 19-09-2022

Subresource Integrity (SRI) is a security feature that enables browsers to verify that resources they fetch (for example, from a CDN) are delivered without unexpected manipulation. It works by allowing you to provide a cryptographic hash that a fetched resource must match.

- MDN

Tampermonkey supports subresource integrity in @require and @resource by providing the URLs in the following format:

// @require https://code.jquery.com/jquery-3.2.1.js#md5=09dd64a64ba840c31a812a3ca25eaeee,sha384=p7RDedFtQzvcp0/3247fDud39nqze/MUmahi6MOWjyr3WKWaMOyqhXuCT1sM9Q+l

If the code retrieved from https://code.jquery.com/jquery-3.2.1.js ever changes, Tampermonkey will refuse to load it as the hash will no longer match.

The new feature on Greasy Fork is that if you are using a @require or @resource with a subresource integrity hash in a script you post, Greasy Fork will monitor that URL and alert you if your hash stops matching the content at that URL.

Reactie plaatsen

Log in om antwoord te geven.