governance.Jsontypeno test imports ittype 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.
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.
governance.Jsontypeno test imports ittype 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 itconst jsonData: Decoder<Json>A decoder of JSON data.
governance.objectOffunctionno test imports itfunction objectOf(value: Json): { readonly [key: string]: Json; } | undefinedThe members of a JSON object, or undefined where the value is not one.
governance.SEVERITIESconstno test imports itconst SEVERITIES: readonly ["info", "low", "medium", "high", "critical"]How serious.
governance.Severitytypeno test imports ittype Severity = (typeof SEVERITIES)[number];How serious.
governance.durationconstno test imports itconst duration: Decoder<string>An ISO 8601 duration.
governance.RELATIONSHIPSconstno test imports itconst 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 ittype Relationship = (typeof RELATIONSHIPS)[number];A relationship.
governance.frameworkconstno test imports itconst 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 ittype Framework = Decoded<typeof framework.decode>;A framework.
governance.crosswalkconstno test imports itconst 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 ittype Crosswalk = Decoded<typeof crosswalk.decode>;A crosswalk.
governance.catalogPackageconstno test imports itconst 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 ittype CatalogPackage = Decoded<typeof catalogPackage.decode>;A catalog package.
governance.policyconstno test imports itconst 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 ittype Policy = Decoded<typeof policy.decode>;A policy.
governance.expectationconstno test imports itconst 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 ittype Expectation = Decoded<typeof expectation>;An expectation.
governance.checkconstno test imports itconst 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 ittype Check = Decoded<typeof check.decode>;A check.
governance.MECHANISMSconstno test imports itconst MECHANISMS: readonly ["check", "gate", "review", "none"]The mechanisms of the enforcement register of Mizan, which a verification is.
governance.Mechanismtypeno test imports ittype Mechanism = (typeof MECHANISMS)[number];A mechanism.
governance.requirementconstno test imports itconst 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 ittype Requirement = Decoded<typeof requirement.decode>;A requirement.
governance.CUSTODIESconstno test imports itconst CUSTODIES: readonly ["none", "file", "managed", "hardware"]The custody of the key an attestation needs, from the weakest.
governance.Custodytypeno test imports ittype Custody = (typeof CUSTODIES)[number];A custody.
governance.evidencePolicyconstno test imports itconst 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 ittype EvidencePolicy = Decoded<typeof evidencePolicy.decode>;An evidence policy.
governance.LEVELSconstno test imports itconst LEVELS: readonly ["very-low", "low", "moderate", "high", "very-high"]The five levels of a likelihood, an impact or a risk.
governance.Leveltypeno test imports ittype Level = (typeof LEVELS)[number];A level.
governance.exceptionconstno test imports itconst 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 ittype Exception = Decoded<typeof exception.decode>;An exception.
Jsontypetype 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.
jsonDataconstno test imports itconst jsonData: Decoder<Json>A decoder of JSON data.
objectOffunctionno test imports itfunction objectOf(value: Json): { readonly [key: string]: Json; } | undefinedThe members of a JSON object, or undefined where the value is not one.
SEVERITIESconstno test imports itconst SEVERITIES: readonly ["info", "low", "medium", "high", "critical"]How serious.
Severitytypeno test imports ittype Severity = (typeof SEVERITIES)[number];How serious.
durationconstno test imports itconst duration: Decoder<string>An ISO 8601 duration.
RELATIONSHIPSconstno test imports itconst 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 ittype Relationship = (typeof RELATIONSHIPS)[number];A relationship.
frameworkconstconst 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.
Frameworktypeno test imports ittype Framework = Decoded<typeof framework.decode>;A framework.
crosswalkconstconst 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.
Crosswalktypeno test imports ittype Crosswalk = Decoded<typeof crosswalk.decode>;A crosswalk.
catalogPackageconstno test imports itconst 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 ittype CatalogPackage = Decoded<typeof catalogPackage.decode>;A catalog package.
policyconstno test imports itconst 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 ittype Policy = Decoded<typeof policy.decode>;A policy.
expectationconstno test imports itconst 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 ittype Expectation = Decoded<typeof expectation>;An expectation.
checkconstconst 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.
Checktypeno test imports ittype Check = Decoded<typeof check.decode>;A check.
MECHANISMSconstno test imports itconst MECHANISMS: readonly ["check", "gate", "review", "none"]The mechanisms of the enforcement register of Mizan, which a verification is.
Mechanismtypeno test imports ittype Mechanism = (typeof MECHANISMS)[number];A mechanism.
requirementconstno test imports itconst 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 ittype Requirement = Decoded<typeof requirement.decode>;A requirement.
CUSTODIESconstno test imports itconst CUSTODIES: readonly ["none", "file", "managed", "hardware"]The custody of the key an attestation needs, from the weakest.
Custodytypeno test imports ittype Custody = (typeof CUSTODIES)[number];A custody.
evidencePolicyconstconst 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.
EvidencePolicytypetype EvidencePolicy = Decoded<typeof evidencePolicy.decode>;An evidence policy.
LEVELSconstconst LEVELS: readonly ["very-low", "low", "moderate", "high", "very-high"]The five levels of a likelihood, an impact or a risk.
Leveltypeno test imports ittype Level = (typeof LEVELS)[number];A level.
exceptionconstconst 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.
Exceptiontypetype Exception = Decoded<typeof exception.decode>;An exception.