google-cloud-container_analysis-v1 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/container_analysis/v1/container_analysis/client.rb +80 -12
- data/lib/google/cloud/container_analysis/v1/version.rb +1 -1
- data/lib/google/devtools/containeranalysis/v1/containeranalysis_pb.rb +2 -2
- data/proto_docs/grafeas/v1/common.rb +31 -2
- data/proto_docs/grafeas/v1/package.rb +8 -0
- data/proto_docs/grafeas/v1/vulnerability.rb +38 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be9ac413a65fb2d2902d17aa3d7fb3b79252e886a04f1922297bdf1305f4c937
|
4
|
+
data.tar.gz: f9b4ee77ddf95ec53cc4502e049c74b1e2cc8ddc47880f452a23c533b2fca683
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59de44caff6a18ddac82540215a170eec07eda61360af7f9df94f5a341439e78bced9e8397b79a8bf46bff6df0e885257505e1cef7d85d66590251804cf5c4cf
|
7
|
+
data.tar.gz: 59999236822cb8b9b34358f0c3c244690d3c4dc59d22fa99eb4799ef01c673875cbf4205b8c4d060eb22fb4a1db384e489f29958c31915f384ba689f0d378896
|
@@ -204,6 +204,21 @@ module Google
|
|
204
204
|
#
|
205
205
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
206
206
|
#
|
207
|
+
# @example Basic example
|
208
|
+
# require "google/cloud/container_analysis/v1"
|
209
|
+
#
|
210
|
+
# # Create a client object. The client can be reused for multiple calls.
|
211
|
+
# client = Google::Cloud::ContainerAnalysis::V1::ContainerAnalysis::Client.new
|
212
|
+
#
|
213
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
214
|
+
# request = Google::Iam::V1::SetIamPolicyRequest.new
|
215
|
+
#
|
216
|
+
# # Call the set_iam_policy method.
|
217
|
+
# result = client.set_iam_policy request
|
218
|
+
#
|
219
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
220
|
+
# p result
|
221
|
+
#
|
207
222
|
def set_iam_policy request, options = nil
|
208
223
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
209
224
|
|
@@ -221,9 +236,11 @@ module Google
|
|
221
236
|
gapic_version: ::Google::Cloud::ContainerAnalysis::V1::VERSION
|
222
237
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
223
238
|
|
224
|
-
header_params = {
|
225
|
-
|
226
|
-
|
239
|
+
header_params = {}
|
240
|
+
if request.resource
|
241
|
+
header_params["resource"] = request.resource
|
242
|
+
end
|
243
|
+
|
227
244
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
228
245
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
229
246
|
|
@@ -283,6 +300,21 @@ module Google
|
|
283
300
|
#
|
284
301
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
285
302
|
#
|
303
|
+
# @example Basic example
|
304
|
+
# require "google/cloud/container_analysis/v1"
|
305
|
+
#
|
306
|
+
# # Create a client object. The client can be reused for multiple calls.
|
307
|
+
# client = Google::Cloud::ContainerAnalysis::V1::ContainerAnalysis::Client.new
|
308
|
+
#
|
309
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
310
|
+
# request = Google::Iam::V1::GetIamPolicyRequest.new
|
311
|
+
#
|
312
|
+
# # Call the get_iam_policy method.
|
313
|
+
# result = client.get_iam_policy request
|
314
|
+
#
|
315
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
316
|
+
# p result
|
317
|
+
#
|
286
318
|
def get_iam_policy request, options = nil
|
287
319
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
288
320
|
|
@@ -300,9 +332,11 @@ module Google
|
|
300
332
|
gapic_version: ::Google::Cloud::ContainerAnalysis::V1::VERSION
|
301
333
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
302
334
|
|
303
|
-
header_params = {
|
304
|
-
|
305
|
-
|
335
|
+
header_params = {}
|
336
|
+
if request.resource
|
337
|
+
header_params["resource"] = request.resource
|
338
|
+
end
|
339
|
+
|
306
340
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
307
341
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
308
342
|
|
@@ -363,6 +397,21 @@ module Google
|
|
363
397
|
#
|
364
398
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
365
399
|
#
|
400
|
+
# @example Basic example
|
401
|
+
# require "google/cloud/container_analysis/v1"
|
402
|
+
#
|
403
|
+
# # Create a client object. The client can be reused for multiple calls.
|
404
|
+
# client = Google::Cloud::ContainerAnalysis::V1::ContainerAnalysis::Client.new
|
405
|
+
#
|
406
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
407
|
+
# request = Google::Iam::V1::TestIamPermissionsRequest.new
|
408
|
+
#
|
409
|
+
# # Call the test_iam_permissions method.
|
410
|
+
# result = client.test_iam_permissions request
|
411
|
+
#
|
412
|
+
# # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
|
413
|
+
# p result
|
414
|
+
#
|
366
415
|
def test_iam_permissions request, options = nil
|
367
416
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
368
417
|
|
@@ -380,9 +429,11 @@ module Google
|
|
380
429
|
gapic_version: ::Google::Cloud::ContainerAnalysis::V1::VERSION
|
381
430
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
382
431
|
|
383
|
-
header_params = {
|
384
|
-
|
385
|
-
|
432
|
+
header_params = {}
|
433
|
+
if request.resource
|
434
|
+
header_params["resource"] = request.resource
|
435
|
+
end
|
436
|
+
|
386
437
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
387
438
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
388
439
|
|
@@ -434,6 +485,21 @@ module Google
|
|
434
485
|
#
|
435
486
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
436
487
|
#
|
488
|
+
# @example Basic example
|
489
|
+
# require "google/cloud/container_analysis/v1"
|
490
|
+
#
|
491
|
+
# # Create a client object. The client can be reused for multiple calls.
|
492
|
+
# client = Google::Cloud::ContainerAnalysis::V1::ContainerAnalysis::Client.new
|
493
|
+
#
|
494
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
495
|
+
# request = Google::Cloud::ContainerAnalysis::V1::GetVulnerabilityOccurrencesSummaryRequest.new
|
496
|
+
#
|
497
|
+
# # Call the get_vulnerability_occurrences_summary method.
|
498
|
+
# result = client.get_vulnerability_occurrences_summary request
|
499
|
+
#
|
500
|
+
# # The returned object is of type Google::Cloud::ContainerAnalysis::V1::VulnerabilityOccurrencesSummary.
|
501
|
+
# p result
|
502
|
+
#
|
437
503
|
def get_vulnerability_occurrences_summary request, options = nil
|
438
504
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
439
505
|
|
@@ -451,9 +517,11 @@ module Google
|
|
451
517
|
gapic_version: ::Google::Cloud::ContainerAnalysis::V1::VERSION
|
452
518
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
453
519
|
|
454
|
-
header_params = {
|
455
|
-
|
456
|
-
|
520
|
+
header_params = {}
|
521
|
+
if request.parent
|
522
|
+
header_params["parent"] = request.parent
|
523
|
+
end
|
524
|
+
|
457
525
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
458
526
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
459
527
|
|
@@ -1,8 +1,6 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/devtools/containeranalysis/v1/containeranalysis.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/annotations_pb'
|
7
5
|
require 'google/api/client_pb'
|
8
6
|
require 'google/api/field_behavior_pb'
|
@@ -11,6 +9,8 @@ require 'google/iam/v1/iam_policy_pb'
|
|
11
9
|
require 'google/iam/v1/policy_pb'
|
12
10
|
require 'google/protobuf/timestamp_pb'
|
13
11
|
require 'grafeas/v1/vulnerability_pb'
|
12
|
+
require 'google/protobuf'
|
13
|
+
|
14
14
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
15
15
|
add_file("google/devtools/containeranalysis/v1/containeranalysis.proto", :syntax => :proto3) do
|
16
16
|
add_message "google.devtools.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest" do
|
@@ -65,7 +65,7 @@ module Grafeas
|
|
65
65
|
# @return [::String]
|
66
66
|
# The identifier for the public key that verifies this signature.
|
67
67
|
# * The `public_key_id` is required.
|
68
|
-
# * The `public_key_id`
|
68
|
+
# * The `public_key_id` SHOULD be an RFC3986 conformant URI.
|
69
69
|
# * When possible, the `public_key_id` SHOULD be an immutable reference,
|
70
70
|
# such as a cryptographic digest.
|
71
71
|
#
|
@@ -85,9 +85,32 @@ module Grafeas
|
|
85
85
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
86
86
|
end
|
87
87
|
|
88
|
+
# MUST match
|
89
|
+
# https://github.com/secure-systems-lab/dsse/blob/master/envelope.proto. An
|
90
|
+
# authenticated message of arbitrary type.
|
91
|
+
# @!attribute [rw] payload
|
92
|
+
# @return [::String]
|
93
|
+
# @!attribute [rw] payload_type
|
94
|
+
# @return [::String]
|
95
|
+
# @!attribute [rw] signatures
|
96
|
+
# @return [::Array<::Grafeas::V1::EnvelopeSignature>]
|
97
|
+
class Envelope
|
98
|
+
include ::Google::Protobuf::MessageExts
|
99
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
100
|
+
end
|
101
|
+
|
102
|
+
# @!attribute [rw] sig
|
103
|
+
# @return [::String]
|
104
|
+
# @!attribute [rw] keyid
|
105
|
+
# @return [::String]
|
106
|
+
class EnvelopeSignature
|
107
|
+
include ::Google::Protobuf::MessageExts
|
108
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
109
|
+
end
|
110
|
+
|
88
111
|
# Kind represents the kinds of notes supported.
|
89
112
|
module NoteKind
|
90
|
-
#
|
113
|
+
# Default value. This value is unused.
|
91
114
|
NOTE_KIND_UNSPECIFIED = 0
|
92
115
|
|
93
116
|
# The note and occurrence represent a package vulnerability.
|
@@ -113,6 +136,12 @@ module Grafeas
|
|
113
136
|
|
114
137
|
# This represents an available package upgrade.
|
115
138
|
UPGRADE = 8
|
139
|
+
|
140
|
+
# This represents a Compliance Note
|
141
|
+
COMPLIANCE = 9
|
142
|
+
|
143
|
+
# This represents a DSSE attestation Note
|
144
|
+
DSSE_ATTESTATION = 10
|
116
145
|
end
|
117
146
|
end
|
118
147
|
end
|
@@ -101,6 +101,14 @@ module Grafeas
|
|
101
101
|
# @!attribute [rw] revision
|
102
102
|
# @return [::String]
|
103
103
|
# The iteration of the package build from the above version.
|
104
|
+
# @!attribute [rw] inclusive
|
105
|
+
# @return [::Boolean]
|
106
|
+
# Whether this version is specifying part of an inclusive range. Grafeas
|
107
|
+
# does not have the capability to specify version ranges; instead we have
|
108
|
+
# fields that specify start version and end versions. At times this is
|
109
|
+
# insufficient - we also need to specify whether the version is included in
|
110
|
+
# the range or is excluded from the range. This boolean is expected to be set
|
111
|
+
# to true when the version is included in a range.
|
104
112
|
# @!attribute [rw] kind
|
105
113
|
# @return [::Grafeas::V1::Version::VersionKind]
|
106
114
|
# Required. Distinguishes between sentinel MIN/MAX versions and normal
|
@@ -109,6 +109,12 @@ module Grafeas
|
|
109
109
|
# The time this information was last changed at the source. This is an
|
110
110
|
# upstream timestamp from the underlying information source - e.g. Ubuntu
|
111
111
|
# security tracker.
|
112
|
+
# @!attribute [rw] source
|
113
|
+
# @return [::String]
|
114
|
+
# The source from which the information in this Detail was obtained.
|
115
|
+
# @!attribute [rw] vendor
|
116
|
+
# @return [::String]
|
117
|
+
# The name of the vendor of the product.
|
112
118
|
class Detail
|
113
119
|
include ::Google::Protobuf::MessageExts
|
114
120
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -161,6 +167,9 @@ module Grafeas
|
|
161
167
|
# Output only. The CVSS score of this vulnerability. CVSS score is on a
|
162
168
|
# scale of 0 - 10 where 0 indicates low severity and 10 indicates high
|
163
169
|
# severity.
|
170
|
+
# @!attribute [rw] cvssv3
|
171
|
+
# @return [::Grafeas::V1::VulnerabilityOccurrence::CVSSV3]
|
172
|
+
# The cvss v3 score for the vulnerability.
|
164
173
|
# @!attribute [rw] package_issue
|
165
174
|
# @return [::Array<::Grafeas::V1::VulnerabilityOccurrence::PackageIssue>]
|
166
175
|
# Required. The set of affected locations and their fixes (if available)
|
@@ -178,6 +187,14 @@ module Grafeas
|
|
178
187
|
# @return [::Grafeas::V1::Severity]
|
179
188
|
# The distro assigned severity for this vulnerability when it is available,
|
180
189
|
# otherwise this is the note provider assigned severity.
|
190
|
+
#
|
191
|
+
# When there are multiple PackageIssues for this vulnerability, they can have
|
192
|
+
# different effective severities because some might be provided by the distro
|
193
|
+
# while others are provided by the language ecosystem for a language pack.
|
194
|
+
# For this reason, it is advised to use the effective severity on the
|
195
|
+
# PackageIssue level. In the case where multiple PackageIssues have differing
|
196
|
+
# effective severities, this field should be the highest severity for any of
|
197
|
+
# the PackageIssues.
|
181
198
|
# @!attribute [rw] fix_available
|
182
199
|
# @return [::Boolean]
|
183
200
|
# Output only. Whether at least one of the affected packages has a fix
|
@@ -186,6 +203,19 @@ module Grafeas
|
|
186
203
|
include ::Google::Protobuf::MessageExts
|
187
204
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
188
205
|
|
206
|
+
# The CVSS v3 score for this vulnerability.
|
207
|
+
# @!attribute [rw] base_score
|
208
|
+
# @return [::Float]
|
209
|
+
# The base score for for this vulnerability according to cvss v3.
|
210
|
+
# @!attribute [rw] severity
|
211
|
+
# @return [::Grafeas::V1::Severity]
|
212
|
+
# The severity rating assigned to this vulnerability by vulnerability
|
213
|
+
# provider.
|
214
|
+
class CVSSV3
|
215
|
+
include ::Google::Protobuf::MessageExts
|
216
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
217
|
+
end
|
218
|
+
|
189
219
|
# A detail for a distro and package this vulnerability occurrence was found
|
190
220
|
# in and its associated fix (if one is available).
|
191
221
|
# @!attribute [rw] affected_cpe_uri
|
@@ -215,6 +245,14 @@ module Grafeas
|
|
215
245
|
# @!attribute [rw] fix_available
|
216
246
|
# @return [::Boolean]
|
217
247
|
# Output only. Whether a fix is available for this package.
|
248
|
+
# @!attribute [rw] package_type
|
249
|
+
# @return [::String]
|
250
|
+
# The type of package (e.g. OS, MAVEN, GO).
|
251
|
+
# @!attribute [r] effective_severity
|
252
|
+
# @return [::Grafeas::V1::Severity]
|
253
|
+
# The distro or language system assigned severity for this vulnerability
|
254
|
+
# when that is available and note provider assigned severity when it is not
|
255
|
+
# available.
|
218
256
|
class PackageIssue
|
219
257
|
include ::Google::Protobuf::MessageExts
|
220
258
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-container_analysis-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|