Skip to content

Connection and security audit rules

View as Markdown

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

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.