IF Commons GitHub

logical/records

Written to: 2 requirements: 2 proved, 0 partly, 0 failing, 0 with no test recorded. 0002-objective-evidence FR-001, 0002-objective-evidence FR-007

The records of evidence as files (0002-objective-evidence FR-001, FR-007): one JSON5 file for each record, in the folder of its framework and objective, so that Git shows each piece of evidence as its own change. Reading refuses a record that breaks the rules of FR-001: a tool never determines, a not-applicable needs a person and a reason, a validity ends after the evidence was gathered, and a source is named.

import { recordPath } from "./records.ts";
recordPath({ id: "ev-1", framework: "nist-800-171a-r2", objective: "3.1.1[a]" }); // "nist-800-171a-r2/3.1.1_a/ev-1.json5"

Source: commons/assessment/src/logical/records.ts

4 of 8 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.problemsOffunctionno test imports it
function problemsOf(e: Evidence): readonly string[]

The rules a record must keep, as problems (none where it keeps them).

logical.recordPathfunctionno test imports it
function recordPath(e: Pick<Evidence, "framework" | "id" | "objective">): string

The place of a record in a store: its framework, its objective (without the brackets) and its id.

logical.encodeRecordfunctionno test imports it
function encodeRecord(e: Evidence): string

The text of a record's file.

logical.decodeRecordfunctionno test imports it
function decodeRecord(source: string): Result<Evidence, string>

A record from the text of its file, or what is wrong with it.

problemsOffunction
function problemsOf(e: Evidence): readonly string[]

The rules a record must keep, as problems (none where it keeps them).

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

recordPathfunction
function recordPath(e: Pick<Evidence, "framework" | "id" | "objective">): string

The place of a record in a store: its framework, its objective (without the brackets) and its id.

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

encodeRecordfunction
function encodeRecord(e: Evidence): string

The text of a record's file.

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

decodeRecordfunction
function decodeRecord(source: string): Result<Evidence, string>

A record from the text of its file, or what is wrong with it.

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

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