Skip to content

Commit 025290d

Browse files
author
Francois Marier
committed
SRI: re-generate index.html
1 parent 13e0fe1 commit 025290d

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

specs/subresourceintegrity/index.html

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,9 @@ <h2 id="introduction">Introduction</h2>
153153
server, but also pin the <em>content</em>, ensuring that an exact representation of
154154
a resource, and <em>only</em> that representation, loads and executes.</p>
155155

156-
<p>This document specifies such a validation scheme, extending several HTML
157-
elements with an <code>integrity</code> attribute that contains a cryptographic hash of
158-
the representation of the resource the author expects to load. For instance,
156+
<p>This document specifies such a validation scheme, extending two HTML elements
157+
and the <code>fetch()</code> API with an <code>integrity</code> attribute that contains a cryptographic hash
158+
of the representation of the resource the author expects to load. For instance,
159159
an author may wish to load some framework from a shared server rather than hosting it
160160
on their own origin. Specifying that the <em>expected</em> SHA-256 hash of
161161
<code>https://example.com/example-framework.js</code>
@@ -182,7 +182,7 @@ <h3 id="goals">Goals</h3>
182182

183183
<ol>
184184
<li>
185-
<p>Compromise of the third-party service should not automatically mean
185+
<p>Compromise of a third-party service should not automatically mean
186186
compromise of every site which includes its scripts. Content authors
187187
will have a mechanism by which they can specify expectations for
188188
content they load, meaning for example that they could load a
@@ -362,7 +362,7 @@ <h3 id="cryptographic-hash-functions">Cryptographic hash functions</h3>
362362
<h4 id="agility">Agility</h4>
363363

364364
<p>Multiple sets of <a href="#dfn-integrity-metadata">integrity metadata</a> may be associated with a single
365-
resource in order to provide agility in the face of future discoveries.
365+
resource in order to provide agility in the face of future cryptographic discoveries.
366366
For example, the resource described in the previous section may be described
367367
by either of the following hash expressions:</p>
368368

@@ -385,8 +385,8 @@ <h4 id="agility">Agility</h4>
385385

386386
<p>When a hash function is determined to be insecure, user agents SHOULD deprecate
387387
and eventually remove support for integrity validation using that hash
388-
function. User agents MAY check the validity of hashes which use a deprecated
389-
function.</p>
388+
function. User agents MAY check the validity of responses using a digest based on
389+
a deprecated function.</p>
390390

391391
<p>To allow authors to switch to stronger hash functions without being held back by older
392392
user agents, validation using unsupported hash functions acts like no integrity value
@@ -399,7 +399,7 @@ <h4 id="agility">Agility</h4>
399399
<section>
400400
<h4 id="priority">Priority</h4>
401401

402-
<p>User agents must provide a mechanism of determining the relative priority of two
402+
<p>User agents must provide a mechanism for determining the relative priority of two
403403
hash functions and return the empty string if the priority is equal. That is, if
404404
a user agent implemented a function like <dfn>getPrioritizedHashFunction(a,
405405
b)</dfn> it would return the hash function the user agent considers the most
@@ -451,12 +451,12 @@ <h4 id="is-response-eligible-for-integrity-validation">Is <var>response</var> el
451451
resources accessed over a <code>file</code> scheme URL are unlikely to be
452452
eligible for integrity checks.</p>
453453

454-
<p>One should note that being a <a href="#dfn-secure-document">secure document</a> (e.g. a document delivered
454+
<p>One should note that being a <a href="#dfn-secure-document">secure document</a> (e.g., a document delivered
455455
over HTTPS) is not necessary for the use of integrity validation. Because
456456
resource integrity is only an application level security tool, and it does not
457457
change the security state of the user agent, a <a href="#dfn-secure-document">secure document</a> is
458-
unnecessary. However, if integrity is used in other than a <a href="#dfn-secure-document">secure document</a> (e.g.
459-
a document delivered over HTTP), authors should be aware that the integrity
458+
unnecessary. However, if integrity is used in something other than a <a href="#dfn-secure-document">secure document</a>
459+
(e.g., a document delivered over HTTP), authors should be aware that the integrity
460460
provides <em>no security guarantees at all</em>. For this reason, authors should
461461
only deliver integrity metadata on a <a href="#dfn-potentially-secure-origin">potentially secure origin</a>. See
462462
<a href="#non-secure-contexts-remain-non-secure-1">Non-secure contexts remain non-secure</a> for more discussion.</p>
@@ -473,7 +473,7 @@ <h4 id="is-response-eligible-for-integrity-validation">Is <var>response</var> el
473473
<li>Return <code>false</code>.</li>
474474
</ol>
475475

476-
<p class="note">Step 3 returns <code>true</code> if the fetch was a CORS-enabled request. If the
476+
<p class="note">Step 2 returns <code>true</code> if the fetch was a CORS-enabled request. If the
477477
fetch failed the CORS checks, it won’t be available to us for integrity
478478
checking because it won’t have loaded successfully.</p>
479479

@@ -741,7 +741,7 @@ <h4 id="handling-integrity-violations">Handling integrity violations</h4>
741741
<a href="#modifications-to-fetch">Modifications to Fetch</a>.</p>
742742

743743
<p class="note">On a failed integrity check, an <code>error</code> event is thrown. Developers
744-
wishing to provide a canonical fallback resource (e.g. a resource not served
744+
wishing to provide a canonical fallback resource (e.g., a resource not served
745745
from a CDN, perhaps from a secondary, trusted, but slower source) can catch this
746746
<code>error</code> event and provide an appropriate handler to replace the
747747
failed resource with a different one.</p>
@@ -811,8 +811,8 @@ <h2 id="security-considerations">Security Considerations</h2>
811811
<section>
812812
<h3 id="non-secure-contexts-remain-non-secure">Non-secure contexts remain non-secure</h3>
813813

814-
<p><a href="#dfn-integrity-metadata">Integrity metadata</a> delivered to a context that is not a <a href="#dfn-secure-context">secure context</a>,
815-
such as an only protects an origin against a compromise of the
814+
<p><a href="#dfn-integrity-metadata">Integrity metadata</a> delivered by a context that is not a <a href="#dfn-secure-context">secure context</a>,
815+
such as an HTTP page, only protects an origin against a compromise of the
816816
server where an external resources is hosted. Network attackers can alter the
817817
digest in-flight (or remove it entirely, or do absolutely anything else to the
818818
document), just as they could alter the response the hash is meant to validate.
@@ -854,7 +854,7 @@ <h3 id="cross-origin-data-leakage">Cross-origin data leakage</h3>
854854
<p>Moreover, attackers can brute-force specific values in an otherwise
855855
static resource: consider a JSON response that looks like this:</p>
856856

857-
<pre class="example"><code>{'status': 'authenticated', 'username': 'Stephan Falken'}
857+
<pre class="example"><code>{'status': 'authenticated', 'username': 'admin'}
858858
</code></pre>
859859

860860
<p>An attacker can precompute hashes for the response with a variety of
@@ -874,8 +874,9 @@ <h2 id="acknowledgements">Acknowledgements</h2>
874874
Markham’s <a href="http://www.gerv.net/security/link-fingerprints/">Link Fingerprints</a> concept, as well as WHATWG’s <a href="https://wiki.whatwg.org/wiki/Link_Hashes">Link Hashes</a>.</p>
875875

876876
<p>A special thanks to Mike West of Google, Inc. for his invaluable contributions
877-
to the initial version of this spec. Additonally, Brad Hill, Anne van Kesteren, Mark Nottingham,
878-
Dan Veditz, Eduardo Vela, Tanvi Vyas, and Michal Zalewski provided invaluable feedback.</p>
877+
to the initial version of this spec. Additonally, Brad Hill, Anne van Kesteren,
878+
Jonathan Kingston, Mark Nottingham, Dan Veditz, Eduardo Vela, Tanvi Vyas, and
879+
Michal Zalewski provided invaluable feedback.</p>
879880

880881
</section>
881882

0 commit comments

Comments
 (0)