Repository navigation
Conversation
A single same-origin script with `integrity` earned `SriImplementedAndAllScriptsLoadedSecurely` (+5), even when other same-origin scripts lacked SRI. It also mislabeled pages whose external scripts all use SRI over HTTPS as loading all scripts from a similar origin. Decide the result after the loop: require SRI on every same-origin script for the bonus, and report `SriImplementedAndExternalScriptsLoadedSecurely` whenever foreign scripts are present.
caugner
force-pushed
the
464-sri-bonus-requires-all-scripts
branch
from
November 24, 2026 17:38
cda7e46 to
4c4b191
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Update the
subresource-integrityanalyzer to grant the same-origin SRI bonus only when every same-origin script uses SRI:SriImplementedAndAllScriptsLoadedSecurely(+5) when only some same-origin scripts have anintegrityattribute.SriImplementedAndExternalScriptsLoadedSecurelyinstead ofSriImplementedAndAllScriptsLoadedSecurelywhen external scripts are present and all use SRI over HTTPS (same +5).Motivation
Prevent a single same-origin script with SRI from earning the bonus for the whole page, and ensure the reported result matches the scripts actually loaded.
Additional details
/a.jswith SRI +/b.jswithoutsri-implemented-and-all-scripts-loaded-securely(+5)sri-not-implemented-but-all-scripts-loaded-from-secure-origin(0)/a.jswith SRI +https://cdn/b.jswith SRIsri-implemented-and-all-scripts-loaded-securely(+5)sri-implemented-and-external-scripts-loaded-securely(+5)Related issues and pull requests
Fixes #675.
Depends on: