Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eef0d65

Browse files
Google APIscopybara-github
authored andcommitted
feat: Add highest_upgradable_cve_severity field to Vulnerability report
docs: A comment for field `update_time` in message `.google.cloud.osconfig.v1.VulnerabilityReport` is changed docs: A comment for field `filter` in message `.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest` is changed PiperOrigin-RevId: 792763000
1 parent 1dfb2b3 commit eef0d65

File tree

1 file changed

+57
-7
lines changed

1 file changed

+57
-7
lines changed

google/cloud/osconfig/v1/vulnerability.proto

Lines changed: 57 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -130,18 +130,54 @@ message VulnerabilityReport {
130130
repeated Item items = 6;
131131
}
132132

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+
133162
// Output only. The `vulnerabilityReport` API resource name.
134163
//
135164
// Format:
136165
// `projects/{project_number}/locations/{location}/instances/{instance_id}/vulnerabilityReport`
137166
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
138167

139168
// 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];
145181
}
146182

147183
// A request message for getting the vulnerability report for the specified VM.
@@ -185,8 +221,22 @@ message ListVulnerabilityReportsRequest {
185221
// should continue from.
186222
string page_token = 3;
187223

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`
190240
string filter = 4;
191241
}
192242

0 commit comments

Comments
 (0)