IF Commons GitHub

logical/kinds

Written to: 2 requirements: 2 proved, 0 partly, 0 failing, 0 with no test recorded. 0003-grc-logical FR-002, 0003-grc-logical FR-001

The documents of the logical layer (0003-grc-logical): result, finding, evidence, attestation, assessment, risk, a ledger entry and an evidence manifest, each a kind of the envelope; the statuses a result may have and the order in which they join.

The status gap (a control that nothing shows) and pending (a question a person has not yet answered) are unaligned: no outside standard defines them.

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

14 of 36 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.STATUSESconstno test imports it
const STATUSES: readonly ["not-applicable", "pass", "accepted", "pending", "warn", "gap", "fail", "error"]

A status, from the one that says least to the one that says most (the order of join).

logical.Statustypeno test imports it
type Status = (typeof STATUSES)[number];

A status.

logical.resultconstno test imports it
const result: DocumentKind<Document & { readonly check: string; readonly controls: readonly string[]; readonly subject: … (627 characters)
const result: DocumentKind<Document & { readonly check: string; readonly controls: readonly string[]; readonly subject: string; readonly status: "accepted" | "error" | "fail" | "gap" | "not-applicable" | "pass" | "pending" | "warn"; readonly severity: "critical" | "high" | "info" | "low" | "medium"; readonly reason: string; readonly observedAt: string; } & { readonly value?: Json | undefined; readonly via?: string | undefined; readonly policy?: string | undefined; readonly exception?: string | undefined; readonly was?: "accepted" | "error" | "fail" | "gap" | "not-applicable" | "pass" | "pending" | "warn" | undefined; }>

What a check run on a subject gave.

logical.Resulttypeno test imports it
type Result = Decoded<typeof result.decode>;

A result.

logical.findingconstno test imports it
const finding: DocumentKind<Document & { readonly result: string; readonly check: string; readonly controls: readonly st… (506 characters)
const finding: DocumentKind<Document & { readonly result: string; readonly check: string; readonly controls: readonly string[]; readonly subject: string; readonly status: "accepted" | "error" | "fail" | "gap" | "not-applicable" | "pass" | "pending" | "warn"; readonly severity: "critical" | "high" | "info" | "low" | "medium"; readonly title: string; readonly detail: string; readonly evidence: readonly string[]; } & { readonly remediation?: string | undefined; readonly exception?: string | undefined; }>

A result that needs attention.

logical.Findingtypeno test imports it
type Finding = Decoded<typeof finding.decode>;

A finding.

logical.evidenceconstno test imports it
const evidence: DocumentKind<Document & { readonly subject: string; readonly type: string; readonly digest: string; readonly mediaType: string; readonly size: number; readonly observedAt: string; } & { readonly store?: string | undefined; readonly producer?: string | undefined; }>

What was observed, kept by digest.

logical.Evidencetypeno test imports it
type Evidence = Decoded<typeof evidence.decode>;

An item of evidence.

logical.attestationconstno test imports it
const attestation: DocumentKind<Document & { readonly subject: string; readonly check: string; readonly claim: "fail" | "pass"; readonly statement: string; readonly attester: string; readonly role: string; readonly evidence: readonly string[]; } & { readonly signature?: string | undefined; readonly signer?: string | undefined; }>

A person or key states something about a subject.

logical.Attestationtypeno test imports it
type Attestation = Decoded<typeof attestation.decode>;

An attestation.

logical.riskconstno test imports it
const risk: DocumentKind<Document & { readonly title: string; readonly description: string; readonly likelihood: "high" … (476 characters)
const risk: DocumentKind<Document & { readonly title: string; readonly description: string; readonly likelihood: "high" | "low" | "moderate" | "very-high" | "very-low"; readonly impact: "high" | "low" | "moderate" | "very-high" | "very-low"; readonly level: "high" | "low" | "moderate" | "very-high" | "very-low"; readonly treatment: "accept" | "avoid" | "mitigate" | "transfer"; readonly owner: string; readonly reviewBy: string; readonly controls: readonly string[]; } & {}>

A risk.

logical.Risktypeno test imports it
type Risk = Decoded<typeof risk.decode>;

A risk.

logical.assessmentconstno test imports it
const assessment: DocumentKind<Document & { readonly title: string; readonly frameworks: readonly (Document & { readonly… (5893 characters)
const assessment: DocumentKind<Document & { readonly title: string; readonly frameworks: readonly (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; })[]; readonly results: readonly (Document & { readonly check: string; readonly controls: readonly string[]; readonly subject: string; readonly status: "accepted" | "error" | "fail" | "gap" | "not-applicable" | "pass" | "pending" | "warn"; readonly severity: "critical" | "high" | "info" | "low" | "medium"; readonly reason: string; readonly observedAt: string; } & { readonly value?: Json | undefined; readonly via?: string | undefined; readonly policy?: string | undefined; readonly exception?: string | undefined; readonly was?: "accepted" | "error" | "fail" | "gap" | "not-applicable" | "pass" | "pending" | "warn" | undefined; })[]; readonly findings: readonly (Document & { readonly result: string; readonly check: string; readonly controls: readonly string[]; readonly subject: string; readonly status: "accepted" | "error" | "fail" | "gap" | "not-applicable" | "pass" | "pending" | "warn"; readonly severity: "critical" | "high" | "info" | "low" | "medium"; readonly title: string; readonly detail: string; readonly evidence: readonly string[]; } & { readonly remediation?: string | undefined; readonly exception?: string | undefined; })[]; readonly evidence: readonly (Document & { readonly subject: string; readonly type: string; readonly digest: string; readonly mediaType: string; readonly size: number; readonly observedAt: string; } & { readonly store?: string | undefined; readonly producer?: string | undefined; })[]; readonly attestations: readonly (Document & { readonly subject: string; readonly check: string; readonly claim: "fail" | "pass"; readonly statement: string; readonly attester: string; readonly role: string; readonly evidence: readonly string[]; } & { readonly signature?: string | undefined; readonly signer?: string | undefined; })[]; readonly exceptions: readonly (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; })[]; readonly risks: readonly (Document & { readonly title: string; readonly description: string; readonly likelihood: "high" | "low" | "moderate" | "very-high" | "very-low"; readonly impact: "high" | "low" | "moderate" | "very-high" | "very-low"; readonly level: "high" | "low" | "moderate" | "very-high" | "very-low"; readonly treatment: "accept" | "avoid" | "mitigate" | "transfer"; readonly owner: string; readonly reviewBy: string; readonly controls: readonly string[]; } & {})[]; } & { readonly policies?: readonly (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; })[] | undefined; readonly checks?: readonly (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; })[] | undefined; }>

An assessment: what was judged, with what, and what it gave, self-contained so that a serializer needs nothing else.

logical.Assessmenttypeno test imports it
type Assessment = Decoded<typeof assessment.decode>;

An assessment.

logical.ledgerEntryconstno test imports it
const ledgerEntry: DocumentKind<Document & { readonly seq: number; readonly previous: string; readonly type: string; readonly subject: string; readonly evidence: string; readonly digest: string; } & {}>

An entry of a hash-chained ledger.

logical.LedgerEntrytypeno test imports it
type LedgerEntry = Decoded<typeof ledgerEntry.decode>;

A ledger entry.

logical.evidenceManifestconstno test imports it
const evidenceManifest: DocumentKind<Document & { readonly items: readonly ObjectOf<{ digest: Decoder<string>; size: Decoder<number>; mediaType: Decoder<string>; }, Record<never, never>>[]; readonly ledgerHead: string; } & {}>

The manifest of an evidence bundle: what it holds by digest, and where the ledger stood.

logical.EvidenceManifesttypeno test imports it
type EvidenceManifest = Decoded<typeof evidenceManifest.decode>;

An evidence manifest.

STATUSESconst
const STATUSES: readonly ["not-applicable", "pass", "accepted", "pending", "warn", "gap", "fail", "error"]

A status, from the one that says least to the one that says most (the order of join).

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

Statustype
type Status = (typeof STATUSES)[number];

A status.

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

resultconst
const result: DocumentKind<Document & { readonly check: string; readonly controls: readonly string[]; readonly subject: … (627 characters)
const result: DocumentKind<Document & { readonly check: string; readonly controls: readonly string[]; readonly subject: string; readonly status: "accepted" | "error" | "fail" | "gap" | "not-applicable" | "pass" | "pending" | "warn"; readonly severity: "critical" | "high" | "info" | "low" | "medium"; readonly reason: string; readonly observedAt: string; } & { readonly value?: Json | undefined; readonly via?: string | undefined; readonly policy?: string | undefined; readonly exception?: string | undefined; readonly was?: "accepted" | "error" | "fail" | "gap" | "not-applicable" | "pass" | "pending" | "warn" | undefined; }>

What a check run on a subject gave.

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

Resulttype
type Result = Decoded<typeof result.decode>;

A result.

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

findingconst
const finding: DocumentKind<Document & { readonly result: string; readonly check: string; readonly controls: readonly st… (506 characters)
const finding: DocumentKind<Document & { readonly result: string; readonly check: string; readonly controls: readonly string[]; readonly subject: string; readonly status: "accepted" | "error" | "fail" | "gap" | "not-applicable" | "pass" | "pending" | "warn"; readonly severity: "critical" | "high" | "info" | "low" | "medium"; readonly title: string; readonly detail: string; readonly evidence: readonly string[]; } & { readonly remediation?: string | undefined; readonly exception?: string | undefined; }>

A result that needs attention.

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

Findingtypeno test imports it
type Finding = Decoded<typeof finding.decode>;

A finding.

evidenceconst
const evidence: DocumentKind<Document & { readonly subject: string; readonly type: string; readonly digest: string; readonly mediaType: string; readonly size: number; readonly observedAt: string; } & { readonly store?: string | undefined; readonly producer?: string | undefined; }>

What was observed, kept by digest.

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

Evidencetypeno test imports it
type Evidence = Decoded<typeof evidence.decode>;

An item of evidence.

attestationconst
const attestation: DocumentKind<Document & { readonly subject: string; readonly check: string; readonly claim: "fail" | "pass"; readonly statement: string; readonly attester: string; readonly role: string; readonly evidence: readonly string[]; } & { readonly signature?: string | undefined; readonly signer?: string | undefined; }>

A person or key states something about a subject.

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

Attestationtype
type Attestation = Decoded<typeof attestation.decode>;

An attestation.

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

riskconst
const risk: DocumentKind<Document & { readonly title: string; readonly description: string; readonly likelihood: "high" … (476 characters)
const risk: DocumentKind<Document & { readonly title: string; readonly description: string; readonly likelihood: "high" | "low" | "moderate" | "very-high" | "very-low"; readonly impact: "high" | "low" | "moderate" | "very-high" | "very-low"; readonly level: "high" | "low" | "moderate" | "very-high" | "very-low"; readonly treatment: "accept" | "avoid" | "mitigate" | "transfer"; readonly owner: string; readonly reviewBy: string; readonly controls: readonly string[]; } & {}>

A risk.

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

Risktype
type Risk = Decoded<typeof risk.decode>;

A risk.

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

assessmentconst
const assessment: DocumentKind<Document & { readonly title: string; readonly frameworks: readonly (Document & { readonly… (5893 characters)
const assessment: DocumentKind<Document & { readonly title: string; readonly frameworks: readonly (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; })[]; readonly results: readonly (Document & { readonly check: string; readonly controls: readonly string[]; readonly subject: string; readonly status: "accepted" | "error" | "fail" | "gap" | "not-applicable" | "pass" | "pending" | "warn"; readonly severity: "critical" | "high" | "info" | "low" | "medium"; readonly reason: string; readonly observedAt: string; } & { readonly value?: Json | undefined; readonly via?: string | undefined; readonly policy?: string | undefined; readonly exception?: string | undefined; readonly was?: "accepted" | "error" | "fail" | "gap" | "not-applicable" | "pass" | "pending" | "warn" | undefined; })[]; readonly findings: readonly (Document & { readonly result: string; readonly check: string; readonly controls: readonly string[]; readonly subject: string; readonly status: "accepted" | "error" | "fail" | "gap" | "not-applicable" | "pass" | "pending" | "warn"; readonly severity: "critical" | "high" | "info" | "low" | "medium"; readonly title: string; readonly detail: string; readonly evidence: readonly string[]; } & { readonly remediation?: string | undefined; readonly exception?: string | undefined; })[]; readonly evidence: readonly (Document & { readonly subject: string; readonly type: string; readonly digest: string; readonly mediaType: string; readonly size: number; readonly observedAt: string; } & { readonly store?: string | undefined; readonly producer?: string | undefined; })[]; readonly attestations: readonly (Document & { readonly subject: string; readonly check: string; readonly claim: "fail" | "pass"; readonly statement: string; readonly attester: string; readonly role: string; readonly evidence: readonly string[]; } & { readonly signature?: string | undefined; readonly signer?: string | undefined; })[]; readonly exceptions: readonly (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; })[]; readonly risks: readonly (Document & { readonly title: string; readonly description: string; readonly likelihood: "high" | "low" | "moderate" | "very-high" | "very-low"; readonly impact: "high" | "low" | "moderate" | "very-high" | "very-low"; readonly level: "high" | "low" | "moderate" | "very-high" | "very-low"; readonly treatment: "accept" | "avoid" | "mitigate" | "transfer"; readonly owner: string; readonly reviewBy: string; readonly controls: readonly string[]; } & {})[]; } & { readonly policies?: readonly (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; })[] | undefined; readonly checks?: readonly (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; })[] | undefined; }>

An assessment: what was judged, with what, and what it gave, self-contained so that a serializer needs nothing else.

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

Assessmenttype
type Assessment = Decoded<typeof assessment.decode>;

An assessment.

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

ledgerEntryconstno test imports it
const ledgerEntry: DocumentKind<Document & { readonly seq: number; readonly previous: string; readonly type: string; readonly subject: string; readonly evidence: string; readonly digest: string; } & {}>

An entry of a hash-chained ledger.

LedgerEntrytype
type LedgerEntry = Decoded<typeof ledgerEntry.decode>;

A ledger entry.

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

evidenceManifestconstno test imports it
const evidenceManifest: DocumentKind<Document & { readonly items: readonly ObjectOf<{ digest: Decoder<string>; size: Decoder<number>; mediaType: Decoder<string>; }, Record<never, never>>[]; readonly ledgerHead: string; } & {}>

The manifest of an evidence bundle: what it holds by digest, and where the ledger stood.

EvidenceManifesttype
type EvidenceManifest = Decoded<typeof evidenceManifest.decode>;

An evidence manifest.

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

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