squirrelscan
GitHub

Security audit rules: HTTPS, headers and leaked secrets

Security audit rules: HTTPS, security headers, cookie flags, forms and leaked secrets, with links to the other categories in the Security score group.

Security is one of the four score groups on every report. This page covers transport and header hardening: HTTPS, response headers, cookie flags, form submission and secrets that reached the browser. Signs of compromise, legal compliance signals and content blocked by privacy filters are scored in the same group but documented in the categories below.

Categories

Security rules

HTTPS, headers, and safe link practices (22 rules).

Run only these rules

squirrel audit https://example.com --rule-include security

security runs this category only. Add the other categories in the group with --rule-include security,integrity,legal,blocking.

Where to start

These carry the highest severity and weight in the category.

Rules

RuleWhat it flagsSeverityScope
Auth tokens in localStorage: why a stored JWT is exposedA JWT or session token in localStorage or sessionStorage is readable by any script on the page. squirrel finds the writes in your scripts and names the key.warningPer-page
Content-Security-Policy: what to set and how to check itA missing CSP, a report-only policy or an unsafe-inline script-src leaves XSS unmitigated. squirrel parses the header and names each gap.warningSite-wide
Cookie flags: Secure, HttpOnly and SameSite on Set-CookieSameSite=None without Secure is rejected outright, and a session cookie without HttpOnly is readable by any script. squirrel parses every Set-Cookie.warningPer-page
CSP blocks your own scripts, frames and analytics endpointsA Content-Security-Policy that leaves out a host your page depends on breaks a widget or a tracker silently. squirrel matches each page’s policy against what the page loads.warningPer-page
Form action over HTTP: the insecure form submission warningA form on an HTTPS page that posts to http:// sends the data in the clear and browsers interstitial it. squirrel checks action and formaction.errorPer-page
GraphQL introspection in production: what an open schema exposesOpen introspection hands anyone a map of every type in your API. squirrel sends one read-only introspection query per endpoint and counts the types it gets back.warningSite-wide
GraphQL mutations over GET: why they open the door to CSRFA server that runs a mutation sent as a GET lets any site fire it with your visitors’ cookies. squirrel sends a no-op mutation that cannot write and checks the answer.errorSite-wide
HSTS: what Strict-Transport-Security needs to be validA missing or short Strict-Transport-Security header leaves the first request downgradeable. squirrel reads the header and checks max-age.warningSite-wide
HTTP to HTTPS redirect: how squirrel probes for itsquirrel requests the http:// version of a sample of your URLs and reports which ones redirect to HTTPS, with the status code of the first hop.warningSite-wide
HTTPS: what it means when a page is not served over HTTPSA page delivered over plain HTTP can be read and rewritten in transit. squirrel flags every crawled URL whose protocol is not https.errorPer-page
Leaked API key in client-side code: how to find oneAn API key shipped in HTML or a bundle can be read by anyone who views source. squirrel scans every page and script against 88 key patterns.errorSite-wide
Mixed content: HTTP resources on an HTTPS pageAn HTTPS page that loads a script or stylesheet over HTTP is not secure and browsers block it. squirrel lists every HTTP resource per page.errorPer-page
Permissions-Policy: what the header does and how to set itWithout a Permissions-Policy, embedded frames inherit access to camera, microphone and geolocation. squirrel reads the header once per site.infoSite-wide
Public forms without CAPTCHA: what counts as publicA contact or newsletter form with no bot protection collects spam within days. squirrel classifies forms and flags the unprotected public ones.warningPer-page
Referrer-Policy: which value to send and what leaksunsafe-url sends the full URL, query string included, to every site you link to. squirrel reads the header and flags the leaky values.infoSite-wide
rel=noopener: external target=_blank links and tabnabbingAn external link with target=_blank and an explicit rel=opener gives the opened page a handle on yours. squirrel lists every one, per page.warningPer-page
security.txt: how to publish a vulnerability disclosure contactWithout a security.txt a researcher who finds a bug has no published route to report it. squirrel checks /.well-known/security.txt against RFC 9116 and flags catch-all HTML pages.warningSite-wide
Subresource Integrity: which scripts need an integrity hashCross-origin scripts and stylesheets with no integrity hash can be swapped by a compromised CDN. squirrel lists every one, page by page.warningPer-page
Third-party cookies: which external domains a page loadsTrackers and 1x1 pixels set cookies from domains you do not control. squirrel inventories the third-party scripts, iframes and pixels per page.infoPer-page
Version-revealing headers: why Server and X-Powered-By should not name a versionA Server or X-Powered-By header with a version number tells a scanner which known vulnerabilities to try. squirrel reads five headers and flags each version it finds.warningSite-wide
X-Content-Type-Options: nosniff and why it mattersWithout nosniff a browser may execute an uploaded file as script because the bytes look like one. squirrel reads the header once per site.infoSite-wide
X-Frame-Options: how to stop your pages being framedWith no X-Frame-Options and no frame-ancestors, any site can iframe your pages and overlay them. squirrel checks both headers together.warningSite-wide

Key terms

  • Content Security Policy (CSP): A response header listing where a page may load scripts, styles, frames and other resources from, limiting what injected code can do.
  • Cookie attributes: The Secure, HttpOnly and SameSite flags on Set-Cookie that limit where a cookie is sent and whether scripts can read it.
  • GraphQL introspection: The GraphQL feature that returns the full schema on request; left on in production it maps the API for attackers.
  • HSTS: The Strict-Transport-Security header that tells browsers to use only HTTPS for a host for a set time.
  • HTTPS: HTTP over TLS, which encrypts traffic and proves the server’s identity; every page and form should use it.
  • Leaked secrets: Credentials or private keys shipped to the browser in HTML, scripts or source maps.
  • Mixed content: An HTTPS page loading scripts, styles, images or media over plain HTTP.
  • rel=noopener: A link attribute that stops a page opened with target=_blank from controlling the page that opened it (tabnabbing).
  • Security headers: HTTP response headers (CSP, HSTS, X-Content-Type-Options, X-Frame-Options, Referrer-Policy, Permissions-Policy) that tell browsers to restrict risky behaviour.
  • security.txt: A file at /.well-known/security.txt (RFC 9116) that tells researchers how to report a vulnerability.
  • Subresource Integrity (SRI): An integrity attribute holding a hash of a third-party script or stylesheet, so the browser refuses a tampered file.
  • Token storage: Where a web app keeps session or auth tokens; tokens in localStorage are readable by any script on the page.
  • Well-known URIs: Fixed paths under /.well-known/ (RFC 8615) where sites publish machine-readable files: security.txt, api-catalog, OAuth metadata and agent manifests.
  • X-Content-Type-Options: The nosniff header that stops browsers guessing a response’s type instead of trusting Content-Type.
  • X-Frame-Options: A response header that controls whether other sites may embed the page in a frame; CSP frame-ancestors is its successor.

Content flags development hosts such as localhost left in the markup. Agent experience checks what an agent can discover under /.well-known/, next to the security.txt rule here, and Links flags links from HTTPS pages to http:// destinations.

Learn more

Disable all Security rules

[rules]
disable = ["security/*"]

Type to search…

↑↓ navigate↵ openesc close