IF Commons GitHub

runners/external/mod

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0005-grc-runners FR-009

The external runner (0005-grc-runners FR-009): the input is { evaluator, policy, data? } and the question is delegated to an evaluator found by id in a registry of evaluators. GRC ships none: a policy language's engine is an optional adapter that a third party registers, so that the core depends on no such engine.

Source: commons/grc/src/runners/external/mod.ts

2 of 4 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

Evaluatortypeno test imports it
type Evaluator = { readonly id: string; evaluate(policy: Json, data: Json): Promise<Result<Json, string>> };

An evaluator: its id names it in a check's input.

Evaluatorstypeno test imports it
type Evaluators = Registry<Evaluator>;

A registry of evaluators.

createEvaluatorsfunction
function createEvaluators(): Evaluators

A registry of evaluators, empty.

Imported by 9 tests of the run (9 passed, 0 failed): the library's results

externalRunnerfunction
function externalRunner(evaluators: Evaluators): Runner

The external runner over a registry of evaluators.

Imported by 9 tests of the run (9 passed, 0 failed): the library's results

Titles, headings, exports, tables, columns and requirements. Esc closes.