Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Seclib.Compose.Distance

chainDistance — ⚪ definition

def · source

Distance metric: how far is a chain from firing? Go source: finding_risk.go:11-24, chain_engine.go:432

def chainDistance (chain : ChainDef) (failing : List ControlId) : Nat

classify — ⚪ definition

def · source

def classify (chain : ChainDef) (failing : List ControlId) : Exploitability

classify_exploitable_of_fires — 🟢 proved

theorem · source

theorem classify_exploitable_of_fires (chain : ChainDef) (failing : List ControlId)
    (h : chainFires chain failing) :
    classify chain failing = .exploitable

fires_of_classify_exploitable — 🟢 proved

theorem · source

theorem fires_of_classify_exploitable (chain : ChainDef) (failing : List ControlId)
    (h : classify chain failing = .exploitable) :
    chainFires chain failing

isNearMiss — ⚪ definition

def · source

def isNearMiss (chain : ChainDef) (failing : List ControlId) : Prop

— ⚪ definition

instance · source

instance (chain : ChainDef) (failing : List ControlId) :

no_nearMiss_threshold_one — 🟢 proved

theorem · source

theorem no_nearMiss_threshold_one (chain : ChainDef) (failing : List ControlId)
    (hT : chain.threshold = 1) :
    ¬ isNearMiss chain failing

chainDistance_mono — 🟢 proved

theorem · source

theorem chainDistance_mono (chain : ChainDef) (s t : List ControlId) :
    chainDistance chain (s ++ t) ≤ chainDistance chain s

Exploitability.rank — ⚪ definition

def · source

Exploitability order: exploitable < oneAway < reachable. “Closer to firing” = lower value.

def Exploitability.rank : Exploitability → Nat
  | .exploitable => 0
  | .oneAway => 1
  | .reachable => 2

classify_mono_via_distance — 🟢 proved

theorem · source

Adding failures can only move exploitability toward exploitable (never away from it). Proved via the underlying distance metric.

theorem classify_mono_via_distance (chain : ChainDef) (s t : List ControlId)
    (h : classify chain s = .exploitable) :
    classify chain (s ++ t) = .exploitable