<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Implement Subresource Integrity (SRI)"
href="https://bugs.webkit.org/show_bug.cgi?id=148363">148363</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Implement Subresource Integrity (SRI)
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>WebKit Nightly Build
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>URL</th>
<td>https://w3c.github.io/webappsec/specs/subresourceintegrity/
</td>
</tr>
<tr>
<th>OS</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>Normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P2
</td>
</tr>
<tr>
<th>Component</th>
<td>WebKit Misc.
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mike@w3.org
</td>
</tr></table>
<p>
<div>
<pre>The SRI specification "defines a mechanism by which user agents may verify that a fetched resource has been delivered without unexpected manipulation" using a validation scheme and "extending several HTML elements with an integrity attribute that contains a cryptographic hash of the representation of the resource the author expects to load." <a href="http://w3c.github.io/webappsec/specs/subresourceintegrity/">http://w3c.github.io/webappsec/specs/subresourceintegrity/</a>
Example: If a document loads some JavaScript library code from a shared server at <a href="https://example.com/example-framework.js">https://example.com/example-framework.js</a> rather than from the same own origin as the document, the document can specify the expected SHA-256 hash of <a href="https://example.com/example-framework.js">https://example.com/example-framework.js</a> (e.g., C6CB9UYIS9UJeqinPHWTHVqh/E1uhG5Twh+Y5qFQmYg=) and the UA, before executing the JavaScript, can verify that the data matches that expected hash.
<script src="<a href="https://example.com/example-framework.js">https://example.com/example-framework.js</a>"
integrity="sha256-C6CB9UYIS9UJeqinPHWTHVqh/E1uhG5Twh+Y5qFQmYg="
crossorigin="anonymous"></script>
The mechanism can also be used for resources loaded through <link> elements.
As far as support in other UAs, Chrome has supported Subresource Integrity since v45, and Firefox has since v43. <a href="https://developer.mozilla.org/en/docs/Web/HTML/Element/script#Browser_compatibility">https://developer.mozilla.org/en/docs/Web/HTML/Element/script#Browser_compatibility</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>