Each Monday, checks the sites you list for the browser protections they should switch on, and emails what is missing and how to fix it.
Uses
Gmail
OpenAI
Check your websites' security settings every week
siteList to blank.Set siteList to blank.reportEmail to blank.Set reportEmail to blank.siteList with
replaced by "Split siteList with
replaced by
with , replaced by
by a new line and save it as siteEntries.siteReports to an empty list.Set siteReports to an empty list.unreachable to an empty list.Set unreachable to an empty list.sitesWithGaps to 0.Set sitesWithGaps to 0.siteEntry in siteEntries:For each siteEntry in siteEntries:siteEntry and save it as entry.Trim siteEntry and save it as entry.entry is emptyIf entry is emptyYes
No
No steps
http:// with in entry with https:// replaced by (ignoring case) (ignoring case) and save it as siteHost.Replace http:// with in entry with https:// replaced by (ignoring case) (ignoring case) and save it as siteHost.siteHost is emptyIf siteHost is emptyYes
No
No steps
checkUrl to http://@siteHost.Set checkUrl to http://@siteHost.reached to false.Set reached to false.finalUrl to blank.Set finalUrl to blank.responseStatus to 0.Set responseStatus to 0.responseHeaders to an empty record.Set responseHeaders to an empty record.fetchErrorIf a step below fails, save the error as fetchErrorTry
checkUrl and save it as response.Fetch checkUrl and save it as response.response.url and save it as finalUrl.Trim response.url and save it as finalUrl.responseStatus to response.status.Change responseStatus to response.status.responseHeaders to response.headers.Change responseHeaders to response.headers.reached to true.Change reached to true.On error
checkUrl with the site address in fetchError.message and save it as safeReason.Replace checkUrl with the site address in fetchError.message and save it as safeReason.siteHost - could not be reached: safeReason to the end of unreachable and save it as unreachable.Add siteHost - could not be reached: safeReason to the end of unreachable and save it as unreachable.reached isn't yesIf reached isn't yesYes
No
No steps
missingHeaders to an empty list.Set missingHeaders to an empty list.responseHeaders["strict-transport-security"] is emptyIf responseHeaders["strict-transport-security"] is emptyYes
Strict-Transport-Security to the end of missingHeaders and save it as missingHeaders.Add Strict-Transport-Security to the end of missingHeaders and save it as missingHeaders.No
No steps
responseHeaders["content-security-policy"] is emptyIf responseHeaders["content-security-policy"] is emptyYes
Content-Security-Policy to the end of missingHeaders and save it as missingHeaders.Add Content-Security-Policy to the end of missingHeaders and save it as missingHeaders.No
No steps
responseHeaders["x-frame-options"] is emptyIf responseHeaders["x-frame-options"] is emptyYes
X-Frame-Options to the end of missingHeaders and save it as missingHeaders.Add X-Frame-Options to the end of missingHeaders and save it as missingHeaders.No
No steps
responseHeaders["x-content-type-options"] is emptyIf responseHeaders["x-content-type-options"] is emptyYes
X-Content-Type-Options to the end of missingHeaders and save it as missingHeaders.Add X-Content-Type-Options to the end of missingHeaders and save it as missingHeaders.No
No steps
responseHeaders["referrer-policy"] is emptyIf responseHeaders["referrer-policy"] is emptyYes
Referrer-Policy to the end of missingHeaders and save it as missingHeaders.Add Referrer-Policy to the end of missingHeaders and save it as missingHeaders.No
No steps
finalUrl starts with https:// (ignoring case) and save it as redirectsToHttps.Check whether finalUrl starts with https:// (ignoring case) and save it as redirectsToHttps.httpsLine to HTTPS: the plain http address is sent on to finalUrl.Set httpsLine to HTTPS: the plain http address is sent on to finalUrl.redirectsToHttps isn't yesIf redirectsToHttps isn't yesYes
httpsLine to HTTPS: the plain http address was NOT sent on to https - it ended at finalUrl.Change httpsLine to HTTPS: the plain http address was NOT sent on to https - it ended at finalUrl.No
No steps
headerLine to Security headers: all five present.Set headerLine to Security headers: all five present.missingHeaders isn't emptyIf missingHeaders isn't emptyYes
headerLine to Missing security headers: missingHeaders joined by , .Change headerLine to Missing security headers: missingHeaders joined by , .No
No steps
serverBanner to responseHeaders.server.Set serverBanner to responseHeaders.server.serverLine to Server header: not sent.Set serverLine to Server header: not sent.serverBanner isn't emptyIf serverBanner isn't emptyYes
serverLine to Server header: serverBanner.Change serverLine to Server header: serverBanner.No
No steps
missingHeaders isn't empty or redirectsToHttps isn't yesIf missingHeaders isn't empty or redirectsToHttps isn't yesYes
sitesWithGaps.Add 1 to sitesWithGaps.No
No steps
siteHost (read at finalUrl, status responseStatus)Add siteHost (read at finalUrl, status responseStatus)
httpsLine
headerLine
serverLine to the end of siteReports and save it as siteReports.siteReports is empty and unreachable is emptyIf siteReports is empty and unreachable is emptyYes
No
No steps
siteReports with a blank line and save it as findings.Join siteReports with a blank line and save it as findings.unreachable isn't emptyIf unreachable isn't emptyYes
findings to findingsChange findings to findings
Could not be checked:
unreachable joined by a new line.No
No steps
explanationText to blank.Set explanationText to blank.explainErrorIf a step below fails, save the error as explainErrorTry
findings'. Save it as aiAnswer.aiAnswer.response_text and save it as explanationText.Trim aiAnswer.response_text and save it as explanationText.On error
explainError.message.Show in the output: The readings could not be written up, so the email carries them as they are. explainError.message.emailIntro to Checked the length of siteReports of your sites. sitesWithGaps have something missing.Set emailIntro to Checked the length of siteReports of your sites. sitesWithGaps have something missing.
Every site was read with one ordinary page request - the same headers a visitor's browser receives. Nothing was scanned or probed.emailBody to emailIntro plus findings.Set emailBody to emailIntro plus findings.explanationText isn't emptyIf explanationText isn't emptyYes
emailBody to emailIntro@explanationTextChange emailBody to emailIntro@explanationText
---
What each site returned
findings.No
No steps
reportEmail.Send an email to reportEmail.
Subject: Website security headers: sitesWithGaps of the length of siteReports sites have gapsemailBody