Written to: 2 requirements: 2 proved, 0 partly, 0 failing, 0 with no test recorded. 0003-grc-logical FR-002 , 0003-grc-logical FR-009
Making the documents that come out of a run: the findings of a set of results and the assessment that holds them. Pure: the time and the id are given.
import { findingsOf } from "./assemble.ts" ;
findingsOf ([]); // [] Source: commons/grc/src/logical/assemble.ts
1 of 6 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.findingsOffunction no test imports it function findingsOf(results: readonly (Document & { readonly check: string; readonly controls: readonly string[]; readon… (1411 characters) function findingsOf (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 ; })[], 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 (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 finding for each result that needs attention, in the order of the results; the evidence of its subject is named.
type AssessmentInput = {
readonly id: string;
readonly title: string;
readonly at: string;
readonly frameworks: … (481 characters) type AssessmentInput = {
readonly id : string ;
readonly title : string ;
readonly at : string ;
readonly frameworks : readonly Framework [];
readonly results : readonly Result [];
readonly evidence ?: readonly Evidence [];
readonly attestations ?: readonly Attestation [];
readonly exceptions ?: readonly Exception [];
readonly risks ?: readonly Risk [];
readonly checks ?: readonly Check [];
readonly policies ?: readonly Policy [];
readonly evidencePolicy ?: EvidencePolicy ;
};What an assessment is made from.
logical.assessfunction no test imports it function assess(input: AssessmentInput): Document & { readonly title: string; readonly frameworks: readonly (Document & … (5902 characters) function assess (input : AssessmentInput ): 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 ; }The assessment: the newest result of each check on each subject with the exceptions that apply at at applied, and a finding for each that needs attention.
findingsOffunction no test imports it function findingsOf(results: readonly (Document & { readonly check: string; readonly controls: readonly string[]; readon… (1411 characters) function findingsOf (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 ; })[], 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 (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 finding for each result that needs attention, in the order of the results; the evidence of its subject is named.
AssessmentInputtype no test imports it type AssessmentInput = {
readonly id: string;
readonly title: string;
readonly at: string;
readonly frameworks: … (481 characters) type AssessmentInput = {
readonly id : string ;
readonly title : string ;
readonly at : string ;
readonly frameworks : readonly Framework [];
readonly results : readonly Result [];
readonly evidence ?: readonly Evidence [];
readonly attestations ?: readonly Attestation [];
readonly exceptions ?: readonly Exception [];
readonly risks ?: readonly Risk [];
readonly checks ?: readonly Check [];
readonly policies ?: readonly Policy [];
readonly evidencePolicy ?: EvidencePolicy ;
};What an assessment is made from.
function assess(input: AssessmentInput): Document & { readonly title: string; readonly frameworks: readonly (Document & … (5902 characters) function assess (input : AssessmentInput ): 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 ; }The assessment: the newest result of each check on each subject with the exceptions that apply at at applied, and a finding for each that needs attention.
Imported by 13 tests of the run (12 passed, 0 failed): the library's results