IF Commons GitHub

governance/kinds

Written to: 6 requirements: 6 proved, 0 partly, 0 failing, 0 with no test recorded. 0002-grc-governance FR-007, 0002-grc-governance FR-001, 0002-grc-governance FR-003, 0002-grc-governance FR-004, 0002-grc-governance FR-005, 0002-grc-governance FR-006

The documents of governance (0002-grc-governance): framework, crosswalk, policy, check, requirement, evidence policy and exception, each a kind of the envelope (0004-grc-documents), so that what varies by organization or by standard is data. Nothing here names a framework, a runner or a store: a check names a kind of runner as a string and gives it an input of JSON data.

The terms policy, check and requirement are unaligned: no outside standard defines them as this library uses them (commons 0018-standards-first). The relationships of a crosswalk are those of NIST IR 8477 (Set Theory Relationship Mapping) and a requirement's verification is a row of Mizan's enforcement register.

Source: commons/grc/src/governance/kinds.ts

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

governance.Jsontypeno test imports it
type Json = null | boolean | number | string | readonly Json[] | { readonly [key: string]: Json };

A JSON value: data a document may carry as the input of a runner, never a function or an object with behaviour.

governance.jsonDataconstno test imports it
const jsonData: Decoder<Json>

A decoder of JSON data.

governance.objectOffunctionno test imports it
function objectOf(value: Json): { readonly [key: string]: Json; } | undefined

The members of a JSON object, or undefined where the value is not one.

governance.SEVERITIESconstno test imports it
const SEVERITIES: readonly ["info", "low", "medium", "high", "critical"]

How serious.

governance.Severitytypeno test imports it
type Severity = (typeof SEVERITIES)[number];

How serious.

governance.durationconstno test imports it
const duration: Decoder<string>

An ISO 8601 duration.

governance.RELATIONSHIPSconstno test imports it
const RELATIONSHIPS: readonly ["equal", "subset-of", "superset-of", "intersects-with", "no-relationship"]

The relationships of NIST IR 8477's Set Theory Relationship Mapping.

governance.Relationshiptypeno test imports it
type Relationship = (typeof RELATIONSHIPS)[number];

A relationship.

governance.frameworkconstno test imports it
const framework: DocumentKind<Document & { readonly version: string; readonly title: string; readonly controls: readonly ObjectOf<{ id: Decoder<string>; title: Decoder<string>; statement: Decoder<string>; }, { family: Decoder<string>; }>[]; } & { readonly publisher?: string | undefined; readonly source?: string | undefined; }>

A framework: its controls, addressed by URN (controlUrn). The id of the document is the framework's slug.

governance.Frameworktypeno test imports it
type Framework = Decoded<typeof framework.decode>;

A framework.

governance.crosswalkconstno test imports it
const crosswalk: DocumentKind<Document & { readonly mappings: readonly ObjectOf<{ from: Decoder<string>; to: Decoder<string>; relationship: Decoder<"equal" | "intersects-with" | "no-relationship" | "subset-of" | "superset-of">; strength: Decoder<number>; }, { note: Decoder<string>; }>[]; } & {}>

A crosswalk: mappings between the controls of frameworks, by URN.

governance.Crosswalktypeno test imports it
type Crosswalk = Decoded<typeof crosswalk.decode>;

A crosswalk.

governance.catalogPackageconstno test imports it
const catalogPackage: DocumentKind<Document & { readonly version: string; readonly title: string; readonly source: Objec… (604 characters)
const catalogPackage: DocumentKind<Document & { readonly version: string; readonly title: string; readonly source: ObjectOf<{ publisher: Decoder<string>; edition: Decoder<string>; url: Decoder<string>; }, Record<never, never>>; readonly licence: string; readonly redistributable: boolean; readonly holds: readonly ObjectOf<{ kind: Decoder<string>; id: Decoder<string>; file: Decoder<string>; digest: Decoder<string>; }, Record<never, never>>[]; readonly sources: readonly ObjectOf<{ url: Decoder<string>; sha256: Decoder<string>; }, Record<never, never>>[]; } & { readonly notice?: string | undefined; }>

A catalog package (0008-grc-catalogs): the manifest of a folder of data that holds frameworks and crosswalks and nothing else. It says where the content came from (the publisher, the edition and the address, with the SHA-256 of each source file read), the licence, whether the content may be redistributed (a package whose content may not holds only identifiers and mappings), and the documents it holds, each by its kind, its id, its file and the SHA-256 of that file.

governance.CatalogPackagetypeno test imports it
type CatalogPackage = Decoded<typeof catalogPackage.decode>;

A catalog package.

governance.policyconstno test imports it
const policy: DocumentKind<Document & { readonly title: string; readonly scope: ObjectOf<{ platforms: Decoder<readonly s… (539 characters)
const policy: DocumentKind<Document & { readonly title: string; readonly scope: ObjectOf<{ platforms: Decoder<readonly string[]>; tags: Decoder<readonly string[]>; }, Record<never, never>>; readonly severity: "critical" | "high" | "info" | "low" | "medium"; readonly rationale: string; readonly controls: readonly string[]; readonly checks: readonly string[]; readonly owner: string; readonly review: ObjectOf<{ cadence: Decoder<string>; }, { lastReviewed: Decoder<string>; }>; } & { readonly exceptions?: readonly string[] | undefined; }>

A policy: what must be true, who owns it, and when it is reviewed.

governance.Policytypeno test imports it
type Policy = Decoded<typeof policy.decode>;

A policy.

governance.expectationconstno test imports it
const expectation: (input: unknown, path?: string) => Err<DecodeError> | Ok<ObjectOf<{ kind: Decoder<"empty">; }, Record… (573 characters)
const expectation: (input: unknown, path?: string) => Err<DecodeError> | Ok<ObjectOf<{ kind: Decoder<"empty">; }, Record<never, never>>> | Ok<ObjectOf<{ kind: Decoder<"non-empty">; }, Record<never, never>>> | Ok<ObjectOf<{ kind: Decoder<"equals">; value: Decoder<Json>; }, Record<never, never>>> | Ok<ObjectOf<{ kind: Decoder<"count">; }, { min: Decoder<number>; max: Decoder<number>; }>> | Ok<ObjectOf<{ kind: Decoder<"every">; field: Decoder<string>; op: Decoder<"eq" | "ge" | "gt" | "in" | "le" | "lt" | "matches" | "ne">; value: Decoder<Json>; }, Record<never, never>>>

What a check expects of what it observes.

governance.Expectationtypeno test imports it
type Expectation = Decoded<typeof expectation>;

An expectation.

governance.checkconstno test imports it
const check: DocumentKind<Document & { readonly ask: string; readonly expect: import("/home/runner/work/.github/.github/… (2095 characters)
const check: DocumentKind<Document & { readonly ask: string; readonly expect: import("/home/runner/work/.github/.github/commons/core/src/decode").ObjectOf<{ kind: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<"empty">; }, Record<never, never>> | import("/home/runner/work/.github/.github/commons/core/src/decode").ObjectOf<{ kind: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<"non-empty">; }, Record<never, never>> | import("/home/runner/work/.github/.github/commons/core/src/decode").ObjectOf<{ kind: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<"equals">; value: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<import("/home/runner/work/.github/.github/commons/grc/src/governance/kinds").Json>; }, Record<never, never>> | import("/home/runner/work/.github/.github/commons/core/src/decode").ObjectOf<{ kind: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<"count">; }, { min: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<number>; max: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<number>; }> | import("/home/runner/work/.github/.github/commons/core/src/decode").ObjectOf<{ kind: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<"every">; field: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<string>; op: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<"eq" | "ge" | "gt" | "in" | "le" | "lt" | "matches" | "ne">; value: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<import("/home/runner/work/.github/.github/commons/grc/src/governance/kinds").Json>; }, Record<never, never>>; readonly platforms: readonly string[]; readonly freshness: string; readonly controls: readonly string[]; readonly runner: ObjectOf<{ kind: Decoder<string>; input: Decoder<Json>; }, Record<never, never>>; } & { readonly severity?: "critical" | "high" | "info" | "low" | "medium" | undefined; }>

A check: the question, what is expected, where it applies, how fresh, and which kind of runner answers with which input.

governance.Checktypeno test imports it
type Check = Decoded<typeof check.decode>;

A check.

governance.MECHANISMSconstno test imports it
const MECHANISMS: readonly ["check", "gate", "review", "none"]

The mechanisms of the enforcement register of Mizan, which a verification is.

governance.Mechanismtypeno test imports it
type Mechanism = (typeof MECHANISMS)[number];

A mechanism.

governance.requirementconstno test imports it
const requirement: DocumentKind<Document & { readonly statement: string; readonly level: "MAY" | "MUST" | "SHOULD"; read… (488 characters)
const requirement: DocumentKind<Document & { readonly statement: string; readonly level: "MAY" | "MUST" | "SHOULD"; readonly controls: readonly string[]; readonly verification: ObjectOf<{ mechanism: Decoder<"check" | "gate" | "none" | "review">; by: Decoder<string>; }, { note: Decoder<string>; }>; } & { readonly validation?: ObjectOf<{ method: Decoder<"measure" | "review" | "scenario" | "stakeholder">; by: Decoder<string>; at: Decoder<string>; }, Record<never, never>> | undefined; }>

A requirement with its verification (a row of the enforcement register) and its validation.

governance.Requirementtypeno test imports it
type Requirement = Decoded<typeof requirement.decode>;

A requirement.

governance.CUSTODIESconstno test imports it
const CUSTODIES: readonly ["none", "file", "managed", "hardware"]

The custody of the key an attestation needs, from the weakest.

governance.Custodytypeno test imports it
type Custody = (typeof CUSTODIES)[number];

A custody.

governance.evidencePolicyconstno test imports it
const evidencePolicy: DocumentKind<Document & { readonly counts: readonly ObjectOf<{ kinds: Decoder<readonly string[]>; maxAge: Decoder<string>; }, { producers: Decoder<readonly string[]>; }>[]; readonly retention: string; readonly attesters: readonly string[]; readonly custody: "file" | "hardware" | "managed" | "none"; } & {}>

The evidence policy: what counts, how long it is kept, who may attest and with what custody of the key.

governance.EvidencePolicytypeno test imports it
type EvidencePolicy = Decoded<typeof evidencePolicy.decode>;

An evidence policy.

governance.LEVELSconstno test imports it
const LEVELS: readonly ["very-low", "low", "moderate", "high", "very-high"]

The five levels of a likelihood, an impact or a risk.

governance.Leveltypeno test imports it
type Level = (typeof LEVELS)[number];

A level.

governance.exceptionconstno test imports it
const exception: DocumentKind<Document & { readonly excuses: ObjectOf<{ type: Decoder<"check" | "control" | "policy">; r… (563 characters)
const exception: DocumentKind<Document & { readonly excuses: ObjectOf<{ type: Decoder<"check" | "control" | "policy">; ref: Decoder<string>; }, Record<never, never>>; readonly subjects: readonly string[]; readonly reason: string; readonly approvedBy: string; readonly grantedAt: string; readonly expiresAt: string; } & { readonly acceptedRisk?: ObjectOf<{ owner: Decoder<string>; level: Decoder<"high" | "low" | "moderate" | "very-high" | "very-low">; reviewBy: Decoder<string>; }, Record<never, never>> | undefined; readonly inheritable?: boolean | undefined; }>

An exception, with the risk it accepts: it expires. It excuses the entities its subjects name, and the subtenants of an entity (0012-grc-subtenants) only where inheritable is true.

governance.Exceptiontypeno test imports it
type Exception = Decoded<typeof exception.decode>;

An exception.

Jsontype
type Json = null | boolean | number | string | readonly Json[] | { readonly [key: string]: Json };

A JSON value: data a document may carry as the input of a runner, never a function or an object with behaviour.

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

jsonDataconstno test imports it
const jsonData: Decoder<Json>

A decoder of JSON data.

objectOffunctionno test imports it
function objectOf(value: Json): { readonly [key: string]: Json; } | undefined

The members of a JSON object, or undefined where the value is not one.

SEVERITIESconstno test imports it
const SEVERITIES: readonly ["info", "low", "medium", "high", "critical"]

How serious.

Severitytypeno test imports it
type Severity = (typeof SEVERITIES)[number];

How serious.

durationconstno test imports it
const duration: Decoder<string>

An ISO 8601 duration.

RELATIONSHIPSconstno test imports it
const RELATIONSHIPS: readonly ["equal", "subset-of", "superset-of", "intersects-with", "no-relationship"]

The relationships of NIST IR 8477's Set Theory Relationship Mapping.

Relationshiptypeno test imports it
type Relationship = (typeof RELATIONSHIPS)[number];

A relationship.

frameworkconst
const framework: DocumentKind<Document & { readonly version: string; readonly title: string; readonly controls: readonly ObjectOf<{ id: Decoder<string>; title: Decoder<string>; statement: Decoder<string>; }, { family: Decoder<string>; }>[]; } & { readonly publisher?: string | undefined; readonly source?: string | undefined; }>

A framework: its controls, addressed by URN (controlUrn). The id of the document is the framework's slug.

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

Frameworktypeno test imports it
type Framework = Decoded<typeof framework.decode>;

A framework.

crosswalkconst
const crosswalk: DocumentKind<Document & { readonly mappings: readonly ObjectOf<{ from: Decoder<string>; to: Decoder<string>; relationship: Decoder<"equal" | "intersects-with" | "no-relationship" | "subset-of" | "superset-of">; strength: Decoder<number>; }, { note: Decoder<string>; }>[]; } & {}>

A crosswalk: mappings between the controls of frameworks, by URN.

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

Crosswalktypeno test imports it
type Crosswalk = Decoded<typeof crosswalk.decode>;

A crosswalk.

catalogPackageconstno test imports it
const catalogPackage: DocumentKind<Document & { readonly version: string; readonly title: string; readonly source: Objec… (604 characters)
const catalogPackage: DocumentKind<Document & { readonly version: string; readonly title: string; readonly source: ObjectOf<{ publisher: Decoder<string>; edition: Decoder<string>; url: Decoder<string>; }, Record<never, never>>; readonly licence: string; readonly redistributable: boolean; readonly holds: readonly ObjectOf<{ kind: Decoder<string>; id: Decoder<string>; file: Decoder<string>; digest: Decoder<string>; }, Record<never, never>>[]; readonly sources: readonly ObjectOf<{ url: Decoder<string>; sha256: Decoder<string>; }, Record<never, never>>[]; } & { readonly notice?: string | undefined; }>

A catalog package (0008-grc-catalogs): the manifest of a folder of data that holds frameworks and crosswalks and nothing else. It says where the content came from (the publisher, the edition and the address, with the SHA-256 of each source file read), the licence, whether the content may be redistributed (a package whose content may not holds only identifiers and mappings), and the documents it holds, each by its kind, its id, its file and the SHA-256 of that file.

CatalogPackagetypeno test imports it
type CatalogPackage = Decoded<typeof catalogPackage.decode>;

A catalog package.

policyconstno test imports it
const policy: DocumentKind<Document & { readonly title: string; readonly scope: ObjectOf<{ platforms: Decoder<readonly s… (539 characters)
const policy: DocumentKind<Document & { readonly title: string; readonly scope: ObjectOf<{ platforms: Decoder<readonly string[]>; tags: Decoder<readonly string[]>; }, Record<never, never>>; readonly severity: "critical" | "high" | "info" | "low" | "medium"; readonly rationale: string; readonly controls: readonly string[]; readonly checks: readonly string[]; readonly owner: string; readonly review: ObjectOf<{ cadence: Decoder<string>; }, { lastReviewed: Decoder<string>; }>; } & { readonly exceptions?: readonly string[] | undefined; }>

A policy: what must be true, who owns it, and when it is reviewed.

Policytypeno test imports it
type Policy = Decoded<typeof policy.decode>;

A policy.

expectationconstno test imports it
const expectation: (input: unknown, path?: string) => Err<DecodeError> | Ok<ObjectOf<{ kind: Decoder<"empty">; }, Record… (573 characters)
const expectation: (input: unknown, path?: string) => Err<DecodeError> | Ok<ObjectOf<{ kind: Decoder<"empty">; }, Record<never, never>>> | Ok<ObjectOf<{ kind: Decoder<"non-empty">; }, Record<never, never>>> | Ok<ObjectOf<{ kind: Decoder<"equals">; value: Decoder<Json>; }, Record<never, never>>> | Ok<ObjectOf<{ kind: Decoder<"count">; }, { min: Decoder<number>; max: Decoder<number>; }>> | Ok<ObjectOf<{ kind: Decoder<"every">; field: Decoder<string>; op: Decoder<"eq" | "ge" | "gt" | "in" | "le" | "lt" | "matches" | "ne">; value: Decoder<Json>; }, Record<never, never>>>

What a check expects of what it observes.

Expectationtypeno test imports it
type Expectation = Decoded<typeof expectation>;

An expectation.

checkconst
const check: DocumentKind<Document & { readonly ask: string; readonly expect: import("/home/runner/work/.github/.github/… (2095 characters)
const check: DocumentKind<Document & { readonly ask: string; readonly expect: import("/home/runner/work/.github/.github/commons/core/src/decode").ObjectOf<{ kind: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<"empty">; }, Record<never, never>> | import("/home/runner/work/.github/.github/commons/core/src/decode").ObjectOf<{ kind: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<"non-empty">; }, Record<never, never>> | import("/home/runner/work/.github/.github/commons/core/src/decode").ObjectOf<{ kind: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<"equals">; value: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<import("/home/runner/work/.github/.github/commons/grc/src/governance/kinds").Json>; }, Record<never, never>> | import("/home/runner/work/.github/.github/commons/core/src/decode").ObjectOf<{ kind: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<"count">; }, { min: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<number>; max: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<number>; }> | import("/home/runner/work/.github/.github/commons/core/src/decode").ObjectOf<{ kind: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<"every">; field: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<string>; op: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<"eq" | "ge" | "gt" | "in" | "le" | "lt" | "matches" | "ne">; value: import("/home/runner/work/.github/.github/commons/core/src/decode").Decoder<import("/home/runner/work/.github/.github/commons/grc/src/governance/kinds").Json>; }, Record<never, never>>; readonly platforms: readonly string[]; readonly freshness: string; readonly controls: readonly string[]; readonly runner: ObjectOf<{ kind: Decoder<string>; input: Decoder<Json>; }, Record<never, never>>; } & { readonly severity?: "critical" | "high" | "info" | "low" | "medium" | undefined; }>

A check: the question, what is expected, where it applies, how fresh, and which kind of runner answers with which input.

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

Checktypeno test imports it
type Check = Decoded<typeof check.decode>;

A check.

MECHANISMSconstno test imports it
const MECHANISMS: readonly ["check", "gate", "review", "none"]

The mechanisms of the enforcement register of Mizan, which a verification is.

Mechanismtypeno test imports it
type Mechanism = (typeof MECHANISMS)[number];

A mechanism.

requirementconstno test imports it
const requirement: DocumentKind<Document & { readonly statement: string; readonly level: "MAY" | "MUST" | "SHOULD"; read… (488 characters)
const requirement: DocumentKind<Document & { readonly statement: string; readonly level: "MAY" | "MUST" | "SHOULD"; readonly controls: readonly string[]; readonly verification: ObjectOf<{ mechanism: Decoder<"check" | "gate" | "none" | "review">; by: Decoder<string>; }, { note: Decoder<string>; }>; } & { readonly validation?: ObjectOf<{ method: Decoder<"measure" | "review" | "scenario" | "stakeholder">; by: Decoder<string>; at: Decoder<string>; }, Record<never, never>> | undefined; }>

A requirement with its verification (a row of the enforcement register) and its validation.

Requirementtypeno test imports it
type Requirement = Decoded<typeof requirement.decode>;

A requirement.

CUSTODIESconstno test imports it
const CUSTODIES: readonly ["none", "file", "managed", "hardware"]

The custody of the key an attestation needs, from the weakest.

Custodytypeno test imports it
type Custody = (typeof CUSTODIES)[number];

A custody.

evidencePolicyconst
const evidencePolicy: DocumentKind<Document & { readonly counts: readonly ObjectOf<{ kinds: Decoder<readonly string[]>; maxAge: Decoder<string>; }, { producers: Decoder<readonly string[]>; }>[]; readonly retention: string; readonly attesters: readonly string[]; readonly custody: "file" | "hardware" | "managed" | "none"; } & {}>

The evidence policy: what counts, how long it is kept, who may attest and with what custody of the key.

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

EvidencePolicytype
type EvidencePolicy = Decoded<typeof evidencePolicy.decode>;

An evidence policy.

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

LEVELSconst
const LEVELS: readonly ["very-low", "low", "moderate", "high", "very-high"]

The five levels of a likelihood, an impact or a risk.

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

Leveltypeno test imports it
type Level = (typeof LEVELS)[number];

A level.

exceptionconst
const exception: DocumentKind<Document & { readonly excuses: ObjectOf<{ type: Decoder<"check" | "control" | "policy">; r… (563 characters)
const exception: DocumentKind<Document & { readonly excuses: ObjectOf<{ type: Decoder<"check" | "control" | "policy">; ref: Decoder<string>; }, Record<never, never>>; readonly subjects: readonly string[]; readonly reason: string; readonly approvedBy: string; readonly grantedAt: string; readonly expiresAt: string; } & { readonly acceptedRisk?: ObjectOf<{ owner: Decoder<string>; level: Decoder<"high" | "low" | "moderate" | "very-high" | "very-low">; reviewBy: Decoder<string>; }, Record<never, never>> | undefined; readonly inheritable?: boolean | undefined; }>

An exception, with the risk it accepts: it expires. It excuses the entities its subjects name, and the subtenants of an entity (0012-grc-subtenants) only where inheritable is true.

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

Exceptiontype
type Exception = Decoded<typeof exception.decode>;

An exception.

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

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