-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new_audit: use a strong HSTS policy #16257
base: main
Are you sure you want to change the base?
Conversation
… update:sample-json.
… into hsts-audit
… Also hide the result from the report UI.
…il docs are published, some text phrasings and the smoke test assertions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM! Thanks for the contributions!
/** Summary text for the results of a Lighthouse audit that evaluates the HSTS header. This is displayed if no HSTS header is deployed. "HSTS" stands for "HTTP Strict Transport Security". */ | ||
noHsts: 'No HSTS header found', | ||
/** Summary text for the results of a Lighthouse audit that evaluates the HSTS header. This is displayed if the preload directive is missing. "HSTS" stands for "HTTP Strict Transport Security". */ | ||
noPreload: 'No preload directive found', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noPreload: 'No preload directive found', | |
noPreload: 'No `preload` directive found', |
/** Summary text for the results of a Lighthouse audit that evaluates the HSTS header. This is displayed if the preload directive is missing. "HSTS" stands for "HTTP Strict Transport Security". */ | ||
noPreload: 'No preload directive found', | ||
/** Summary text for the results of a Lighthouse audit that evaluates the HSTS header. This is displayed if the includeSubDomains directive is missing. "HSTS" stands for "HTTP Strict Transport Security". */ | ||
noSubdomain: 'No includeSubDomains directive found', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noSubdomain: 'No includeSubDomains directive found', | |
noSubdomain: 'No `includeSubDomains` directive found', |
/** Summary text for the results of a Lighthouse audit that evaluates the HSTS header. This is displayed if the includeSubDomains directive is missing. "HSTS" stands for "HTTP Strict Transport Security". */ | ||
noSubdomain: 'No includeSubDomains directive found', | ||
/** Summary text for the results of a Lighthouse audit that evaluates the HSTS header. This is displayed if the max-age directive is missing. "HSTS" stands for "HTTP Strict Transport Security". */ | ||
noMaxAge: 'No max-age directive', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noMaxAge: 'No max-age directive', | |
noMaxAge: 'No `max-age` directive', |
/** Summary text for the results of a Lighthouse audit that evaluates the HSTS header. This is displayed if the max-age directive is missing. "HSTS" stands for "HTTP Strict Transport Security". */ | ||
noMaxAge: 'No max-age directive', | ||
/** Summary text for the results of a Lighthouse audit that evaluates the HSTS header. This is displayed if the provided duration for the max-age directive is too low. "HSTS" stands for "HTTP Strict Transport Security". */ | ||
lowMaxAge: 'max-age is too low', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lowMaxAge: 'max-age is too low', | |
lowMaxAge: '`max-age` is too low', |
title: 'Use a strong HSTS policy', | ||
/** Description of a Lighthouse audit that evaluates the security of a page's HSTS header. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. "HSTS" stands for "HTTP Strict Transport Security". */ | ||
description: 'Deployment of the HSTS header significantly ' + | ||
'reduces the risk of downgrading of and eavesdropping attacks on HTTP connections. ' + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'reduces the risk of downgrading of and eavesdropping attacks on HTTP connections. ' + | |
'reduces the risk of downgrading HTTP connections and eavesdropping attacks. ' + |
scoreDisplayMode: Audit.SCORING_MODES.INFORMATIVE, | ||
title: str_(UIStrings.title), | ||
description: str_(UIStrings.description), | ||
requiredArtifacts: ['devtoolsLogs', 'URL'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are only looking at the main document, this audit is only relevant to page navigations.
requiredArtifacts: ['devtoolsLogs', 'URL'], | |
requiredArtifacts: ['devtoolsLogs', 'URL'], | |
supportedModes: ['navigation'], |
Summary
Adding a new audit to Ligththouse, which detects deviations from an optimal HSTS header deployment.
Part of a larger change to introduce more similar header deployments.
Link to documentation is pending internal discussions (@adamraine FYI, either of us can update the Link here once we have the blog post done).