Connection and security audit rules
Sonjoo groups 26 checks under Connection and security (security). Select this category with sonjoo audit <url> --categories security, or pass the category ID in an HTTP audit request.
This category has weight 8 in the overall audit score when it has scored results. Sonjoo normalizes category weights over the categories with scored results.
All audit categories · Rule settings and interpretation
security-https
Section titled “security-https”Report whether the collected page URL has an HTTPS scheme.
Inputs. A document collected for audit.
Evidence. Collected URL and protocol.
Base scoring weight 10 when measured.
security-https-redirect
Section titled “security-https-redirect”Probe the HTTP counterpart for a redirect to an HTTPS URL.
Inputs. The HTTP version of the entry responds to an independent HEAD probe.
Evidence. Status code and Location of the HTTP response.
Base scoring weight 8 when measured.
security-hsts
Section titled “security-hsts”Validate HTTPS HSTS setting and flag lifetimes weaker than the Sonjoo recommendation.
Inputs. A document collected for audit.
Evidence. HSTS max-age, subdomain and preload tokens.
Base scoring weight 6 when measured.
security-csp
Section titled “security-csp”Check for an enforced Content Security Policy with baseline directives or applicable fallback.
Inputs. The collected response header fields are available. Meta-delivered policies are outside this response-header check.
Evidence. Directives, mode and omitted recommendations.
Base scoring weight 4 when measured.
security-x-frame-options
Section titled “security-x-frame-options”Review whether the response provides a valid explicit frame policy via X-Frame-Options or CSP frame-ancestors.
Inputs. A document collected for audit.
Evidence. Header value, effective CSP directive presence.
Base scoring weight 5 when measured.
security-x-content-type-options
Section titled “security-x-content-type-options”Check for nosniff in the X-Content-Type-Options response field.
Inputs. A document collected for audit.
Evidence. HTTP field value or affected URL.
Base scoring weight 4 when measured.
security-external-links
Section titled “security-external-links”Review explicit opener policy on external new-window anchors.
Inputs. A document collected for audit.
Evidence. Source href and sampled opener relation flags.
Base scoring weight 3 when measured.
security-form-https
Section titled “security-form-https”Find form submissions whose resolved action would transmit data through HTTP.
Inputs. A document collected for audit.
Evidence. Action, submission method and source page scheme.
Base scoring weight 5 when measured.
security-mixed-content
Section titled “security-mixed-content”Detect insecure HTTP subresource references from HTTPS documents and distinguish active resource classes.
Inputs. A document collected for audit.
Evidence. Affected resource URLs/types and active-resource classification.
Base scoring weight 8 when measured.
security-permissions-policy
Section titled “security-permissions-policy”Check for current Permissions-Policy syntax and warn on missing or legacy-only policy.
Inputs. A document collected for audit.
Evidence. Feature names and field source.
Base scoring weight 2 when measured.
security-referrer-policy
Section titled “security-referrer-policy”Recognize current referrer policy tokens and warn on invalid or overly permissive policy.
Inputs. A document collected for audit.
Evidence. Policy source, effective policy, and recommendation status.
Base scoring weight 2 when measured.
security-leaked-secrets
Section titled “security-leaked-secrets”Flag explicitly recognized credential-shaped markers in public markup without exposing matched credential text in evidence.
Inputs. A document collected for audit.
Evidence. Matched type, redacted token, and sanitized context.
Base scoring weight 10 when measured.
security-password-http
Section titled “security-password-http”Identify password inputs embedded in HTTP documents.
Inputs. A document collected for audit.
Evidence. Password input count and page transport scheme.
Base scoring weight 10 when measured.
security-protocol-relative
Section titled “security-protocol-relative”Flag network-path references in subresources as potential scheme inheritance review.
Inputs. A document collected for audit.
Evidence. Affected tag and reference count.
Base scoring weight 6 when measured.
security-ssl-expiry
Section titled “security-ssl-expiry”Report the verified leaf certificate expiry and flag the elapsed or near-expiry window.
Inputs. The HTTPS fetch completed. An independent TLS handshake uses the same trust roots and address policy before evidence is interpreted.
Evidence. The observed leaf certificate expiry in UTC epoch milliseconds and the time remaining.
Base scoring weight 8 when measured.
security-ssl-protocol
Section titled “security-ssl-protocol”Observe the negotiated TLS version for the audited HTTPS endpoint.
Inputs. The HTTPS fetch completed. An independent TLS handshake uses the same trust roots and address policy before evidence is interpreted.
Evidence. The TLS version returned by the verified handshake.
Base scoring weight 6 when measured.
security-cookie-flags
Section titled “security-cookie-flags”Review Secure, HttpOnly and SameSite attributes, distinguish browser rejection from softer missing controls.
Inputs. The response declares Set-Cookie headers. Secure transport findings depend on the URL scheme and cookie attributes.
Evidence. Cookie names and flag counts without exposing cookie values.
Base scoring weight 10 when measured.
security-cookie-lifetime
Section titled “security-cookie-lifetime”Report persistent cookie lifetimes that exceed the documented browser cap.
Inputs. The response declares cookie lifetimes through Set-Cookie headers.
Evidence. Cookie name, cap, and lifetime length.
Base scoring weight 4 when measured.
security-coop
Section titled “security-coop”Review explicit cross-origin opener isolation policy in the top-level response.
Inputs. A document collected for audit.
Evidence. Header value or missing-policy evidence.
Base scoring weight 3 when measured.
security-csp-xss
Section titled “security-csp-xss”Grade observable script policy restrictions in an enforced CSP; report-only cannot earn an enforced-policy pass.
Inputs. The collected response header fields are available. Meta-delivered policies are outside this response-header check.
Evidence. Enforcement mode, script expressions, and categorized issues.
Base scoring weight 6 when measured.
security-info-disclosure
Section titled “security-info-disclosure”Identify response fields that expose framework or software version information.
Inputs. A document collected for audit.
Evidence. Header names and disclosure values.
Base scoring weight 3 when measured.
security-paste-blocking
Section titled “security-paste-blocking”Identify explicit blocking of paste on input or textarea in inline handlers.
Inputs. A document collected for audit.
Evidence. Affected control and handler evidence.
Base scoring weight 2 when measured.
security-trusted-types
Section titled “security-trusted-types”Check whether enforced CSP requires Trusted Types for script sinks; a named policy or report-only field alone is insufficient.
Inputs. The collected response header fields are available. Meta-delivered policies are outside this response-header check.
Evidence. Enforcement indicator and named policy directive presence.
Base scoring weight 2 when measured.
security-sri
Section titled “security-sri”Check that static cross-origin scripts and stylesheets declare an integrity attribute.
Inputs. A document collected for audit.
Evidence. Asset kind and resolved resource URL.
Base scoring weight 3 when measured.
security-obfuscated-script
Section titled “security-obfuscated-script”Flag inline script that combines an opaque character distribution with decode or evaluation markers.
Inputs. A document collected for audit.
Evidence. Inline script length and entropy estimate.
Base scoring weight 4 when measured.
security-brand-impersonation
Section titled “security-brand-impersonation”Review explicit third-party sign-in labels paired with an unexpected destination host.
Inputs. A document collected for audit.
Evidence. Visible label and observed host.
Base scoring weight 6 when measured.
