logical.requirefunctionno test imports itfunction require(m: Meta, attribute: string, test: (v: Value) => boolean, expected: string): RuleA rule that an attribute must be there and satisfy a test.
Builders and a baseline of rules (0002-policy-gate FR-006): require, forbid and oneOf make a rule from an attribute and what it must be, so a policy reads as the facts it states; the baseline is a small set that holds for any estate (nothing in the clear, nothing open to the world on an administrative port, storage encrypted, an owner named, a certificate not close to its end, an image that is not floating). Each names the controls of SP 800-53 it gives evidence for.
import { BASELINE } from "./rules.ts";
BASELINE.length > 0; // truelogical.requirefunctionno test imports itfunction require(m: Meta, attribute: string, test: (v: Value) => boolean, expected: string): RuleA rule that an attribute must be there and satisfy a test.
logical.forbidfunctionno test imports itfunction forbid(m: Meta, attribute: string, test: (v: Value) => boolean, what: string): RuleA rule that an attribute, where it is there, must not satisfy a test.
logical.oneOffunctionno test imports itfunction oneOf(m: Meta, attribute: string, allowed: readonly (string | number | boolean)[]): RuleA rule that an attribute must be one of the values.
logical.BASELINEconstno test imports itconst BASELINE: readonly Rule[]The baseline: rules that hold for any estate.
requirefunctionfunction require(m: Meta, attribute: string, test: (v: Value) => boolean, expected: string): RuleA rule that an attribute must be there and satisfy a test.
forbidfunctionfunction forbid(m: Meta, attribute: string, test: (v: Value) => boolean, what: string): RuleA rule that an attribute, where it is there, must not satisfy a test.
oneOffunctionfunction oneOf(m: Meta, attribute: string, allowed: readonly (string | number | boolean)[]): RuleA rule that an attribute must be one of the values.
BASELINEconstconst BASELINE: readonly Rule[]The baseline: rules that hold for any estate.