Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / devtools / containeranalysis / v1alpha1 / package_vulnerability.proto
1 // Copyright 2018 Google Inc.
2 //
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
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
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.
14
15 syntax = "proto3";
16
17 package google.devtools.containeranalysis.v1alpha1;
18
19 import "google/api/annotations.proto";
20
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";
25
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/
33   message Version {
34     // Whether this is an ordinary package version or a
35     // sentinel MIN/MAX version.
36     enum VersionKind {
37       // A standard package version, defined by the other fields.
38       NORMAL = 0;
39
40       // A special version representing negative infinity,
41       // other fields are ignored.
42       MINIMUM = 1;
43
44       // A special version representing positive infinity,
45       // other fields are ignored.
46       MAXIMUM = 2;
47     }
48
49     // Used to correct mistakes in the version numbering scheme.
50     int32 epoch = 1;
51
52     // The main part of the version name.
53     string name = 2;
54
55     // The iteration of the package build from the above version.
56     string revision = 3;
57
58     // Distinguish between sentinel MIN/MAX versions and normal versions.
59     // If kind is not NORMAL, then the other fields are ignored.
60     VersionKind kind = 5;
61   }
62
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
66   message Detail {
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.
71     string cpe_uri = 1;
72
73     // The name of the package where the vulnerability was found.
74     // This field can be used as a filter in list requests.
75     string package = 8;
76
77     // The min version of the package in which the vulnerability exists.
78     Version min_affected_version = 6;
79
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;
83
84     // The severity (eg: distro assigned severity) for this vulnerability.
85     string severity_name = 4;
86
87     // A vendor-specific description of this note.
88     string description = 9;
89
90     // The fix for this specific package version.
91     VulnerabilityLocation fixed_location = 5;
92
93     // The type of package; whether native or non native(ruby gems,
94     // node.js packages etc)
95     string package_type = 10;
96
97     // Whether this Detail is obsolete. Occurrences are expected not to point to
98     // obsolete details.
99     bool is_obsolete = 11;
100   }
101
102   // Used by Occurrence to point to where the vulnerability exists and how
103   // to fix it.
104   message VulnerabilityDetails {
105     // The type of package; whether native or non native(ruby gems,
106     // node.js packages etc)
107     string type = 3;
108
109     // Output only. The note provider assigned Severity of the vulnerability.
110     Severity severity = 4;
111
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
114     // severity.
115     float cvss_score = 5;
116
117     // The set of affected locations and their fixes (if available) within
118     // the associated resource.
119     repeated PackageIssue package_issue = 6;
120   }
121
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;
127
128     // The location of the available fix for vulnerability.
129     VulnerabilityLocation fixed_location = 2;
130
131     // The severity (eg: distro assigned severity) for this vulnerability.
132     string severity_name = 3;
133   }
134
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.
140     string cpe_uri = 1;
141
142     // The package being described.
143     string package = 2;
144
145     // The version of the package being described.
146     // This field can be used as a filter in list requests.
147     Version version = 4;
148   }
149
150   // Note provider-assigned severity/impact ranking
151   enum Severity {
152     // Unknown Impact
153     SEVERITY_UNSPECIFIED = 0;
154
155     // Minimal Impact
156     MINIMAL = 1;
157
158     // Low Impact
159     LOW = 2;
160
161     // Medium Impact
162     MEDIUM = 3;
163
164     // High Impact
165     HIGH = 4;
166
167     // Critical Impact
168     CRITICAL = 5;
169   }
170
171   // The CVSS score for this Vulnerability.
172   float cvss_score = 2;
173
174   // Note provider assigned impact of the vulnerability
175   Severity severity = 3;
176
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;
181 }