core(has-hsts): account for preloaded public suffixes#17053
Open
KirtiRamchandani wants to merge 1 commit into
Open
core(has-hsts): account for preloaded public suffixes#17053KirtiRamchandani wants to merge 1 commit into
KirtiRamchandani wants to merge 1 commit into
Conversation
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.
Fixes #16680
Summary
policy: "public-suffix"as already covered for the audit'spreloadrecommendation.preloadwarning for those suffixes, while preserving the existingmax-age,includeSubDomains, and syntax checks..devplus a multi-label preloaded public suffix.Root Cause
The audit previously evaluated only the response header directives. Domains under preloaded public suffixes such as
.devare already covered by Chrome's HSTS preload policy, so requiring a site-levelpreloaddirective creates a false warning for pages likehttps://expo.dev.Tests
corepack yarn install --frozen-lockfile --ignore-scripts --network-timeout 100000https://expo.devaudit warning with a local audit-level fixture before the fixcorepack yarn mocha core/test/audits/has-hsts-test.jscorepack yarn eslint core/audits/has-hsts.js core/test/audits/has-hsts-test.jscorepack yarn type-checkcorepack yarn i18n:checksgit diff --checkAlso attempted
corepack yarn diff:sample-json; it timed out locally after 3 minutes without output.