@google-cloud/containeranalysis 3.2.0 → 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 +7 -0
- 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 +107 -0
- package/build/src/v1/container_analysis_client.js +0 -107
- package/build/src/v1/container_analysis_client.js.map +1 -1
- package/build/src/v1beta1/container_analysis_v1_beta1_client.d.ts +154 -5
- package/build/src/v1beta1/container_analysis_v1_beta1_client.js +6 -160
- package/build/src/v1beta1/container_analysis_v1_beta1_client.js.map +1 -1
- package/build/src/v1beta1/grafeas_v1_beta1_client.d.ts +328 -15
- package/build/src/v1beta1/grafeas_v1_beta1_client.js +18 -346
- package/build/src/v1beta1/grafeas_v1_beta1_client.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
[1]: https://www.npmjs.com/package/@google-cloud/containeranalysis?activeTab=versions
|
|
6
6
|
|
|
7
|
+
## [3.3.0](https://www.github.com/googleapis/nodejs-containeranalysis/compare/v3.2.0...v3.3.0) (2021-11-11)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* Updating the grafeas protos to include compliance and intoto attestation protos ([#352](https://www.github.com/googleapis/nodejs-containeranalysis/issues/352)) ([ea334fb](https://www.github.com/googleapis/nodejs-containeranalysis/commit/ea334fb38ba769af3e7473db9414db0850d2bbdb))
|
|
13
|
+
|
|
7
14
|
## [3.2.0](https://www.github.com/googleapis/nodejs-containeranalysis/compare/v3.1.8...v3.2.0) (2021-08-23)
|
|
8
15
|
|
|
9
16
|
|
|
@@ -53,6 +53,13 @@ message AttestationNote {
|
|
|
53
53
|
Hint hint = 1;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
message Jwt {
|
|
57
|
+
// The compact encoding of a JWS, which is always three base64 encoded strings
|
|
58
|
+
// joined by periods. For details, see:
|
|
59
|
+
// https://tools.ietf.org/html/rfc7515.html#section-3.1
|
|
60
|
+
string compact_jwt = 1;
|
|
61
|
+
}
|
|
62
|
+
|
|
56
63
|
// Occurrence that represents a single "attestation". The authenticity of an
|
|
57
64
|
// attestation can be verified using the attached signature. If the verifier
|
|
58
65
|
// trusts the public key of the signer, then verifying the signature is
|
|
@@ -70,4 +77,14 @@ message AttestationOccurrence {
|
|
|
70
77
|
// `signature` verifies `serialized_payload`. See `Signature` in common.proto
|
|
71
78
|
// for more details on signature structure and verification.
|
|
72
79
|
repeated Signature signatures = 2;
|
|
80
|
+
// One or more JWTs encoding a self-contained attestation.
|
|
81
|
+
// Each JWT encodes the payload that it verifies within the JWT itself.
|
|
82
|
+
// Verifier implementation SHOULD ignore the `serialized_payload` field
|
|
83
|
+
// when verifying these JWTs.
|
|
84
|
+
// If only JWTs are present on this AttestationOccurrence, then the
|
|
85
|
+
// `serialized_payload` SHOULD be left empty.
|
|
86
|
+
// Each JWT SHOULD encode a claim specific to the `resource_uri` of this
|
|
87
|
+
// Occurrence, but this is not validated by Grafeas metadata API
|
|
88
|
+
// implementations. The JWT itself is opaque to Grafeas.
|
|
89
|
+
repeated Jwt jwts = 3;
|
|
73
90
|
}
|
|
@@ -16,6 +16,8 @@ syntax = "proto3";
|
|
|
16
16
|
|
|
17
17
|
package grafeas.v1;
|
|
18
18
|
|
|
19
|
+
import "grafeas/v1/intoto_provenance.proto";
|
|
20
|
+
import "grafeas/v1/intoto_statement.proto";
|
|
19
21
|
import "grafeas/v1/provenance.proto";
|
|
20
22
|
|
|
21
23
|
option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas";
|
|
@@ -32,7 +34,7 @@ message BuildNote {
|
|
|
32
34
|
|
|
33
35
|
// Details of a build occurrence.
|
|
34
36
|
message BuildOccurrence {
|
|
35
|
-
//
|
|
37
|
+
// The actual provenance for the build.
|
|
36
38
|
grafeas.v1.BuildProvenance provenance = 1;
|
|
37
39
|
|
|
38
40
|
// Serialized JSON representation of the provenance, used in generating the
|
|
@@ -47,4 +49,14 @@ message BuildOccurrence {
|
|
|
47
49
|
// provenance is marshalled to json as well to prevent incompatibilities with
|
|
48
50
|
// future changes.
|
|
49
51
|
string provenance_bytes = 2;
|
|
52
|
+
|
|
53
|
+
// Deprecated. See InTotoStatement for the replacement.
|
|
54
|
+
// In-toto Provenance representation as defined in spec.
|
|
55
|
+
InTotoProvenance intoto_provenance = 3;
|
|
56
|
+
|
|
57
|
+
// In-toto Statement representation as defined in spec.
|
|
58
|
+
// The intoto_statement can contain any type of provenance. The serialized
|
|
59
|
+
// payload of the statement can be stored and signed in the Occurrence's
|
|
60
|
+
// envelope.
|
|
61
|
+
InTotoStatement intoto_statement = 4;
|
|
50
62
|
}
|
|
@@ -23,7 +23,7 @@ option objc_class_prefix = "GRA";
|
|
|
23
23
|
|
|
24
24
|
// Kind represents the kinds of notes supported.
|
|
25
25
|
enum NoteKind {
|
|
26
|
-
//
|
|
26
|
+
// Default value. This value is unused.
|
|
27
27
|
NOTE_KIND_UNSPECIFIED = 0;
|
|
28
28
|
// The note and occurrence represent a package vulnerability.
|
|
29
29
|
VULNERABILITY = 1;
|
|
@@ -41,6 +41,10 @@ enum NoteKind {
|
|
|
41
41
|
ATTESTATION = 7;
|
|
42
42
|
// This represents an available package upgrade.
|
|
43
43
|
UPGRADE = 8;
|
|
44
|
+
// This represents a Compliance Note
|
|
45
|
+
COMPLIANCE = 9;
|
|
46
|
+
// This represents a DSSE attestation Note
|
|
47
|
+
DSSE_ATTESTATION = 10;
|
|
44
48
|
}
|
|
45
49
|
|
|
46
50
|
// Metadata for any related URL information.
|
|
@@ -84,7 +88,7 @@ message Signature {
|
|
|
84
88
|
|
|
85
89
|
// The identifier for the public key that verifies this signature.
|
|
86
90
|
// * The `public_key_id` is required.
|
|
87
|
-
// * The `public_key_id`
|
|
91
|
+
// * The `public_key_id` SHOULD be an RFC3986 conformant URI.
|
|
88
92
|
// * When possible, the `public_key_id` SHOULD be an immutable reference,
|
|
89
93
|
// such as a cryptographic digest.
|
|
90
94
|
//
|
|
@@ -101,3 +105,17 @@ message Signature {
|
|
|
101
105
|
// * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
|
|
102
106
|
string public_key_id = 2;
|
|
103
107
|
}
|
|
108
|
+
|
|
109
|
+
// MUST match
|
|
110
|
+
// https://github.com/secure-systems-lab/dsse/blob/master/envelope.proto. An
|
|
111
|
+
// authenticated message of arbitrary type.
|
|
112
|
+
message Envelope {
|
|
113
|
+
bytes payload = 1;
|
|
114
|
+
string payload_type = 2;
|
|
115
|
+
repeated EnvelopeSignature signatures = 3;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
message EnvelopeSignature {
|
|
119
|
+
bytes sig = 1;
|
|
120
|
+
string keyid = 2;
|
|
121
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
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 "grafeas/v1/vulnerability.proto";
|
|
20
|
+
|
|
21
|
+
option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas";
|
|
22
|
+
option java_multiple_files = true;
|
|
23
|
+
option java_package = "io.grafeas.v1";
|
|
24
|
+
option objc_class_prefix = "GRA";
|
|
25
|
+
|
|
26
|
+
message ComplianceNote {
|
|
27
|
+
// The title that identifies this compliance check.
|
|
28
|
+
string title = 1;
|
|
29
|
+
// A description about this compliance check.
|
|
30
|
+
string description = 2;
|
|
31
|
+
// The OS and config versions the benchmark applies to.
|
|
32
|
+
repeated grafeas.v1.ComplianceVersion version = 3;
|
|
33
|
+
// A rationale for the existence of this compliance check.
|
|
34
|
+
string rationale = 4;
|
|
35
|
+
// A description of remediation steps if the compliance check fails.
|
|
36
|
+
string remediation = 5;
|
|
37
|
+
// A compliance check that is a CIS benchmark.
|
|
38
|
+
message CisBenchmark {
|
|
39
|
+
int32 profile_level = 1;
|
|
40
|
+
grafeas.v1.Severity severity = 2;
|
|
41
|
+
}
|
|
42
|
+
oneof compliance_type {
|
|
43
|
+
CisBenchmark cis_benchmark = 6;
|
|
44
|
+
}
|
|
45
|
+
// Serialized scan instructions with a predefined format.
|
|
46
|
+
bytes scan_instructions = 7;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Describes the CIS benchmark version that is applicable to a given OS and
|
|
50
|
+
// os version.
|
|
51
|
+
message ComplianceVersion {
|
|
52
|
+
// The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
|
|
53
|
+
// applicable to.
|
|
54
|
+
string cpe_uri = 1;
|
|
55
|
+
// The version of the benchmark. This is set to the version of the OS-specific
|
|
56
|
+
// CIS document the benchmark is defined in.
|
|
57
|
+
string version = 2;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// An indication that the compliance checks in the associated ComplianceNote
|
|
61
|
+
// were not satisfied for particular resources or a specified reason.
|
|
62
|
+
message ComplianceOccurrence {
|
|
63
|
+
repeated NonCompliantFile non_compliant_files = 2;
|
|
64
|
+
string non_compliance_reason = 3;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Details about files that caused a compliance check to fail.
|
|
68
|
+
message NonCompliantFile {
|
|
69
|
+
// display_command is a single command that can be used to display a list of
|
|
70
|
+
// non compliant files. When there is no such command, we can also iterate a
|
|
71
|
+
// list of non compliant file using 'path'.
|
|
72
|
+
|
|
73
|
+
// Empty if `display_command` is set.
|
|
74
|
+
string path = 1;
|
|
75
|
+
// Command to display the non-compliant files.
|
|
76
|
+
string display_command = 2;
|
|
77
|
+
// Explains why a file is non compliant for a CIS check.
|
|
78
|
+
string reason = 3;
|
|
79
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
syntax = "proto3";
|
|
15
|
+
|
|
16
|
+
package grafeas.v1;
|
|
17
|
+
|
|
18
|
+
import "grafeas/v1/common.proto";
|
|
19
|
+
import "grafeas/v1/intoto_statement.proto";
|
|
20
|
+
|
|
21
|
+
option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas";
|
|
22
|
+
option java_multiple_files = true;
|
|
23
|
+
option java_package = "io.grafeas.v1";
|
|
24
|
+
option objc_class_prefix = "GRA";
|
|
25
|
+
|
|
26
|
+
message DSSEAttestationNote {
|
|
27
|
+
// This submessage provides human-readable hints about the purpose of the
|
|
28
|
+
// authority. Because the name of a note acts as its resource reference, it is
|
|
29
|
+
// important to disambiguate the canonical name of the Note (which might be a
|
|
30
|
+
// UUID for security purposes) from "readable" names more suitable for debug
|
|
31
|
+
// output. Note that these hints should not be used to look up authorities in
|
|
32
|
+
// security sensitive contexts, such as when looking up attestations to
|
|
33
|
+
// verify.
|
|
34
|
+
message DSSEHint {
|
|
35
|
+
// Required. The human readable name of this attestation authority, for
|
|
36
|
+
// example "cloudbuild-prod".
|
|
37
|
+
string human_readable_name = 1;
|
|
38
|
+
}
|
|
39
|
+
// DSSEHint hints at the purpose of the attestation authority.
|
|
40
|
+
DSSEHint hint = 1;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Deprecated. Prefer to use a regular Occurrence, and populate the
|
|
44
|
+
// Envelope at the top level of the Occurrence.
|
|
45
|
+
message DSSEAttestationOccurrence {
|
|
46
|
+
// If doing something security critical, make sure to verify the signatures in
|
|
47
|
+
// this metadata.
|
|
48
|
+
Envelope envelope = 1;
|
|
49
|
+
oneof decoded_payload {
|
|
50
|
+
InTotoStatement statement = 2;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -26,8 +26,10 @@ import "google/protobuf/timestamp.proto";
|
|
|
26
26
|
import "grafeas/v1/attestation.proto";
|
|
27
27
|
import "grafeas/v1/build.proto";
|
|
28
28
|
import "grafeas/v1/common.proto";
|
|
29
|
+
import "grafeas/v1/compliance.proto";
|
|
29
30
|
import "grafeas/v1/deployment.proto";
|
|
30
31
|
import "grafeas/v1/discovery.proto";
|
|
32
|
+
import "grafeas/v1/dsse_attestation.proto";
|
|
31
33
|
import "grafeas/v1/image.proto";
|
|
32
34
|
import "grafeas/v1/package.proto";
|
|
33
35
|
import "grafeas/v1/upgrade.proto";
|
|
@@ -242,7 +244,14 @@ message Occurrence {
|
|
|
242
244
|
grafeas.v1.AttestationOccurrence attestation = 14;
|
|
243
245
|
// Describes an available package upgrade on the linked resource.
|
|
244
246
|
grafeas.v1.UpgradeOccurrence upgrade = 15;
|
|
247
|
+
// Describes a compliance violation on a linked resource.
|
|
248
|
+
grafeas.v1.ComplianceOccurrence compliance = 16;
|
|
249
|
+
// Describes an attestation of an artifact using dsse.
|
|
250
|
+
grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17;
|
|
245
251
|
}
|
|
252
|
+
|
|
253
|
+
// https://github.com/secure-systems-lab/dsse
|
|
254
|
+
grafeas.v1.Envelope envelope = 18;
|
|
246
255
|
}
|
|
247
256
|
|
|
248
257
|
// A type of analysis that can be done for a resource.
|
|
@@ -301,6 +310,10 @@ message Note {
|
|
|
301
310
|
grafeas.v1.AttestationNote attestation = 16;
|
|
302
311
|
// A note describing available package upgrades.
|
|
303
312
|
grafeas.v1.UpgradeNote upgrade = 17;
|
|
313
|
+
// A note describing a compliance check.
|
|
314
|
+
grafeas.v1.ComplianceNote compliance = 18;
|
|
315
|
+
// A note describing a dsse attestation note.
|
|
316
|
+
grafeas.v1.DSSEAttestationNote dsse_attestation = 19;
|
|
304
317
|
}
|
|
305
318
|
}
|
|
306
319
|
|
|
@@ -0,0 +1,112 @@
|
|
|
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
|
+
// Spec defined at
|
|
28
|
+
// https://github.com/in-toto/attestation/blob/main/spec/predicates/provenance.md
|
|
29
|
+
|
|
30
|
+
// Steps taken to build the artifact.
|
|
31
|
+
// For a TaskRun, typically each container corresponds to one step in the
|
|
32
|
+
// recipe.
|
|
33
|
+
message Recipe {
|
|
34
|
+
// URI indicating what type of recipe was performed. It determines the meaning
|
|
35
|
+
// of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
|
|
36
|
+
string type = 1;
|
|
37
|
+
// Index in materials containing the recipe steps that are not implied by
|
|
38
|
+
// recipe.type. For example, if the recipe type were "make", then this would
|
|
39
|
+
// point to the source containing the Makefile, not the make program itself.
|
|
40
|
+
// Set to -1 if the recipe doesn't come from a material, as zero is default
|
|
41
|
+
// unset value for int64.
|
|
42
|
+
int64 defined_in_material = 2;
|
|
43
|
+
// String identifying the entry point into the build.
|
|
44
|
+
// This is often a path to a configuration file and/or a target label within
|
|
45
|
+
// that file. The syntax and meaning are defined by recipe.type. For example,
|
|
46
|
+
// if the recipe type were "make", then this would reference the directory in
|
|
47
|
+
// which to run make as well as which target to use.
|
|
48
|
+
string entry_point = 3;
|
|
49
|
+
// Collection of all external inputs that influenced the build on top of
|
|
50
|
+
// recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe
|
|
51
|
+
// type were "make", then this might be the flags passed to make aside from
|
|
52
|
+
// the target, which is captured in recipe.entryPoint. Since the arguments
|
|
53
|
+
// field can greatly vary in structure, depending on the builder and recipe
|
|
54
|
+
// type, this is of form "Any".
|
|
55
|
+
repeated google.protobuf.Any arguments = 4;
|
|
56
|
+
// Any other builder-controlled inputs necessary for correctly evaluating the
|
|
57
|
+
// recipe. Usually only needed for reproducing the build but not evaluated as
|
|
58
|
+
// part of policy. Since the environment field can greatly vary in structure,
|
|
59
|
+
// depending on the builder and recipe type, this is of form "Any".
|
|
60
|
+
repeated google.protobuf.Any environment = 5;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Indicates that the builder claims certain fields in this message to be
|
|
64
|
+
// complete.
|
|
65
|
+
message Completeness {
|
|
66
|
+
// If true, the builder claims that recipe.arguments is complete, meaning that
|
|
67
|
+
// all external inputs are properly captured in the recipe.
|
|
68
|
+
bool arguments = 1;
|
|
69
|
+
// If true, the builder claims that recipe.environment is claimed to be
|
|
70
|
+
// complete.
|
|
71
|
+
bool environment = 2;
|
|
72
|
+
// If true, the builder claims that materials are complete, usually through
|
|
73
|
+
// some controls to prevent network access. Sometimes called "hermetic".
|
|
74
|
+
bool materials = 3;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Other properties of the build.
|
|
78
|
+
message Metadata {
|
|
79
|
+
// Identifies the particular build invocation, which can be useful for finding
|
|
80
|
+
// associated logs or other ad-hoc analysis. The value SHOULD be globally
|
|
81
|
+
// unique, per in-toto Provenance spec.
|
|
82
|
+
string build_invocation_id = 1;
|
|
83
|
+
// The timestamp of when the build started.
|
|
84
|
+
google.protobuf.Timestamp build_started_on = 2;
|
|
85
|
+
// The timestamp of when the build completed.
|
|
86
|
+
google.protobuf.Timestamp build_finished_on = 3;
|
|
87
|
+
// Indicates that the builder claims certain fields in this message to be
|
|
88
|
+
// complete.
|
|
89
|
+
Completeness completeness = 4;
|
|
90
|
+
// If true, the builder claims that running the recipe on materials will
|
|
91
|
+
// produce bit-for-bit identical output.
|
|
92
|
+
bool reproducible = 5;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
message BuilderConfig {
|
|
96
|
+
string id = 1;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
message InTotoProvenance {
|
|
100
|
+
BuilderConfig builder_config = 1; // required
|
|
101
|
+
// Identifies the configuration used for the build.
|
|
102
|
+
// When combined with materials, this SHOULD fully describe the build,
|
|
103
|
+
// such that re-running this recipe results in bit-for-bit identical output
|
|
104
|
+
// (if the build is reproducible).
|
|
105
|
+
Recipe recipe = 2; // required
|
|
106
|
+
Metadata metadata = 3;
|
|
107
|
+
// The collection of artifacts that influenced the build including sources,
|
|
108
|
+
// dependencies, build tools, base images, and so on. This is considered to be
|
|
109
|
+
// incomplete unless metadata.completeness.materials is true. Unset or null is
|
|
110
|
+
// equivalent to empty.
|
|
111
|
+
repeated string materials = 4;
|
|
112
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
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 "grafeas/v1/intoto_provenance.proto";
|
|
20
|
+
import "grafeas/v1/slsa_provenance.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
|
+
// Spec defined at
|
|
28
|
+
// https://github.com/in-toto/attestation/tree/main/spec#statement The
|
|
29
|
+
// serialized InTotoStatement will be stored as Envelope.payload.
|
|
30
|
+
// Envelope.payloadType is always "application/vnd.in-toto+json".
|
|
31
|
+
message InTotoStatement {
|
|
32
|
+
// Always `https://in-toto.io/Statement/v0.1`.
|
|
33
|
+
string type = 1 [json_name = "_type"];
|
|
34
|
+
repeated Subject subject = 2;
|
|
35
|
+
// `https://slsa.dev/provenance/v0.1` for SlsaProvenance.
|
|
36
|
+
string predicate_type = 3;
|
|
37
|
+
oneof predicate {
|
|
38
|
+
InTotoProvenance provenance = 4;
|
|
39
|
+
SlsaProvenance slsa_provenance = 5;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
message Subject {
|
|
43
|
+
string name = 1;
|
|
44
|
+
// `"<ALGORITHM>": "<HEX_VALUE>"`
|
|
45
|
+
// Algorithms can be e.g. sha256, sha512
|
|
46
|
+
// See
|
|
47
|
+
// https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
|
|
48
|
+
map<string, string> digest = 2;
|
|
49
|
+
}
|
|
@@ -102,6 +102,14 @@ message Version {
|
|
|
102
102
|
// The iteration of the package build from the above version.
|
|
103
103
|
string revision = 3;
|
|
104
104
|
|
|
105
|
+
// Whether this version is specifying part of an inclusive range. Grafeas
|
|
106
|
+
// does not have the capability to specify version ranges; instead we have
|
|
107
|
+
// fields that specify start version and end versions. At times this is
|
|
108
|
+
// insufficient - we also need to specify whether the version is included in
|
|
109
|
+
// the range or is excluded from the range. This boolean is expected to be set
|
|
110
|
+
// to true when the version is included in a range.
|
|
111
|
+
bool inclusive = 6;
|
|
112
|
+
|
|
105
113
|
// Whether this is an ordinary package version or a sentinel MIN/MAX version.
|
|
106
114
|
enum VersionKind {
|
|
107
115
|
// Unknown.
|
|
@@ -112,7 +120,7 @@ message Version {
|
|
|
112
120
|
MINIMUM = 2;
|
|
113
121
|
// A special version representing positive infinity.
|
|
114
122
|
MAXIMUM = 3;
|
|
115
|
-
}
|
|
123
|
+
}
|
|
116
124
|
|
|
117
125
|
// Required. Distinguishes between sentinel MIN/MAX versions and normal
|
|
118
126
|
// versions.
|
|
@@ -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
|