@google-cloud/containeranalysis 3.1.6 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/README.md +22 -22
- package/build/protos/grafeas/v1/attestation.proto +17 -0
- package/build/protos/grafeas/v1/build.proto +13 -1
- package/build/protos/grafeas/v1/common.proto +20 -2
- package/build/protos/grafeas/v1/compliance.proto +79 -0
- package/build/protos/grafeas/v1/dsse_attestation.proto +52 -0
- package/build/protos/grafeas/v1/grafeas.proto +13 -0
- package/build/protos/grafeas/v1/intoto_provenance.proto +112 -0
- package/build/protos/grafeas/v1/intoto_statement.proto +49 -0
- package/build/protos/grafeas/v1/package.proto +9 -1
- package/build/protos/grafeas/v1/slsa_provenance.proto +114 -0
- package/build/protos/grafeas/v1/vulnerability.proto +35 -0
- package/build/protos/protos.d.ts +3288 -645
- package/build/protos/protos.js +8742 -1992
- package/build/protos/protos.json +516 -4
- package/build/src/v1/container_analysis_client.d.ts +109 -0
- package/build/src/v1/container_analysis_client.js +8 -108
- package/build/src/v1/container_analysis_client.js.map +1 -1
- package/build/src/v1beta1/container_analysis_v1_beta1_client.d.ts +156 -5
- package/build/src/v1beta1/container_analysis_v1_beta1_client.js +14 -161
- package/build/src/v1beta1/container_analysis_v1_beta1_client.js.map +1 -1
- package/build/src/v1beta1/grafeas_v1_beta1_client.d.ts +330 -15
- package/build/src/v1beta1/grafeas_v1_beta1_client.js +26 -347
- package/build/src/v1beta1/grafeas_v1_beta1_client.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,114 @@
|
|
|
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
|
+
import "google/protobuf/any.proto";
|
|
20
|
+
import "google/protobuf/timestamp.proto";
|
|
21
|
+
|
|
22
|
+
option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas";
|
|
23
|
+
option java_multiple_files = true;
|
|
24
|
+
option java_package = "io.grafeas.v1";
|
|
25
|
+
option objc_class_prefix = "GRA";
|
|
26
|
+
|
|
27
|
+
message SlsaProvenance {
|
|
28
|
+
// Steps taken to build the artifact.
|
|
29
|
+
// For a TaskRun, typically each container corresponds to one step in the
|
|
30
|
+
// recipe.
|
|
31
|
+
message SlsaRecipe {
|
|
32
|
+
// URI indicating what type of recipe was performed. It determines the
|
|
33
|
+
// meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and
|
|
34
|
+
// materials.
|
|
35
|
+
string type = 1;
|
|
36
|
+
// Index in materials containing the recipe steps that are not implied by
|
|
37
|
+
// recipe.type. For example, if the recipe type were "make", then this would
|
|
38
|
+
// point to the source containing the Makefile, not the make program itself.
|
|
39
|
+
// Set to -1 if the recipe doesn't come from a material, as zero is default
|
|
40
|
+
// unset value for int64.
|
|
41
|
+
int64 defined_in_material = 2;
|
|
42
|
+
// String identifying the entry point into the build.
|
|
43
|
+
// This is often a path to a configuration file and/or a target label within
|
|
44
|
+
// that file. The syntax and meaning are defined by recipe.type. For
|
|
45
|
+
// example, if the recipe type were "make", then this would reference the
|
|
46
|
+
// directory in which to run make as well as which target to use.
|
|
47
|
+
string entry_point = 3;
|
|
48
|
+
// Collection of all external inputs that influenced the build on top of
|
|
49
|
+
// recipe.definedInMaterial and recipe.entryPoint. For example, if the
|
|
50
|
+
// recipe type were "make", then this might be the flags passed to make
|
|
51
|
+
// aside from the target, which is captured in recipe.entryPoint. Depending
|
|
52
|
+
// on the recipe Type, the structure may be different.
|
|
53
|
+
google.protobuf.Any arguments = 4;
|
|
54
|
+
// Any other builder-controlled inputs necessary for correctly evaluating
|
|
55
|
+
// the recipe. Usually only needed for reproducing the build but not
|
|
56
|
+
// evaluated as part of policy. Depending on the recipe Type, the structure
|
|
57
|
+
// may be different.
|
|
58
|
+
google.protobuf.Any environment = 5;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Indicates that the builder claims certain fields in this message to be
|
|
62
|
+
// complete.
|
|
63
|
+
message SlsaCompleteness {
|
|
64
|
+
// If true, the builder claims that recipe.arguments is complete, meaning
|
|
65
|
+
// that all external inputs are properly captured in the recipe.
|
|
66
|
+
bool arguments = 1;
|
|
67
|
+
// If true, the builder claims that recipe.environment is claimed to be
|
|
68
|
+
// complete.
|
|
69
|
+
bool environment = 2;
|
|
70
|
+
// If true, the builder claims that materials are complete, usually through
|
|
71
|
+
// some controls to prevent network access. Sometimes called "hermetic".
|
|
72
|
+
bool materials = 3;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Other properties of the build.
|
|
76
|
+
message SlsaMetadata {
|
|
77
|
+
// Identifies the particular build invocation, which can be useful for
|
|
78
|
+
// finding associated logs or other ad-hoc analysis. The value SHOULD be
|
|
79
|
+
// globally unique, per in-toto Provenance spec.
|
|
80
|
+
string build_invocation_id = 1;
|
|
81
|
+
// The timestamp of when the build started.
|
|
82
|
+
google.protobuf.Timestamp build_started_on = 2;
|
|
83
|
+
// The timestamp of when the build completed.
|
|
84
|
+
google.protobuf.Timestamp build_finished_on = 3;
|
|
85
|
+
// Indicates that the builder claims certain fields in this message to be
|
|
86
|
+
// complete.
|
|
87
|
+
SlsaCompleteness completeness = 4;
|
|
88
|
+
// If true, the builder claims that running the recipe on materials will
|
|
89
|
+
// produce bit-for-bit identical output.
|
|
90
|
+
bool reproducible = 5;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
message SlsaBuilder {
|
|
94
|
+
string id = 1;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
message Material {
|
|
98
|
+
string uri = 1;
|
|
99
|
+
map<string, string> digest = 2;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
SlsaBuilder builder = 1; // required
|
|
103
|
+
// Identifies the configuration used for the build.
|
|
104
|
+
// When combined with materials, this SHOULD fully describe the build,
|
|
105
|
+
// such that re-running this recipe results in bit-for-bit identical output
|
|
106
|
+
// (if the build is reproducible).
|
|
107
|
+
SlsaRecipe recipe = 2; // required
|
|
108
|
+
SlsaMetadata metadata = 3;
|
|
109
|
+
// The collection of artifacts that influenced the build including sources,
|
|
110
|
+
// dependencies, build tools, base images, and so on. This is considered to be
|
|
111
|
+
// incomplete unless metadata.completeness.materials is true. Unset or null is
|
|
112
|
+
// equivalent to empty.
|
|
113
|
+
repeated Material materials = 4;
|
|
114
|
+
}
|
|
@@ -16,6 +16,7 @@ syntax = "proto3";
|
|
|
16
16
|
|
|
17
17
|
package grafeas.v1;
|
|
18
18
|
|
|
19
|
+
import "google/api/field_behavior.proto";
|
|
19
20
|
import "google/protobuf/timestamp.proto";
|
|
20
21
|
import "grafeas/v1/common.proto";
|
|
21
22
|
import "grafeas/v1/cvss.proto";
|
|
@@ -115,6 +116,12 @@ message VulnerabilityNote {
|
|
|
115
116
|
// upstream timestamp from the underlying information source - e.g. Ubuntu
|
|
116
117
|
// security tracker.
|
|
117
118
|
google.protobuf.Timestamp source_update_time = 12;
|
|
119
|
+
|
|
120
|
+
// The source from which the information in this Detail was obtained.
|
|
121
|
+
string source = 13;
|
|
122
|
+
|
|
123
|
+
// The name of the vendor of the product.
|
|
124
|
+
string vendor = 14;
|
|
118
125
|
}
|
|
119
126
|
|
|
120
127
|
// The full description of the CVSSv3 for this vulnerability.
|
|
@@ -172,6 +179,18 @@ message VulnerabilityOccurrence {
|
|
|
172
179
|
// severity.
|
|
173
180
|
float cvss_score = 3;
|
|
174
181
|
|
|
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
|
+
|
|
191
|
+
// The cvss v3 score for the vulnerability.
|
|
192
|
+
CVSSV3 cvssv3 = 10;
|
|
193
|
+
|
|
175
194
|
// Required. The set of affected locations and their fixes (if available)
|
|
176
195
|
// within the associated resource.
|
|
177
196
|
repeated PackageIssue package_issue = 4;
|
|
@@ -205,6 +224,14 @@ message VulnerabilityOccurrence {
|
|
|
205
224
|
|
|
206
225
|
// Output only. Whether a fix is available for this package.
|
|
207
226
|
bool fix_available = 7;
|
|
227
|
+
|
|
228
|
+
// The type of package (e.g. OS, MAVEN, GO).
|
|
229
|
+
string package_type = 8;
|
|
230
|
+
|
|
231
|
+
// The distro or language system assigned severity for this vulnerability
|
|
232
|
+
// when that is available and note provider assigned severity when it is not
|
|
233
|
+
// available.
|
|
234
|
+
Severity effective_severity = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
208
235
|
}
|
|
209
236
|
|
|
210
237
|
// Output only. A one sentence description of this vulnerability.
|
|
@@ -218,6 +245,14 @@ message VulnerabilityOccurrence {
|
|
|
218
245
|
|
|
219
246
|
// The distro assigned severity for this vulnerability when it is available,
|
|
220
247
|
// otherwise this is the note provider assigned severity.
|
|
248
|
+
//
|
|
249
|
+
// When there are multiple PackageIssues for this vulnerability, they can have
|
|
250
|
+
// different effective severities because some might be provided by the distro
|
|
251
|
+
// while others are provided by the language ecosystem for a language pack.
|
|
252
|
+
// For this reason, it is advised to use the effective severity on the
|
|
253
|
+
// PackageIssue level. In the case where multiple PackageIssues have differing
|
|
254
|
+
// effective severities, this field should be the highest severity for any of
|
|
255
|
+
// the PackageIssues.
|
|
221
256
|
Severity effective_severity = 8;
|
|
222
257
|
|
|
223
258
|
// Output only. Whether at least one of the affected packages has a fix
|