Written to: 3 requirements: 3 proved, 0 partly, 0 failing, 0 with no test recorded. 0006-machine-probe-grc FR-001 , 0006-machine-probe-grc FR-002 , 0006-machine-probe-grc FR-003
The policies of the probe as evidence for controls (0006-machine-probe-grc ): what the policy pack found on each machine becomes the results of grc, each for the controls the policy cites that a framework has, and each policy becomes a check that asks one question of a machine and is fresh for a day. A machine that was never observed is in scope for every policy and shows none of them: a gap for each, never a pass. Pure: the framework is given as the identifiers of its controls.
import { resultsFor } from "./grc.ts" ;
resultsFor ([], { id: "nist-800-53" , version: "5.2.0" , controls: ["SC-28" ] }, "2026-11-21T00:00:00Z" ); // { kind: "ok", value: { results: [], checks: [] } } Source: commons/machine-probe/src/logical/grc.ts
3 of 12 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.
logical.PolicyRowtype no test imports it type PolicyRow = { readonly id : string ; readonly status : "pass" | "fail" | "warn" | "accepted" | "waiting" ; readonly controls : readonly string []; readonly detail : string };One policy's finding for one machine, as the check of an asset gives it.
logical.AssetPoliciestype no test imports it type AssetPolicies = { readonly asset : string ; readonly observedAt : string | null ; readonly rows : readonly PolicyRow [] };What was found on one machine: when it was observed (nothing where it never was) and each policy's finding.
type FrameworkControls = { readonly id : string ; readonly version : string ; readonly controls : Iterable <string > };The framework the controls are of: its identifier, its version and the identifiers of its controls.
logical.Evidencetype no test imports it type Evidence = { readonly results : readonly Outcome []; readonly checks : readonly Check [] };The results and the checks.
logical.urnOfconst no test imports it const urnOf : (f : Pick <FrameworkControls , "id" | "version" >, control : string ) => string The URN of a control of a framework, as grc writes it.
logical.resultsForfunction no test imports it function resultsFor (assets : readonly AssetPolicies [], framework : FrameworkControls , now : string ): Result <Evidence , string >The results and checks of what the probes found, for the controls of one framework, at an instant.
PolicyRowtype no test imports it type PolicyRow = { readonly id : string ; readonly status : "pass" | "fail" | "warn" | "accepted" | "waiting" ; readonly controls : readonly string []; readonly detail : string };One policy's finding for one machine, as the check of an asset gives it.
type AssetPolicies = { readonly asset : string ; readonly observedAt : string | null ; readonly rows : readonly PolicyRow [] };What was found on one machine: when it was observed (nothing where it never was) and each policy's finding.
Imported by 3 tests of the run (3 passed, 0 failed): the library's results
FrameworkControlstype no test imports it type FrameworkControls = { readonly id : string ; readonly version : string ; readonly controls : Iterable <string > };The framework the controls are of: its identifier, its version and the identifiers of its controls.
Evidencetype no test imports it type Evidence = { readonly results : readonly Outcome []; readonly checks : readonly Check [] };The results and the checks.
const urnOf : (f : Pick <FrameworkControls , "id" | "version" >, control : string ) => string The URN of a control of a framework, as grc writes it.
Imported by 3 tests of the run (3 passed, 0 failed): the library's results
function resultsFor (assets : readonly AssetPolicies [], framework : FrameworkControls , now : string ): Result <Evidence , string >The results and checks of what the probes found, for the controls of one framework, at an instant.
Imported by 3 tests of the run (3 passed, 0 failed): the library's results