Skip to main content

Module genesis

Module genesis 

Source
Expand description

Genesis labeling — the initial-SID / file_contexts equivalent.

Design §1 invariant 2 + the S1 acceptance criteria: every existing object and service must carry a label before enforcement turns on. Without genesis, enabling MAC denies everything (an unlabeled object = deny). With a permissive genesis (label-everything-public), MAC is a no-op. So genesis is the security-critical bootstrap: it must be explicit, total, and audited — every static node mapped to a declared label, with NO catch-all that silently lifts coverage.

This module provides the genesis mechanism (a deterministic map from node path → label, with a completeness check). The genesis content (the actual path→label table) comes from the schema $scope/TE annotations (S3, #569) and site policy; S1 supplies the seam + the fail-closed completeness gate.

Key property: GenesisMap::resolve returns None for any path not explicitly assigned. There is deliberately no default label — an unmapped node is unlabeled, hence denied. The operator closes the gap by adding an explicit assignment, never by widening a default.

Structs§

GenesisMap
A deterministic, explicit map from a static node path to its genesis label.
GenesisReport
The result of checking genesis completeness over a known set of nodes.