Implement the interlock-signed plugin.
This plugin will ensure that bundles have not been tampered with, and allow for trusted use of third-party hosting for bundles (such as a public CDN). The general implementation will be as follows:
Constraints:
- script containing hashes must be loaded as a separate script or inlined into the HTML on initial page load
- server hosting signed bundles must support XHR requests for the loaded site
Additional thoughts:
- Consider using SubtleCrypto to minimize impact to bundle size.
[1] http://www.movable-type.co.uk/scripts/sha1.html
[2] https://developer.mozilla.org/en-US/Add-ons/Code_snippets/Rosetta, line 45 of code sample
Implement the
interlock-signedplugin.This plugin will ensure that bundles have not been tampered with, and allow for trusted use of third-party hosting for bundles (such as a public CDN). The general implementation will be as follows:
alert()and set internal state such that any requests go to thenextruntime bundle providernextruntime module provideralert()<script>tag with asrcvalue ofdata:text/javascript,...[2]transformtoemitRawBundlesstepbundle.rawvalues [1]filename:SHA-1mapConstraints:
Additional thoughts:
[1] http://www.movable-type.co.uk/scripts/sha1.html
[2] https://developer.mozilla.org/en-US/Add-ons/Code_snippets/Rosetta, line 45 of code sample