1 // Copyright 2018 Google Inc.
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
17 package google.devtools.containeranalysis.v1alpha1;
19 import "google/api/annotations.proto";
21 option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1alpha1;containeranalysis";
22 option java_multiple_files = true;
23 option java_package = "com.google.containeranalysis.v1alpha1";
24 option objc_class_prefix = "GCA";
26 // VulnerabilityType provides metadata about a security vulnerability.
27 message VulnerabilityType {
28 // Version contains structured information about the version of the package.
29 // For a discussion of this in Debian/Ubuntu:
30 // http://serverfault.com/questions/604541/debian-packages-version-convention
31 // For a discussion of this in Redhat/Fedora/Centos:
32 // http://blog.jasonantman.com/2014/07/how-yum-and-rpm-compare-versions/
34 // Whether this is an ordinary package version or a
35 // sentinel MIN/MAX version.
37 // A standard package version, defined by the other fields.
40 // A special version representing negative infinity,
41 // other fields are ignored.
44 // A special version representing positive infinity,
45 // other fields are ignored.
49 // Used to correct mistakes in the version numbering scheme.
52 // The main part of the version name.
55 // The iteration of the package build from the above version.
58 // Distinguish between sentinel MIN/MAX versions and normal versions.
59 // If kind is not NORMAL, then the other fields are ignored.
63 // Identifies all occurrences of this vulnerability in the package for a
64 // specific distro/location
65 // For example: glibc in cpe:/o:debian:debian_linux:8 for versions 2.1 - 2.2
67 // The cpe_uri in [cpe format] (https://cpe.mitre.org/specification/) in
68 // which the vulnerability manifests. Examples include distro or storage
69 // location for vulnerable jar.
70 // This field can be used as a filter in list requests.
73 // The name of the package where the vulnerability was found.
74 // This field can be used as a filter in list requests.
77 // The min version of the package in which the vulnerability exists.
78 Version min_affected_version = 6;
80 // The max version of the package in which the vulnerability exists.
81 // This field can be used as a filter in list requests.
82 Version max_affected_version = 7;
84 // The severity (eg: distro assigned severity) for this vulnerability.
85 string severity_name = 4;
87 // A vendor-specific description of this note.
88 string description = 9;
90 // The fix for this specific package version.
91 VulnerabilityLocation fixed_location = 5;
93 // The type of package; whether native or non native(ruby gems,
94 // node.js packages etc)
95 string package_type = 10;
97 // Whether this Detail is obsolete. Occurrences are expected not to point to
99 bool is_obsolete = 11;
102 // Used by Occurrence to point to where the vulnerability exists and how
104 message VulnerabilityDetails {
105 // The type of package; whether native or non native(ruby gems,
106 // node.js packages etc)
109 // Output only. The note provider assigned Severity of the vulnerability.
110 Severity severity = 4;
112 // Output only. The CVSS score of this vulnerability. CVSS score is on a
113 // scale of 0-10 where 0 indicates low severity and 10 indicates high
115 float cvss_score = 5;
117 // The set of affected locations and their fixes (if available) within
118 // the associated resource.
119 repeated PackageIssue package_issue = 6;
122 // This message wraps a location affected by a vulnerability and its
123 // associated fix (if one is available).
124 message PackageIssue {
125 // The location of the vulnerability.
126 VulnerabilityLocation affected_location = 1;
128 // The location of the available fix for vulnerability.
129 VulnerabilityLocation fixed_location = 2;
131 // The severity (eg: distro assigned severity) for this vulnerability.
132 string severity_name = 3;
135 // The location of the vulnerability
136 message VulnerabilityLocation {
137 // The cpe_uri in [cpe format] (https://cpe.mitre.org/specification/)
138 // format. Examples include distro or storage location for vulnerable jar.
139 // This field can be used as a filter in list requests.
142 // The package being described.
145 // The version of the package being described.
146 // This field can be used as a filter in list requests.
150 // Note provider-assigned severity/impact ranking
153 SEVERITY_UNSPECIFIED = 0;
171 // The CVSS score for this Vulnerability.
172 float cvss_score = 2;
174 // Note provider assigned impact of the vulnerability
175 Severity severity = 3;
177 // All information about the package to specifically identify this
178 // vulnerability. One entry per (version range and cpe_uri) the
179 // package vulnerability has manifested in.
180 repeated Detail details = 4;