1- // Copyright 2022 Google LLC
1+ // Copyright 2023 Google LLC
22//
33// Licensed under the Apache License, Version 2.0 (the "License");
44// you may not use this file except in compliance with the License.
@@ -54,6 +54,58 @@ message ContinuousValidationEvent {
5454 DENY = 2 ;
5555 }
5656
57+ message CheckResult {
58+ // A scope specifier for check sets.
59+ message CheckSetScope {
60+ oneof scope {
61+ // Matches a single Kubernetes service account, e.g.
62+ // 'my-namespace:my-service-account'.
63+ // `kubernetes_service_account` scope is always more specific than
64+ // `kubernetes_namespace` scope for the same namespace.
65+ string kubernetes_service_account = 1 ;
66+
67+ // Matches all Kubernetes service accounts in the provided
68+ // namespace, unless a more specific `kubernetes_service_account`
69+ // scope already matched.
70+ string kubernetes_namespace = 2 ;
71+ }
72+ }
73+
74+ // Result of evaluating one check.
75+ enum CheckVerdict {
76+ // We should always have a verdict. This is an error.
77+ CHECK_VERDICT_UNSPECIFIED = 0 ;
78+
79+ // The check was successfully evaluated and the image did not satisfy
80+ // the check.
81+ NON_CONFORMANT = 1 ;
82+ }
83+
84+ // The index of the check set.
85+ string check_set_index = 1 ;
86+
87+ // The name of the check set.
88+ string check_set_name = 2 ;
89+
90+ // The scope of the check set.
91+ CheckSetScope check_set_scope = 3 ;
92+
93+ // The index of the check.
94+ string check_index = 4 ;
95+
96+ // The name of the check.
97+ string check_name = 5 ;
98+
99+ // The type of the check.
100+ string check_type = 6 ;
101+
102+ // The verdict of this check.
103+ CheckVerdict verdict = 7 ;
104+
105+ // User-friendly explanation of this check result.
106+ string explanation = 8 ;
107+ }
108+
57109 // The name of the image.
58110 string image = 1 ;
59111
@@ -62,6 +114,9 @@ message ContinuousValidationEvent {
62114
63115 // Description of the above result.
64116 string description = 3 ;
117+
118+ // List of check results.
119+ repeated CheckResult check_results = 4 ;
65120 }
66121
67122 // The k8s namespace of the Pod.
@@ -70,6 +125,9 @@ message ContinuousValidationEvent {
70125 // The name of the Pod.
71126 string pod = 1 ;
72127
128+ // The name of the policy.
129+ string policy_name = 8 ;
130+
73131 // Deploy time of the Pod from k8s.
74132 google.protobuf.Timestamp deploy_time = 2 ;
75133
@@ -83,9 +141,10 @@ message ContinuousValidationEvent {
83141 repeated ImageDetails images = 5 ;
84142 }
85143
86- // An event describing that the project policy is unsupported by CV.
87- message UnsupportedPolicyEvent {
88- // A description of the unsupported policy.
144+ // An event describing a user-actionable configuration issue that prevents CV
145+ // from auditing.
146+ message ConfigErrorEvent {
147+ // A description of the issue.
89148 string description = 1 ;
90149 }
91150
@@ -94,7 +153,7 @@ message ContinuousValidationEvent {
94153 // Pod event.
95154 ContinuousValidationPodEvent pod_event = 1 ;
96155
97- // Unsupported policy event.
98- UnsupportedPolicyEvent unsupported_policy_event = 2 ;
156+ // Config error event.
157+ ConfigErrorEvent config_error_event = 4 ;
99158 }
100159}
0 commit comments