@@ -130,18 +130,54 @@ message VulnerabilityReport {
130
130
repeated Item items = 6 ;
131
131
}
132
132
133
+ // Severity levels for vulnerabilities.
134
+ enum VulnerabilitySeverityLevel {
135
+ // Default SeverityLevel. This value is unused.
136
+ VULNERABILITY_SEVERITY_LEVEL_UNSPECIFIED = 0 ;
137
+
138
+ // Vulnerability has no severity level.
139
+ NONE = 1 ;
140
+
141
+ // Vulnerability severity level is minimal. This is level below the low
142
+ // severity level.
143
+ MINIMAL = 2 ;
144
+
145
+ // Vulnerability severity level is low. This is level below the medium
146
+ // severity level.
147
+ LOW = 3 ;
148
+
149
+ // Vulnerability severity level is medium. This is level below the high
150
+ // severity level.
151
+ MEDIUM = 4 ;
152
+
153
+ // Vulnerability severity level is high. This is level below the critical
154
+ // severity level.
155
+ HIGH = 5 ;
156
+
157
+ // Vulnerability severity level is critical. This is the highest severity
158
+ // level.
159
+ CRITICAL = 6 ;
160
+ }
161
+
133
162
// Output only. The `vulnerabilityReport` API resource name.
134
163
//
135
164
// Format:
136
165
// `projects/{project_number}/locations/{location}/instances/{instance_id}/vulnerabilityReport`
137
166
string name = 1 [(google.api.field_behavior ) = OUTPUT_ONLY ];
138
167
139
168
// Output only. List of vulnerabilities affecting the VM.
140
- repeated Vulnerability vulnerabilities = 2 [(google.api.field_behavior ) = OUTPUT_ONLY ];
141
-
142
- // Output only. The timestamp for when the last vulnerability report was generated for the
143
- // VM.
144
- google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior ) = OUTPUT_ONLY ];
169
+ repeated Vulnerability vulnerabilities = 2
170
+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
171
+
172
+ // Output only. The timestamp for when the last vulnerability report was
173
+ // generated for the VM.
174
+ google.protobuf.Timestamp update_time = 3
175
+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
176
+
177
+ // Output only. Highest level of severity among all the upgradable
178
+ // vulnerabilities with CVEs attached.
179
+ VulnerabilitySeverityLevel highest_upgradable_cve_severity = 4
180
+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
145
181
}
146
182
147
183
// A request message for getting the vulnerability report for the specified VM.
@@ -185,8 +221,22 @@ message ListVulnerabilityReportsRequest {
185
221
// should continue from.
186
222
string page_token = 3 ;
187
223
188
- // If provided, this field specifies the criteria that must be met by a
189
- // `vulnerabilityReport` API resource to be included in the response.
224
+ // This field supports filtering by the severity level for the vulnerability.
225
+ // For a list of severity levels, see [Severity levels for
226
+ // vulnerabilities](https://cloud.google.com/container-analysis/docs/container-scanning-overview#severity_levels_for_vulnerabilities).
227
+ //
228
+ // The filter field follows the rules described in the
229
+ // [AIP-160](https://google.aip.dev/160) guidelines as follows:
230
+ //
231
+ // + **Filter for a specific severity type**: you can list reports that
232
+ // contain
233
+ // vulnerabilities that are classified as medium by specifying
234
+ // `vulnerabilities.details.severity:MEDIUM`.
235
+ //
236
+ // + **Filter for a range of severities** : you can list reports that have
237
+ // vulnerabilities that are classified as critical or high by specifying
238
+ // `vulnerabilities.details.severity:HIGH OR
239
+ // vulnerabilities.details.severity:CRITICAL`
190
240
string filter = 4 ;
191
241
}
192
242
0 commit comments