@google-cloud/containeranalysis 5.2.0 → 5.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 CHANGED
@@ -4,6 +4,13 @@
4
4
 
5
5
  [1]: https://www.npmjs.com/package/@google-cloud/containeranalysis?activeTab=versions
6
6
 
7
+ ## [5.3.0](https://github.com/googleapis/google-cloud-node/compare/containeranalysis-v5.2.0...containeranalysis-v5.3.0) (2024-03-23)
8
+
9
+
10
+ ### Features
11
+
12
+ * [containeranalysis] A new field `in_toto_slsa_provenance_v1` is added to message `BuildOccurrence` ([#5134](https://github.com/googleapis/google-cloud-node/issues/5134)) ([e15c0fa](https://github.com/googleapis/google-cloud-node/commit/e15c0fa84d38e7bfd1e1ff2551b6b39ccbbd8554))
13
+
7
14
  ## [5.2.0](https://github.com/googleapis/google-cloud-node/compare/containeranalysis-v5.1.1...containeranalysis-v5.2.0) (2024-02-09)
8
15
 
9
16
 
@@ -59,4 +59,10 @@ message BuildOccurrence {
59
59
  // payload of the statement can be stored and signed in the Occurrence's
60
60
  // envelope.
61
61
  InTotoStatement intoto_statement = 4;
62
+
63
+ // In-Toto Slsa Provenance V1 represents a slsa provenance meeting the slsa
64
+ // spec, wrapped in an in-toto statement. This allows for direct
65
+ // jsonification of a to-spec in-toto slsa statement with a to-spec
66
+ // slsa provenance.
67
+ InTotoSlsaProvenanceV1 in_toto_slsa_provenance_v1 = 5;
62
68
  }
@@ -47,6 +47,8 @@ enum NoteKind {
47
47
  DSSE_ATTESTATION = 10;
48
48
  // This represents a Vulnerability Assessment.
49
49
  VULNERABILITY_ASSESSMENT = 11;
50
+ // This represents an SBOM Reference.
51
+ SBOM_REFERENCE = 12;
50
52
  }
51
53
 
52
54
  // Metadata for any related URL information.
@@ -44,6 +44,10 @@ message ComplianceNote {
44
44
  }
45
45
  // Serialized scan instructions with a predefined format.
46
46
  bytes scan_instructions = 7;
47
+ // Potential impact of the suggested remediation
48
+ oneof potential_impact {
49
+ string impact = 8;
50
+ }
47
51
  }
48
52
 
49
53
  // Describes the CIS benchmark version that is applicable to a given OS and
@@ -101,4 +101,26 @@ message DiscoveryOccurrence {
101
101
  // The time occurrences related to this discovery occurrence were archived.
102
102
  google.protobuf.Timestamp archive_time = 6
103
103
  [(google.api.field_behavior) = OUTPUT_ONLY];
104
+
105
+ // The status of an SBOM generation.
106
+ message SBOMStatus {
107
+ // An enum indicating the progress of the SBOM generation.
108
+ enum SBOMState {
109
+ // Default unknown state.
110
+ SBOM_STATE_UNSPECIFIED = 0;
111
+ // SBOM scanning is pending.
112
+ PENDING = 1;
113
+ // SBOM scanning has completed.
114
+ COMPLETE = 2;
115
+ }
116
+
117
+ // The progress of the SBOM generation.
118
+ SBOMState sbom_state = 1;
119
+ // If there was an error generating an SBOM, this will indicate what that
120
+ // error was.
121
+ string error = 2;
122
+ }
123
+
124
+ // The status of an SBOM generation.
125
+ SBOMStatus sbom_status = 9;
104
126
  }
@@ -32,6 +32,7 @@ import "grafeas/v1/discovery.proto";
32
32
  import "grafeas/v1/dsse_attestation.proto";
33
33
  import "grafeas/v1/image.proto";
34
34
  import "grafeas/v1/package.proto";
35
+ import "grafeas/v1/sbom.proto";
35
36
  import "grafeas/v1/upgrade.proto";
36
37
  import "grafeas/v1/vex.proto";
37
38
  import "grafeas/v1/vulnerability.proto";
@@ -66,6 +67,9 @@ service Grafeas {
66
67
  rpc GetOccurrence(GetOccurrenceRequest) returns (Occurrence) {
67
68
  option (google.api.http) = {
68
69
  get: "/v1/{name=projects/*/occurrences/*}"
70
+ additional_bindings {
71
+ get: "/v1/{name=projects/*/locations/*/occurrences/*}"
72
+ }
69
73
  };
70
74
  option (google.api.method_signature) = "name";
71
75
  }
@@ -75,6 +79,9 @@ service Grafeas {
75
79
  returns (ListOccurrencesResponse) {
76
80
  option (google.api.http) = {
77
81
  get: "/v1/{parent=projects/*}/occurrences"
82
+ additional_bindings {
83
+ get: "/v1/{parent=projects/*/locations/*}/occurrences"
84
+ }
78
85
  };
79
86
  option (google.api.method_signature) = "parent,filter";
80
87
  }
@@ -123,6 +130,9 @@ service Grafeas {
123
130
  rpc GetOccurrenceNote(GetOccurrenceNoteRequest) returns (Note) {
124
131
  option (google.api.http) = {
125
132
  get: "/v1/{name=projects/*/occurrences/*}/notes"
133
+ additional_bindings {
134
+ get: "/v1/{name=projects/*/locations/*/occurrences/*}/notes"
135
+ }
126
136
  };
127
137
  option (google.api.method_signature) = "name";
128
138
  }
@@ -131,6 +141,7 @@ service Grafeas {
131
141
  rpc GetNote(GetNoteRequest) returns (Note) {
132
142
  option (google.api.http) = {
133
143
  get: "/v1/{name=projects/*/notes/*}"
144
+ additional_bindings { get: "/v1/{name=projects/*/locations/*/notes/*}" }
134
145
  };
135
146
  option (google.api.method_signature) = "name";
136
147
  }
@@ -139,6 +150,7 @@ service Grafeas {
139
150
  rpc ListNotes(ListNotesRequest) returns (ListNotesResponse) {
140
151
  option (google.api.http) = {
141
152
  get: "/v1/{parent=projects/*}/notes"
153
+ additional_bindings { get: "/v1/{parent=projects/*/locations/*}/notes" }
142
154
  };
143
155
  option (google.api.method_signature) = "parent,filter";
144
156
  }
@@ -186,6 +198,9 @@ service Grafeas {
186
198
  returns (ListNoteOccurrencesResponse) {
187
199
  option (google.api.http) = {
188
200
  get: "/v1/{name=projects/*/notes/*}/occurrences"
201
+ additional_bindings {
202
+ get: "/v1/{name=projects/*/locations/*/notes/*}/occurrences"
203
+ }
189
204
  };
190
205
  option (google.api.method_signature) = "name,filter";
191
206
  }
@@ -249,6 +264,8 @@ message Occurrence {
249
264
  grafeas.v1.ComplianceOccurrence compliance = 16;
250
265
  // Describes an attestation of an artifact using dsse.
251
266
  grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17;
267
+ // Describes a specific SBOM reference occurrences.
268
+ grafeas.v1.SBOMReferenceOccurrence sbom_reference = 19;
252
269
  }
253
270
 
254
271
  // https://github.com/secure-systems-lab/dsse
@@ -317,6 +334,8 @@ message Note {
317
334
  grafeas.v1.DSSEAttestationNote dsse_attestation = 19;
318
335
  // A note describing a vulnerability assessment.
319
336
  grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20;
337
+ // A note describing an SBOM reference.
338
+ grafeas.v1.SBOMReferenceNote sbom_reference = 21;
320
339
  }
321
340
  }
322
341
 
@@ -16,6 +16,8 @@ syntax = "proto3";
16
16
 
17
17
  package grafeas.v1;
18
18
 
19
+ import "google/protobuf/struct.proto";
20
+ import "google/protobuf/timestamp.proto";
19
21
  import "grafeas/v1/intoto_provenance.proto";
20
22
  import "grafeas/v1/slsa_provenance.proto";
21
23
  import "grafeas/v1/slsa_provenance_zero_two.proto";
@@ -50,3 +52,55 @@ message Subject {
50
52
  // https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet
51
53
  map<string, string> digest = 2;
52
54
  }
55
+
56
+ message InTotoSlsaProvenanceV1 {
57
+ // InToto spec defined at
58
+ // https://github.com/in-toto/attestation/tree/main/spec#statement
59
+ string type = 1 [json_name = "_type"];
60
+ repeated Subject subject = 2;
61
+ string predicate_type = 3;
62
+ SlsaProvenanceV1 predicate = 4;
63
+
64
+ // Keep in sync with schema at
65
+ // https://github.com/slsa-framework/slsa/blob/main/docs/provenance/schema/v1/provenance.proto
66
+ // Builder renamed to ProvenanceBuilder because of Java conflicts.
67
+ message SlsaProvenanceV1 {
68
+ BuildDefinition build_definition = 1;
69
+ RunDetails run_details = 2;
70
+ }
71
+
72
+ message BuildDefinition {
73
+ string build_type = 1;
74
+ google.protobuf.Struct external_parameters = 2;
75
+ google.protobuf.Struct internal_parameters = 3;
76
+ repeated ResourceDescriptor resolved_dependencies = 4;
77
+ }
78
+
79
+ message ResourceDescriptor {
80
+ string name = 1;
81
+ string uri = 2;
82
+ map<string, string> digest = 3;
83
+ bytes content = 4;
84
+ string download_location = 5;
85
+ string media_type = 6;
86
+ map<string, google.protobuf.Value> annotations = 7;
87
+ }
88
+
89
+ message RunDetails {
90
+ ProvenanceBuilder builder = 1;
91
+ BuildMetadata metadata = 2;
92
+ repeated ResourceDescriptor byproducts = 3;
93
+ }
94
+
95
+ message ProvenanceBuilder {
96
+ string id = 1;
97
+ map<string, string> version = 2;
98
+ repeated ResourceDescriptor builder_dependencies = 3;
99
+ }
100
+
101
+ message BuildMetadata {
102
+ string invocation_id = 1;
103
+ google.protobuf.Timestamp started_on = 2;
104
+ google.protobuf.Timestamp finished_on = 3;
105
+ }
106
+ }
@@ -0,0 +1,78 @@
1
+ // Copyright 2023 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/common.proto";
20
+ import "grafeas/v1/intoto_statement.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
+ // The note representing an SBOM reference.
28
+ message SBOMReferenceNote {
29
+ // The format that SBOM takes. E.g. may be spdx, cyclonedx, etc...
30
+ string format = 1;
31
+ // The version of the format that the SBOM takes. E.g. if the format
32
+ // is spdx, the version may be 2.3.
33
+ string version = 2;
34
+ }
35
+
36
+ // The occurrence representing an SBOM reference as applied to a specific
37
+ // resource. The occurrence follows the DSSE specification. See
38
+ // https://github.com/secure-systems-lab/dsse/blob/master/envelope.md for more
39
+ // details.
40
+ message SBOMReferenceOccurrence {
41
+ // The actual payload that contains the SBOM reference data.
42
+ SbomReferenceIntotoPayload payload = 1;
43
+ // The kind of payload that SbomReferenceIntotoPayload takes. Since it's in
44
+ // the intoto format, this value is expected to be
45
+ // 'application/vnd.in-toto+json'.
46
+ string payload_type = 2;
47
+ // The signatures over the payload.
48
+ repeated EnvelopeSignature signatures = 3;
49
+ }
50
+
51
+ // The actual payload that contains the SBOM Reference data.
52
+ // The payload follows the intoto statement specification. See
53
+ // https://github.com/in-toto/attestation/blob/main/spec/v1.0/statement.md
54
+ // for more details.
55
+ message SbomReferenceIntotoPayload {
56
+ // Identifier for the schema of the Statement.
57
+ string type = 1 [json_name = "_type"];
58
+ // URI identifying the type of the Predicate.
59
+ string predicate_type = 2;
60
+ // Set of software artifacts that the attestation applies to. Each element
61
+ // represents a single software artifact.
62
+ repeated Subject subject = 3;
63
+ // Additional parameters of the Predicate. Includes the actual data about the
64
+ // SBOM.
65
+ SbomReferenceIntotoPredicate predicate = 4;
66
+ }
67
+
68
+ // A predicate which describes the SBOM being referenced.
69
+ message SbomReferenceIntotoPredicate {
70
+ // The person or system referring this predicate to the consumer.
71
+ string referrer_id = 1;
72
+ // The location of the SBOM.
73
+ string location = 2;
74
+ // The mime type of the SBOM.
75
+ string mime_type = 3;
76
+ // A map of algorithm to digest of the contents of the SBOM.
77
+ map<string, string> digest = 4;
78
+ }
@@ -91,7 +91,12 @@ message VulnerabilityAssessmentNote {
91
91
  message Assessment {
92
92
  // Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
93
93
  // tracking number for the vulnerability.
94
- string cve = 1;
94
+ // Deprecated: Use vulnerability_id instead to denote CVEs.
95
+ string cve = 1 [deprecated = true];
96
+
97
+ // The vulnerability identifier for this Assessment. Will hold one of
98
+ // common identifiers e.g. CVE, GHSA etc.
99
+ string vulnerability_id = 9;
95
100
 
96
101
  // A one sentence description of this Vex.
97
102
  string short_description = 2;
@@ -259,7 +259,12 @@ message VulnerabilityOccurrence {
259
259
  message VexAssessment {
260
260
  // Holds the MITRE standard Common Vulnerabilities and Exposures (CVE)
261
261
  // tracking number for the vulnerability.
262
- string cve = 1;
262
+ // Deprecated: Use vulnerability_id instead to denote CVEs.
263
+ string cve = 1 [deprecated = true];
264
+
265
+ // The vulnerability identifier for this Assessment. Will hold one of
266
+ // common identifiers e.g. CVE, GHSA etc.
267
+ string vulnerability_id = 8;
263
268
 
264
269
  // Holds a list of references associated with this vulnerability item and
265
270
  // assessment.
@@ -288,10 +293,13 @@ message VulnerabilityOccurrence {
288
293
  grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification
289
294
  justification = 7;
290
295
 
291
- // Next ID: 8
296
+ // Next ID: 9
292
297
  }
293
298
 
294
299
  VexAssessment vex_assessment = 13;
295
300
 
296
- // Next free ID is 14.
301
+ // Occurrence-specific extra details about the vulnerability.
302
+ string extra_details = 14;
303
+
304
+ // Next free ID is 15.
297
305
  }