xref: /aosp_15_r20/external/googleapis/grafeas/v1/vex.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1*d5c09012SAndroid Build Coastguard Worker// Copyright 2023 The Grafeas Authors. All rights reserved.
2*d5c09012SAndroid Build Coastguard Worker//
3*d5c09012SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License");
4*d5c09012SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License.
5*d5c09012SAndroid Build Coastguard Worker// You may obtain a copy of the License at
6*d5c09012SAndroid Build Coastguard Worker//
7*d5c09012SAndroid Build Coastguard Worker//    http://www.apache.org/licenses/LICENSE-2.0
8*d5c09012SAndroid Build Coastguard Worker//
9*d5c09012SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software
10*d5c09012SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS,
11*d5c09012SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*d5c09012SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and
13*d5c09012SAndroid Build Coastguard Worker// limitations under the License.
14*d5c09012SAndroid Build Coastguard Worker
15*d5c09012SAndroid Build Coastguard Workersyntax = "proto3";
16*d5c09012SAndroid Build Coastguard Worker
17*d5c09012SAndroid Build Coastguard Workerpackage grafeas.v1;
18*d5c09012SAndroid Build Coastguard Worker
19*d5c09012SAndroid Build Coastguard Workerimport "grafeas/v1/common.proto";
20*d5c09012SAndroid Build Coastguard Worker
21*d5c09012SAndroid Build Coastguard Workeroption go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas";
22*d5c09012SAndroid Build Coastguard Workeroption java_multiple_files = true;
23*d5c09012SAndroid Build Coastguard Workeroption java_package = "io.grafeas.v1";
24*d5c09012SAndroid Build Coastguard Workeroption objc_class_prefix = "GRA";
25*d5c09012SAndroid Build Coastguard Worker
26*d5c09012SAndroid Build Coastguard Worker// A single VulnerabilityAssessmentNote represents
27*d5c09012SAndroid Build Coastguard Worker// one particular product's vulnerability assessment for one CVE.
28*d5c09012SAndroid Build Coastguard Workermessage VulnerabilityAssessmentNote {
29*d5c09012SAndroid Build Coastguard Worker  // The title of the note. E.g. `Vex-Debian-11.4`
30*d5c09012SAndroid Build Coastguard Worker  string title = 1;
31*d5c09012SAndroid Build Coastguard Worker
32*d5c09012SAndroid Build Coastguard Worker  // A one sentence description of this Vex.
33*d5c09012SAndroid Build Coastguard Worker  string short_description = 2;
34*d5c09012SAndroid Build Coastguard Worker
35*d5c09012SAndroid Build Coastguard Worker  // A detailed description of this Vex.
36*d5c09012SAndroid Build Coastguard Worker  string long_description = 3;
37*d5c09012SAndroid Build Coastguard Worker
38*d5c09012SAndroid Build Coastguard Worker  // Identifies the language used by this document,
39*d5c09012SAndroid Build Coastguard Worker  // corresponding to IETF BCP 47 / RFC 5646.
40*d5c09012SAndroid Build Coastguard Worker  string language_code = 4;
41*d5c09012SAndroid Build Coastguard Worker
42*d5c09012SAndroid Build Coastguard Worker  // Publisher contains information about the publisher of
43*d5c09012SAndroid Build Coastguard Worker  // this Note.
44*d5c09012SAndroid Build Coastguard Worker  // (-- api-linter: core::0123::resource-annotation=disabled
45*d5c09012SAndroid Build Coastguard Worker  //     aip.dev/not-precedent: Publisher is not a separate resource. --)
46*d5c09012SAndroid Build Coastguard Worker  message Publisher {
47*d5c09012SAndroid Build Coastguard Worker    // Name of the publisher.
48*d5c09012SAndroid Build Coastguard Worker    // Examples: 'Google', 'Google Cloud Platform'.
49*d5c09012SAndroid Build Coastguard Worker    string name = 1;
50*d5c09012SAndroid Build Coastguard Worker
51*d5c09012SAndroid Build Coastguard Worker    // Provides information about the authority of the issuing party to
52*d5c09012SAndroid Build Coastguard Worker    // release the document, in particular, the party's constituency and
53*d5c09012SAndroid Build Coastguard Worker    // responsibilities or other obligations.
54*d5c09012SAndroid Build Coastguard Worker    string issuing_authority = 2;
55*d5c09012SAndroid Build Coastguard Worker
56*d5c09012SAndroid Build Coastguard Worker    // The context or namespace.
57*d5c09012SAndroid Build Coastguard Worker    // Contains a URL which is under control of the issuing party and can
58*d5c09012SAndroid Build Coastguard Worker    // be used as a globally unique identifier for that issuing party.
59*d5c09012SAndroid Build Coastguard Worker    // Example: https://csaf.io
60*d5c09012SAndroid Build Coastguard Worker    string publisher_namespace = 3;
61*d5c09012SAndroid Build Coastguard Worker  }
62*d5c09012SAndroid Build Coastguard Worker
63*d5c09012SAndroid Build Coastguard Worker  // Publisher details of this Note.
64*d5c09012SAndroid Build Coastguard Worker  Publisher publisher = 5;
65*d5c09012SAndroid Build Coastguard Worker
66*d5c09012SAndroid Build Coastguard Worker  // Product contains information about a product and how to uniquely identify
67*d5c09012SAndroid Build Coastguard Worker  // it.
68*d5c09012SAndroid Build Coastguard Worker  // (-- api-linter: core::0123::resource-annotation=disabled
69*d5c09012SAndroid Build Coastguard Worker  //     aip.dev/not-precedent: Product is not a separate resource. --)
70*d5c09012SAndroid Build Coastguard Worker  message Product {
71*d5c09012SAndroid Build Coastguard Worker    // Name of the product.
72*d5c09012SAndroid Build Coastguard Worker    string name = 1;
73*d5c09012SAndroid Build Coastguard Worker
74*d5c09012SAndroid Build Coastguard Worker    // Token that identifies a product so that it can be referred to from other
75*d5c09012SAndroid Build Coastguard Worker    // parts in the document. There is no predefined format as long as it
76*d5c09012SAndroid Build Coastguard Worker    // uniquely identifies a group in the context of the current document.
77*d5c09012SAndroid Build Coastguard Worker    string id = 2;
78*d5c09012SAndroid Build Coastguard Worker
79*d5c09012SAndroid Build Coastguard Worker    oneof identifier {
80*d5c09012SAndroid Build Coastguard Worker      // Contains a URI which is vendor-specific.
81*d5c09012SAndroid Build Coastguard Worker      // Example: The artifact repository URL of an image.
82*d5c09012SAndroid Build Coastguard Worker      string generic_uri = 3;
83*d5c09012SAndroid Build Coastguard Worker    }
84*d5c09012SAndroid Build Coastguard Worker  }
85*d5c09012SAndroid Build Coastguard Worker
86*d5c09012SAndroid Build Coastguard Worker  // The product affected by this vex.
87*d5c09012SAndroid Build Coastguard Worker  Product product = 6;
88*d5c09012SAndroid Build Coastguard Worker
89*d5c09012SAndroid Build Coastguard Worker  // Assessment provides all information that is related to a single
90*d5c09012SAndroid Build Coastguard Worker  // vulnerability for this product.
91*d5c09012SAndroid Build Coastguard Worker  message Assessment {
92*d5c09012SAndroid Build Coastguard Worker    // Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
93*d5c09012SAndroid Build Coastguard Worker    // tracking number for the vulnerability.
94*d5c09012SAndroid Build Coastguard Worker    // Deprecated: Use vulnerability_id instead to denote CVEs.
95*d5c09012SAndroid Build Coastguard Worker    string cve = 1 [deprecated = true];
96*d5c09012SAndroid Build Coastguard Worker
97*d5c09012SAndroid Build Coastguard Worker    // The vulnerability identifier for this Assessment. Will hold one of
98*d5c09012SAndroid Build Coastguard Worker    // common identifiers e.g. CVE, GHSA etc.
99*d5c09012SAndroid Build Coastguard Worker    string vulnerability_id = 9;
100*d5c09012SAndroid Build Coastguard Worker
101*d5c09012SAndroid Build Coastguard Worker    // A one sentence description of this Vex.
102*d5c09012SAndroid Build Coastguard Worker    string short_description = 2;
103*d5c09012SAndroid Build Coastguard Worker
104*d5c09012SAndroid Build Coastguard Worker    // A detailed description of this Vex.
105*d5c09012SAndroid Build Coastguard Worker    string long_description = 3;
106*d5c09012SAndroid Build Coastguard Worker
107*d5c09012SAndroid Build Coastguard Worker    // Holds a list of references associated with this vulnerability item and
108*d5c09012SAndroid Build Coastguard Worker    // assessment. These uris have additional information about the
109*d5c09012SAndroid Build Coastguard Worker    // vulnerability and the assessment itself. E.g. Link to a document which
110*d5c09012SAndroid Build Coastguard Worker    // details how this assessment concluded the state of this vulnerability.
111*d5c09012SAndroid Build Coastguard Worker    repeated grafeas.v1.RelatedUrl related_uris = 4;
112*d5c09012SAndroid Build Coastguard Worker
113*d5c09012SAndroid Build Coastguard Worker    // Provides the state of this Vulnerability assessment.
114*d5c09012SAndroid Build Coastguard Worker    enum State {
115*d5c09012SAndroid Build Coastguard Worker      // No state is specified.
116*d5c09012SAndroid Build Coastguard Worker      STATE_UNSPECIFIED = 0;
117*d5c09012SAndroid Build Coastguard Worker      // This product is known to be affected by this vulnerability.
118*d5c09012SAndroid Build Coastguard Worker      AFFECTED = 1;
119*d5c09012SAndroid Build Coastguard Worker      // This product is known to be not affected by this vulnerability.
120*d5c09012SAndroid Build Coastguard Worker      NOT_AFFECTED = 2;
121*d5c09012SAndroid Build Coastguard Worker      // This product contains a fix for this vulnerability.
122*d5c09012SAndroid Build Coastguard Worker      FIXED = 3;
123*d5c09012SAndroid Build Coastguard Worker      // It is not known yet whether these versions are or are not affected
124*d5c09012SAndroid Build Coastguard Worker      // by the vulnerability. However, it is still under investigation.
125*d5c09012SAndroid Build Coastguard Worker      UNDER_INVESTIGATION = 4;
126*d5c09012SAndroid Build Coastguard Worker    }
127*d5c09012SAndroid Build Coastguard Worker
128*d5c09012SAndroid Build Coastguard Worker    // Provides the state of this Vulnerability assessment.
129*d5c09012SAndroid Build Coastguard Worker    State state = 5;
130*d5c09012SAndroid Build Coastguard Worker
131*d5c09012SAndroid Build Coastguard Worker    // Contains information about the impact of this vulnerability,
132*d5c09012SAndroid Build Coastguard Worker    // this will change with time.
133*d5c09012SAndroid Build Coastguard Worker    repeated string impacts = 6;
134*d5c09012SAndroid Build Coastguard Worker
135*d5c09012SAndroid Build Coastguard Worker    // Justification provides the justification when the state of the
136*d5c09012SAndroid Build Coastguard Worker    // assessment if NOT_AFFECTED.
137*d5c09012SAndroid Build Coastguard Worker    message Justification {
138*d5c09012SAndroid Build Coastguard Worker      // Provides the type of justification.
139*d5c09012SAndroid Build Coastguard Worker      enum JustificationType {
140*d5c09012SAndroid Build Coastguard Worker        // JUSTIFICATION_TYPE_UNSPECIFIED.
141*d5c09012SAndroid Build Coastguard Worker        JUSTIFICATION_TYPE_UNSPECIFIED = 0;
142*d5c09012SAndroid Build Coastguard Worker        // The vulnerable component is not present in the product.
143*d5c09012SAndroid Build Coastguard Worker        COMPONENT_NOT_PRESENT = 1;
144*d5c09012SAndroid Build Coastguard Worker        // The vulnerable code is not present. Typically this case
145*d5c09012SAndroid Build Coastguard Worker        // occurs when source code is configured or built in a way that excludes
146*d5c09012SAndroid Build Coastguard Worker        // the vulnerable code.
147*d5c09012SAndroid Build Coastguard Worker        VULNERABLE_CODE_NOT_PRESENT = 2;
148*d5c09012SAndroid Build Coastguard Worker        // The vulnerable code can not be executed.
149*d5c09012SAndroid Build Coastguard Worker        // Typically this case occurs when the product includes the vulnerable
150*d5c09012SAndroid Build Coastguard Worker        // code but does not call or use the vulnerable code.
151*d5c09012SAndroid Build Coastguard Worker        VULNERABLE_CODE_NOT_IN_EXECUTE_PATH = 3;
152*d5c09012SAndroid Build Coastguard Worker        // The vulnerable code cannot be controlled by an attacker to exploit
153*d5c09012SAndroid Build Coastguard Worker        // the vulnerability.
154*d5c09012SAndroid Build Coastguard Worker        VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY = 4;
155*d5c09012SAndroid Build Coastguard Worker        // The product includes built-in protections or features that prevent
156*d5c09012SAndroid Build Coastguard Worker        // exploitation of the vulnerability. These built-in protections cannot
157*d5c09012SAndroid Build Coastguard Worker        // be subverted by the attacker and cannot be configured or disabled by
158*d5c09012SAndroid Build Coastguard Worker        // the user. These mitigations completely prevent exploitation based on
159*d5c09012SAndroid Build Coastguard Worker        // known attack vectors.
160*d5c09012SAndroid Build Coastguard Worker        INLINE_MITIGATIONS_ALREADY_EXIST = 5;
161*d5c09012SAndroid Build Coastguard Worker      }
162*d5c09012SAndroid Build Coastguard Worker
163*d5c09012SAndroid Build Coastguard Worker      // The justification type for this vulnerability.
164*d5c09012SAndroid Build Coastguard Worker      JustificationType justification_type = 1;
165*d5c09012SAndroid Build Coastguard Worker
166*d5c09012SAndroid Build Coastguard Worker      // Additional details on why this justification was chosen.
167*d5c09012SAndroid Build Coastguard Worker      string details = 2;
168*d5c09012SAndroid Build Coastguard Worker    }
169*d5c09012SAndroid Build Coastguard Worker
170*d5c09012SAndroid Build Coastguard Worker    // Justification provides the justification when the state of the
171*d5c09012SAndroid Build Coastguard Worker    // assessment if NOT_AFFECTED.
172*d5c09012SAndroid Build Coastguard Worker    Justification justification = 7;
173*d5c09012SAndroid Build Coastguard Worker
174*d5c09012SAndroid Build Coastguard Worker    // Specifies details on how to handle (and presumably, fix) a vulnerability.
175*d5c09012SAndroid Build Coastguard Worker    message Remediation {
176*d5c09012SAndroid Build Coastguard Worker      // The type of remediation that can be applied.
177*d5c09012SAndroid Build Coastguard Worker      enum RemediationType {
178*d5c09012SAndroid Build Coastguard Worker        // No remediation type specified.
179*d5c09012SAndroid Build Coastguard Worker        REMEDIATION_TYPE_UNSPECIFIED = 0;
180*d5c09012SAndroid Build Coastguard Worker        // A MITIGATION is available.
181*d5c09012SAndroid Build Coastguard Worker        MITIGATION = 1;
182*d5c09012SAndroid Build Coastguard Worker        // No fix is planned.
183*d5c09012SAndroid Build Coastguard Worker        NO_FIX_PLANNED = 2;
184*d5c09012SAndroid Build Coastguard Worker        // Not available.
185*d5c09012SAndroid Build Coastguard Worker        NONE_AVAILABLE = 3;
186*d5c09012SAndroid Build Coastguard Worker        // A vendor fix is available.
187*d5c09012SAndroid Build Coastguard Worker        VENDOR_FIX = 4;
188*d5c09012SAndroid Build Coastguard Worker        // A workaround is available.
189*d5c09012SAndroid Build Coastguard Worker        WORKAROUND = 5;
190*d5c09012SAndroid Build Coastguard Worker      }
191*d5c09012SAndroid Build Coastguard Worker
192*d5c09012SAndroid Build Coastguard Worker      // The type of remediation that can be applied.
193*d5c09012SAndroid Build Coastguard Worker      RemediationType remediation_type = 1;
194*d5c09012SAndroid Build Coastguard Worker
195*d5c09012SAndroid Build Coastguard Worker      // Contains a comprehensive human-readable discussion of the remediation.
196*d5c09012SAndroid Build Coastguard Worker      string details = 2;
197*d5c09012SAndroid Build Coastguard Worker
198*d5c09012SAndroid Build Coastguard Worker      // Contains the URL where to obtain the remediation.
199*d5c09012SAndroid Build Coastguard Worker      grafeas.v1.RelatedUrl remediation_uri = 3;
200*d5c09012SAndroid Build Coastguard Worker    }
201*d5c09012SAndroid Build Coastguard Worker
202*d5c09012SAndroid Build Coastguard Worker    // Specifies details on how to handle (and presumably, fix) a vulnerability.
203*d5c09012SAndroid Build Coastguard Worker    repeated Remediation remediations = 8;
204*d5c09012SAndroid Build Coastguard Worker  }
205*d5c09012SAndroid Build Coastguard Worker
206*d5c09012SAndroid Build Coastguard Worker  // Represents a vulnerability assessment for the product.
207*d5c09012SAndroid Build Coastguard Worker  Assessment assessment = 7;
208*d5c09012SAndroid Build Coastguard Worker}
209