IF Commons GitHub

logical/tls

Written to: 2 requirements: 2 proved, 0 partly, 0 failing, 0 with no test recorded. 0003-scanners-tls FR-001, 0003-scanners-tls FR-002

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; // true

Source: commons/scanners/src/logical/tls.ts

4 of 8 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

logical.Answertypeno test imports it
type Answer = { readonly status: number; readonly headers: Readonly<Record<string, string>>; readonly setCookies: readonly string[] };

What one answer said.

logical.Handshaketypeno test imports it
type 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 it
function headerFindings(url: string, a: Answer): readonly RawFinding[]

The findings of the headers of one answer from url.

logical.tlsFindingsfunctionno test imports it
function tlsFindings(url: string, t: Handshake, now: string): readonly RawFinding[]

The findings of one handshake with url, at the instant now.

Answertype
type Answer = { readonly status: number; readonly headers: Readonly<Record<string, string>>; readonly setCookies: readonly string[] };

What one answer said.

Imported by 3 tests of the run (3 passed, 0 failed): the library's results

Handshaketype
type 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.

Imported by 3 tests of the run (3 passed, 0 failed): the library's results

headerFindingsfunction
function headerFindings(url: string, a: Answer): readonly RawFinding[]

The findings of the headers of one answer from url.

Imported by 3 tests of the run (3 passed, 0 failed): the library's results

tlsFindingsfunction
function tlsFindings(url: string, t: Handshake, now: string): readonly RawFinding[]

The findings of one handshake with url, at the instant now.

Imported by 3 tests of the run (3 passed, 0 failed): the library's results

Titles, headings, exports, tables, columns and requirements. Esc closes.