Skip to content

Security Contract

Assertions

SEC-001 - One master performs at most one authentication

Contract: One OpenSSHMaster instance MUST start at most one deliberate SSH authentication. A second start, readiness loss, or failed master MUST NOT reconnect or spawn another authentication attempt.

Evidence:

SEC-002 - Secondary channels are mux-only with no fallback

Contract: Every secondary channel MUST require the existing private control socket, disable new authentication methods, set a failing proxy fallback, and keep authority and remote program values as separate process arguments.

Evidence:

SEC-003 - Forwarding and configured commands remain disabled

Contract: Initial and secondary SSH invocations MUST disable forwarding, agent sharing, X11, configured local commands, and configured remote commands. The private control directory MUST use mode 0700 and cleanup MUST remove only owned runtime state.

Evidence:

SEC-004 - Session recovery is narrow and initial-only

Contract: Linux session recovery MUST probe bounded owned user-session state, MUST recover only the documented allowlist, MUST preserve inherited non-empty values, MUST reject invalid runtime directories, and MUST pass the result only to the initial master subprocess without mutating process state.

Evidence:

SEC-005 - Diagnostics are continuously drained and bounded

Contract: Master stderr and supervised child output MUST be drained without blocking. Master retention MUST use a fixed bound; supervised child retention MUST remain bounded under the documented positive tail_bytes precondition. Public SSH errors MUST NOT expose raw stderr, executable arguments, identity files, or private paths.

Evidence:

SEC-006 - Supervision cleans only its owned process group

Contract: OwnedRemoteProcess MUST encode argv as data, start one new remote process group, and terminate only that group after owner EOF, malformed heartbeat, lease expiry, cancellation, or teardown.

Evidence:

SEC-007 - Real OpenSSH acceptance uses isolated ephemeral identity

Contract: Linux CI MUST exercise the actual library against an ephemeral loopback sshd with newly generated keys, isolated configuration and known hosts, no existing identity or agent, exactly one accepted authentication, one master connection, mux-only commands, no fallback after loss, bounded output, and selective owned-group cleanup.

Evidence: