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.Schema.Bridge

CatalogSummaryRecord — ⚪ definition

structure · source

Contract test bridge for the CEL predicate type system. Parses JSONL records exported by lean-celtype-bridge, validates structural properties of the catalog, contract, and capability vocabulary. Four record kinds: catalog_summary: aggregate counts control: per-control identity + field paths contract_field: per-field from collector-contract.yaml capability: per-capability with chain reference count

structure CatalogSummaryRecord where

ControlRecord — ⚪ definition

structure · source

structure ControlRecord where

ContractFieldRecord — ⚪ definition

structure · source

structure ContractFieldRecord where

CapabilityRec — ⚪ definition

structure · source

structure CapabilityRec where

parseSeverity — ⚪ definition

def · source

def parseSeverity : String → Option Severity
  | "info" => some .info
  | "low" => some .low
  | "medium" => some .medium
  | "high" => some .high
  | "critical" => some .critical
  | _ => none

parseControlType — ⚪ definition

def · source

def parseControlType : String → Option ControlType
  | "unsafe_state" => some .unsafeState
  | "unsafe_duration" => some .unsafeDuration
  | "unsafe_recurrence" => some .unsafeRecurrence
  | "prefix_exposure" => some .prefixExposure
  | "marker" => some .marker
  | _ => none

parseClassification — ⚪ definition

def · source

def parseClassification : String → Option Classification
  | "state_assertion" => some .stateAssertion
  | "parameterized_check" => some .parameterizedCheck
  | "absence_check" => some .absenceCheck
  | "aggregate_check" => some .aggregateCheck
  | _ => none

parseFieldType — ⚪ definition

def · source

def parseFieldType : String → Option FieldType
  | "boolean" => some .boolean
  | "string" => some .string
  | "integer" => some .integer
  | "number" => some .number
  | "list" => some .list
  | "object" => some .object
  | _ => none

parseOperator — ⚪ definition

def · source

def parseOperator : String → Option Operator
  | "eq" => some .eq
  | "ne" => some .ne
  | "gt" => some .gt
  | "lt" => some .lt
  | "gte" => some .gte
  | "lte" => some .lte
  | "missing" => some .missing
  | "present" => some .present
  | "in" => some .in
  | "list_empty" => some .listEmpty
  | "not_subset_of_field" => some .notSubsetOfField
  | "neq_field" => some .neqField
  | "not_in_field" => some .notInField
  | "contains" => some .contains
  | "any_match" => some .anyMatch
  | "any_identity_match" => some .anyIdentityMatch
  | "any_in_field" => some .anyInField
  | _ => none

getJsonStringArray — ⚪ definition

def · source

def getJsonStringArray (j : Json) (key : String) : List String

parseCatalogSummary — ⚪ definition

def · source

def parseCatalogSummary (j : Json) : Except String CatalogSummaryRecord

parseControlRecord — ⚪ definition

def · source

def parseControlRecord (j : Json) : Except String ControlRecord

parseContractFieldRecord — ⚪ definition

def · source

def parseContractFieldRecord (j : Json) : Except String ContractFieldRecord

parseCapabilityRec — ⚪ definition

def · source

def parseCapabilityRec (j : Json) : Except String CapabilityRec

checkCatalogSummary — ⚪ definition

def · source

Checks

def checkCatalogSummary (r : CatalogSummaryRecord) : Bool × String

checkControlRecord — ⚪ definition

def · source

def checkControlRecord (r : ControlRecord) : Bool × String

checkContractField — ⚪ definition

def · source

def checkContractField (r : ContractFieldRecord) : Bool × String

checkCapability — ⚪ definition

def · source

def checkCapability (r : CapabilityRec) : Bool × String

bridgeCheck — ⚪ definition

def · source

Main bridge check

def bridgeCheck (path : System.FilePath) : IO UInt32