IF Commons GitHub

logical/convert

Written to: 2 requirements: 2 proved, 0 partly, 0 failing, 0 with no test recorded. 0002-sp800-package FR-001, 0002-sp800-package FR-004

The conversion of a NIST OSCAL catalog into frameworks (0002-sp800-package FR-001, FR-004): a pure function of the catalog. For SP 800-53 and SP 800-171 the controls are the requirements that are not withdrawn, with their statement as NIST wrote it and the group (the family) as the family; the assessment objectives (SP 800-53A, SP 800-171A) are a framework of their own whose controls are the objectives that have no objective below them, so that evidence can be tied to what an assessor determines. A parameter that the text inserts is written as its label in brackets, as the printed publications do.

import { convertCatalog } from "./convert.ts";
convertCatalog({ catalog: { groups: [] } }, "800-53").requirements; // []

Source: commons/catalog-nist-sp800/src/logical/convert.ts

Mutation score of this file: 65.7% (71 of 207 changes to its code were not noticed by a test).

2 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.Catalogtypeno test imports it
type Catalog = { readonly catalog: { readonly groups?: readonly Group[]; readonly controls?: readonly Control[] } };

The part of an OSCAL document this conversion reads.

logical.OutControltypeno test imports it
type OutControl = { readonly id: string; readonly title: string; readonly statement: string; readonly family: string };

A control of a converted framework.

logical.Convertedtypeno test imports it
type Converted = { readonly requirements: readonly OutControl[]; readonly objectives: readonly OutControl[] };

What a catalog gives: the requirements and the assessment objectives.

logical.convertCatalogfunctionno test imports it
function convertCatalog(doc: Catalog, kind: "800-171" | "800-53"): Converted

The requirements and objectives of a catalog; kind says which publication it is (they label their controls differently).

Catalogtype
type Catalog = { readonly catalog: { readonly groups?: readonly Group[]; readonly controls?: readonly Control[] } };

The part of an OSCAL document this conversion reads.

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

OutControltypeno test imports it
type OutControl = { readonly id: string; readonly title: string; readonly statement: string; readonly family: string };

A control of a converted framework.

Convertedtypeno test imports it
type Converted = { readonly requirements: readonly OutControl[]; readonly objectives: readonly OutControl[] };

What a catalog gives: the requirements and the assessment objectives.

convertCatalogfunction
function convertCatalog(doc: Catalog, kind: "800-171" | "800-53"): Converted

The requirements and objectives of a catalog; kind says which publication it is (they label their controls differently).

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

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