1// Schema lifecycle: experimental | stable | deprecated
2@status("experimental")
3package gemara
4
5@go(gemara)
6
7// EvaluationLog contains the results of evaluating a set of Layer 2 controls.
8#EvaluationLog: {
9 #Log
10 metadata: type: "EvaluationLog"
11 // result is the aggregate outcome across all evaluations in this log
12 result: #Result
13 evaluations: [#ControlEvaluation, ...#ControlEvaluation] @go(Evaluations,type=[]*ControlEvaluation)
14}
15
16// ControlEvaluation contains the results of evaluating a single Layer 5 control.
17#ControlEvaluation: {
18 name: string
19 result: #Result
20 message: string
21 control: #EntryMapping
22 "assessment-logs": [#AssessmentLog, ...#AssessmentLog] @go(AssessmentLogs,type=[]*AssessmentLog)
23 // Enforce that control reference and the assessments' references match
24 // This formulation uses the control's reference if the assessment doesn't include a reference
25 "assessment-logs": [...{
26 requirement: "reference-id": (control."reference-id")
27 }]
28}
29
30// AssessmentLog contains the results of executing a single assessment procedure for a control requirement.
31#AssessmentLog: {
32 // Requirement should map to the assessment requirement for this assessment.
33 requirement: #EntryMapping
34 // Plan maps to the policy assessment plan being executed.
35 plan?: #EntryMapping @go(Plan,optional=nillable)
36 // Description provides a summary of the assessment procedure.
37 description: string
38 // Result is the overall outcome of the assessment procedure, matching the result of the last step that was run.
39 result: #Result
40 // Message provides additional context about the assessment result.
41 message: string
42 // Applicability is elevated from the Layer 2 Assessment Requirement to aid in execution and reporting.
43 applicability: [string, ...string] @go(Applicability,type=[]string)
44 // Steps are sequential actions taken as part of the assessment, which may halt the assessment if a failure occurs.
45 steps: [#AssessmentStep, ...#AssessmentStep]
46 // Steps-executed is the number of steps that were executed as part of the assessment.
47 "steps-executed"?: int @go(StepsExecuted)
48 // Start is the timestamp when the assessment began.
49 start: #Datetime
50 // End is the timestamp when the assessment concluded.
51 end?: #Datetime
52 // Recommendation provides guidance on how to address a failed assessment.
53 recommendation?: string
54 // ConfidenceLevel indicates the evaluator's confidence level in this specific assessment result.
55 "confidence-level"?: #ConfidenceLevel @go(ConfidenceLevel)
56}
57
58#AssessmentStep: string @go(-)
59
60#Result: "Not Run" | "Passed" | "Failed" | "Needs Review" | "Not Applicable" | "Unknown" @go(-)