Skip to content
This repository was archived by the owner on Jul 20, 2023. It is now read-only.

Commit 4f30555

Browse files
fix: Modify the bazel.BUILD file by hand to include the compliance protos which are not autogenerated (#120)
* fix: Modify the bazel.BUILD file by hand to include the compliance protos which are not autogenerated PiperOrigin-RevId: 420306668 Source-Link: googleapis/googleapis@9a8910e Source-Link: https://github.com/googleapis/googleapis-gen/commit/24c9bfc4d59f50a49e22a6070d1c229f523defdc Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjRjOWJmYzRkNTlmNTBhNDllMjJhNjA3MGQxYzIyOWY1MjNkZWZkYyJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent ebf774a commit 4f30555

31 files changed

+181
-98
lines changed

protos/grafeas/v1/compliance.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ syntax = "proto3";
1616

1717
package grafeas.v1;
1818

19-
import "grafeas/v1/vulnerability.proto";
19+
import "grafeas/v1/severity.proto";
2020

2121
option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas";
2222
option java_multiple_files = true;

protos/grafeas/v1/cvss.proto

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,78 @@ message CVSSv3 {
8383
IMPACT_NONE = 3;
8484
}
8585
}
86+
87+
// Common Vulnerability Scoring System.
88+
// For details, see https://www.first.org/cvss/specification-document
89+
// This is a message we will try to use for storing multiple versions of
90+
// CVSS. The intention is that as new versions of CVSS scores get added, we
91+
// will be able to modify this message rather than adding new protos for each
92+
// new version of the score.
93+
message CVSS {
94+
// The base score is a function of the base metric scores.
95+
float base_score = 1;
96+
97+
float exploitability_score = 2;
98+
99+
float impact_score = 3;
100+
101+
// Base Metrics
102+
// Represents the intrinsic characteristics of a vulnerability that are
103+
// constant over time and across user environments.
104+
AttackVector attack_vector = 4;
105+
AttackComplexity attack_complexity = 5;
106+
Authentication authentication = 6;
107+
PrivilegesRequired privileges_required = 7;
108+
UserInteraction user_interaction = 8;
109+
Scope scope = 9;
110+
Impact confidentiality_impact = 10;
111+
Impact integrity_impact = 11;
112+
Impact availability_impact = 12;
113+
114+
enum AttackVector {
115+
ATTACK_VECTOR_UNSPECIFIED = 0;
116+
ATTACK_VECTOR_NETWORK = 1;
117+
ATTACK_VECTOR_ADJACENT = 2;
118+
ATTACK_VECTOR_LOCAL = 3;
119+
ATTACK_VECTOR_PHYSICAL = 4;
120+
}
121+
122+
enum AttackComplexity {
123+
ATTACK_COMPLEXITY_UNSPECIFIED = 0;
124+
ATTACK_COMPLEXITY_LOW = 1;
125+
ATTACK_COMPLEXITY_HIGH = 2;
126+
}
127+
128+
enum Authentication {
129+
AUTHENTICATION_UNSPECIFIED = 0;
130+
AUTHENTICATION_MULTIPLE = 1;
131+
AUTHENTICATION_SINGLE = 2;
132+
AUTHENTICATION_NONE = 3;
133+
}
134+
135+
enum PrivilegesRequired {
136+
PRIVILEGES_REQUIRED_UNSPECIFIED = 0;
137+
PRIVILEGES_REQUIRED_NONE = 1;
138+
PRIVILEGES_REQUIRED_LOW = 2;
139+
PRIVILEGES_REQUIRED_HIGH = 3;
140+
}
141+
142+
enum UserInteraction {
143+
USER_INTERACTION_UNSPECIFIED = 0;
144+
USER_INTERACTION_NONE = 1;
145+
USER_INTERACTION_REQUIRED = 2;
146+
}
147+
148+
enum Scope {
149+
SCOPE_UNSPECIFIED = 0;
150+
SCOPE_UNCHANGED = 1;
151+
SCOPE_CHANGED = 2;
152+
}
153+
154+
enum Impact {
155+
IMPACT_UNSPECIFIED = 0;
156+
IMPACT_HIGH = 1;
157+
IMPACT_LOW = 2;
158+
IMPACT_NONE = 3;
159+
}
160+
}

protos/grafeas/v1/discovery.proto

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ syntax = "proto3";
1616

1717
package grafeas.v1;
1818

19+
import "google/api/field_behavior.proto";
1920
import "google/protobuf/timestamp.proto";
2021
import "google/rpc/status.proto";
2122
import "grafeas/v1/common.proto";
@@ -80,4 +81,8 @@ message DiscoveryOccurrence {
8081

8182
// The last time this resource was scanned.
8283
google.protobuf.Timestamp last_scan_time = 5;
84+
85+
// The time occurrences related to this discovery occurrence were archived.
86+
google.protobuf.Timestamp archive_time = 6
87+
[(google.api.field_behavior) = OUTPUT_ONLY];
8388
}

protos/grafeas/v1/severity.proto

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// Copyright 2021 The Grafeas Authors. All rights reserved.
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 grafeas.v1;
18+
19+
option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas";
20+
option java_multiple_files = true;
21+
option java_package = "io.grafeas.v1";
22+
option objc_class_prefix = "GRA";
23+
24+
// Note provider assigned severity/impact ranking.
25+
enum Severity {
26+
// Unknown.
27+
SEVERITY_UNSPECIFIED = 0;
28+
// Minimal severity.
29+
MINIMAL = 1;
30+
// Low severity.
31+
LOW = 2;
32+
// Medium severity.
33+
MEDIUM = 3;
34+
// High severity.
35+
HIGH = 4;
36+
// Critical severity.
37+
CRITICAL = 5;
38+
}

protos/grafeas/v1/vulnerability.proto

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -21,36 +21,21 @@ import "google/protobuf/timestamp.proto";
2121
import "grafeas/v1/common.proto";
2222
import "grafeas/v1/cvss.proto";
2323
import "grafeas/v1/package.proto";
24+
import "grafeas/v1/severity.proto";
2425

2526
option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas";
2627
option java_multiple_files = true;
2728
option java_package = "io.grafeas.v1";
2829
option objc_class_prefix = "GRA";
2930

30-
// Note provider assigned severity/impact ranking.
31-
enum Severity {
32-
// Unknown.
33-
SEVERITY_UNSPECIFIED = 0;
34-
// Minimal severity.
35-
MINIMAL = 1;
36-
// Low severity.
37-
LOW = 2;
38-
// Medium severity.
39-
MEDIUM = 3;
40-
// High severity.
41-
HIGH = 4;
42-
// Critical severity.
43-
CRITICAL = 5;
44-
}
45-
4631
// A security vulnerability that can be found in resources.
4732
message VulnerabilityNote {
4833
// The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10
4934
// where 0 indicates low severity and 10 indicates high severity.
5035
float cvss_score = 1;
5136

5237
// The note provider assigned severity of this vulnerability.
53-
Severity severity = 2;
38+
grafeas.v1.Severity severity = 2;
5439

5540
// Details of all known distros and packages affected by this vulnerability.
5641
repeated Detail details = 3;
@@ -172,24 +157,15 @@ message VulnerabilityOccurrence {
172157
string type = 1;
173158

174159
// Output only. The note provider assigned severity of this vulnerability.
175-
Severity severity = 2;
160+
grafeas.v1.Severity severity = 2;
176161

177162
// Output only. The CVSS score of this vulnerability. CVSS score is on a
178163
// scale of 0 - 10 where 0 indicates low severity and 10 indicates high
179164
// severity.
180165
float cvss_score = 3;
181166

182-
// The CVSS v3 score for this vulnerability.
183-
message CVSSV3 {
184-
// The base score for for this vulnerability according to cvss v3.
185-
float base_score = 1;
186-
// The severity rating assigned to this vulnerability by vulnerability
187-
// provider.
188-
Severity severity = 2;
189-
}
190-
191167
// The cvss v3 score for the vulnerability.
192-
CVSSV3 cvssv3 = 10;
168+
CVSS cvssv3 = 10;
193169

194170
// Required. The set of affected locations and their fixes (if available)
195171
// within the associated resource.
@@ -231,7 +207,8 @@ message VulnerabilityOccurrence {
231207
// The distro or language system assigned severity for this vulnerability
232208
// when that is available and note provider assigned severity when it is not
233209
// available.
234-
Severity effective_severity = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
210+
grafeas.v1.Severity effective_severity = 9
211+
[(google.api.field_behavior) = OUTPUT_ONLY];
235212
}
236213

237214
// Output only. A one sentence description of this vulnerability.
@@ -253,7 +230,7 @@ message VulnerabilityOccurrence {
253230
// PackageIssue level. In the case where multiple PackageIssues have differing
254231
// effective severities, this field should be the highest severity for any of
255232
// the PackageIssues.
256-
Severity effective_severity = 8;
233+
grafeas.v1.Severity effective_severity = 8;
257234

258235
// Output only. Whether at least one of the affected packages has a fix
259236
// available.

protos/protos.d.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protos/protos.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/generated/v1/binauthz_management_service_v1.create_attestor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
1516
'use strict';
1617

1718
function main(parent, attestorId, attestor) {
@@ -35,8 +36,7 @@ function main(parent, attestorId, attestor) {
3536
// const attestor = {}
3637

3738
// Imports the Binaryauthorization library
38-
const {BinauthzManagementServiceV1Client} =
39-
require('@google-cloud/binary-authorization').v1;
39+
const {BinauthzManagementServiceV1Client} = require('@google-cloud/binary-authorization').v1;
4040

4141
// Instantiates a client
4242
const binaryauthorizationClient = new BinauthzManagementServiceV1Client();

samples/generated/v1/binauthz_management_service_v1.delete_attestor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
1516
'use strict';
1617

1718
function main(name) {
@@ -26,8 +27,7 @@ function main(name) {
2627
// const name = 'abc123'
2728

2829
// Imports the Binaryauthorization library
29-
const {BinauthzManagementServiceV1Client} =
30-
require('@google-cloud/binary-authorization').v1;
30+
const {BinauthzManagementServiceV1Client} = require('@google-cloud/binary-authorization').v1;
3131

3232
// Instantiates a client
3333
const binaryauthorizationClient = new BinauthzManagementServiceV1Client();

samples/generated/v1/binauthz_management_service_v1.get_attestor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
1516
'use strict';
1617

1718
function main(name) {
@@ -26,8 +27,7 @@ function main(name) {
2627
// const name = 'abc123'
2728

2829
// Imports the Binaryauthorization library
29-
const {BinauthzManagementServiceV1Client} =
30-
require('@google-cloud/binary-authorization').v1;
30+
const {BinauthzManagementServiceV1Client} = require('@google-cloud/binary-authorization').v1;
3131

3232
// Instantiates a client
3333
const binaryauthorizationClient = new BinauthzManagementServiceV1Client();

0 commit comments

Comments
 (0)