logical.Answertypeno test imports ittype Answer = { readonly status: number; readonly headers: Readonly<Record<string, string>>; readonly setCookies: readonly string[] };What one answer said.
The judgement of what the built-in check saw: the headers and the cookie flags of one answer, and the protocol and certificate of one handshake, as findings. The rules are the plain ones that a browser and an auditor agree on: a page that is not served over TLS, no strict transport security, no content security policy, no nosniff, no protection against framing, no referrer policy, a cookie without Secure or HttpOnly, a server header that says its version; a protocol older than TLS 1.2, a certificate that is expired, expires within 30 days, is not trusted or is not for the name. Cookies are read for their names and flags only: their values are dropped before anything is kept.
import { headerFindings } from "./tls.ts";
headerFindings("https://a.example.test", { status: 200, headers: {}, setCookies: [] }).length > 0; // truelogical.Answertypeno test imports ittype Answer = { readonly status: number; readonly headers: Readonly<Record<string, string>>; readonly setCookies: readonly string[] };What one answer said.
logical.Handshaketypeno test imports ittype Handshake = { readonly protocol: string; readonly cipher: string; readonly authorized: boolean; readonly authorizationError?: string; readonly notAfter: string; readonly subject: string; readonly names: readonly string[]; readonly host: string };What one handshake said.
logical.headerFindingsfunctionno test imports itfunction headerFindings(url: string, a: Answer): readonly RawFinding[]The findings of the headers of one answer from url.
logical.tlsFindingsfunctionno test imports itfunction tlsFindings(url: string, t: Handshake, now: string): readonly RawFinding[]The findings of one handshake with url, at the instant now.
Answertypetype Answer = { readonly status: number; readonly headers: Readonly<Record<string, string>>; readonly setCookies: readonly string[] };What one answer said.
Handshaketypetype Handshake = { readonly protocol: string; readonly cipher: string; readonly authorized: boolean; readonly authorizationError?: string; readonly notAfter: string; readonly subject: string; readonly names: readonly string[]; readonly host: string };What one handshake said.
headerFindingsfunctionfunction headerFindings(url: string, a: Answer): readonly RawFinding[]The findings of the headers of one answer from url.
tlsFindingsfunctionfunction tlsFindings(url: string, t: Handshake, now: string): readonly RawFinding[]The findings of one handshake with url, at the instant now.