forked from googleapis/google-api-ruby-client
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathclasses.rb
More file actions
8211 lines (6849 loc) · 343 KB
/
Copy pathclasses.rb
File metadata and controls
8211 lines (6849 loc) · 343 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module ContaineranalysisV1
# AISkillAnalysisNote provides the metadata of an AI-based skill analysis.
class AiSkillAnalysisNote
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# AISkillAnalysisOccurrence provides the results of an AI-based skill analysis.
class AiSkillAnalysisOccurrence
include Google::Apis::Core::Hashable
# Findings produced by the analysis.
# Corresponds to the JSON property `findings`
# @return [Array<Google::Apis::ContaineranalysisV1::Finding>]
attr_accessor :findings
# Maximum severity found among findings.
# Corresponds to the JSON property `maxSeverity`
# @return [String]
attr_accessor :max_severity
# Name of the skill that produced this analysis.
# Corresponds to the JSON property `skillName`
# @return [String]
attr_accessor :skill_name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@findings = args[:findings] if args.key?(:findings)
@max_severity = args[:max_severity] if args.key?(:max_severity)
@skill_name = args[:skill_name] if args.key?(:skill_name)
end
end
# An alias to a repo revision.
class AliasContext
include Google::Apis::Core::Hashable
# The alias kind.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The alias name.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] if args.key?(:kind)
@name = args[:name] if args.key?(:name)
end
end
# Indicates which analysis completed successfully. Multiple types of analysis
# can be performed on a single resource.
class AnalysisCompleted
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `analysisType`
# @return [Array<String>]
attr_accessor :analysis_type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@analysis_type = args[:analysis_type] if args.key?(:analysis_type)
end
end
# Artifact describes a build product.
class Artifact
include Google::Apis::Core::Hashable
# Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
# container.
# Corresponds to the JSON property `checksum`
# @return [String]
attr_accessor :checksum
# Artifact ID, if any; for container images, this will be a URL by digest like `
# gcr.io/projectID/imagename@sha256:123456`.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Related artifact names. This may be the path to a binary or jar file, or in
# the case of a container build, the name used to push the container image to
# Google Container Registry, as presented to `docker push`. Note that a single
# Artifact ID can have multiple names, for example if two tags are applied to
# one image.
# Corresponds to the JSON property `names`
# @return [Array<String>]
attr_accessor :names
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@checksum = args[:checksum] if args.key?(:checksum)
@id = args[:id] if args.key?(:id)
@names = args[:names] if args.key?(:names)
end
end
# Assessment provides all information that is related to a single vulnerability
# for this product.
class Assessment
include Google::Apis::Core::Hashable
# Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) tracking
# number for the vulnerability. Deprecated: Use vulnerability_id instead to
# denote CVEs.
# Corresponds to the JSON property `cve`
# @return [String]
attr_accessor :cve
# Contains information about the impact of this vulnerability, this will change
# with time.
# Corresponds to the JSON property `impacts`
# @return [Array<String>]
attr_accessor :impacts
# Justification provides the justification when the state of the assessment if
# NOT_AFFECTED.
# Corresponds to the JSON property `justification`
# @return [Google::Apis::ContaineranalysisV1::Justification]
attr_accessor :justification
# A detailed description of this Vex.
# Corresponds to the JSON property `longDescription`
# @return [String]
attr_accessor :long_description
# Holds a list of references associated with this vulnerability item and
# assessment. These uris have additional information about the vulnerability and
# the assessment itself. E.g. Link to a document which details how this
# assessment concluded the state of this vulnerability.
# Corresponds to the JSON property `relatedUris`
# @return [Array<Google::Apis::ContaineranalysisV1::RelatedUrl>]
attr_accessor :related_uris
# Specifies details on how to handle (and presumably, fix) a vulnerability.
# Corresponds to the JSON property `remediations`
# @return [Array<Google::Apis::ContaineranalysisV1::Remediation>]
attr_accessor :remediations
# A one sentence description of this Vex.
# Corresponds to the JSON property `shortDescription`
# @return [String]
attr_accessor :short_description
# Provides the state of this Vulnerability assessment.
# Corresponds to the JSON property `state`
# @return [String]
attr_accessor :state
# The vulnerability identifier for this Assessment. Will hold one of common
# identifiers e.g. CVE, GHSA etc.
# Corresponds to the JSON property `vulnerabilityId`
# @return [String]
attr_accessor :vulnerability_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@cve = args[:cve] if args.key?(:cve)
@impacts = args[:impacts] if args.key?(:impacts)
@justification = args[:justification] if args.key?(:justification)
@long_description = args[:long_description] if args.key?(:long_description)
@related_uris = args[:related_uris] if args.key?(:related_uris)
@remediations = args[:remediations] if args.key?(:remediations)
@short_description = args[:short_description] if args.key?(:short_description)
@state = args[:state] if args.key?(:state)
@vulnerability_id = args[:vulnerability_id] if args.key?(:vulnerability_id)
end
end
# Note kind that represents a logical attestation "role" or "authority". For
# example, an organization might have one `Authority` for "QA" and one for "
# build". This note is intended to act strictly as a grouping mechanism for the
# attached occurrences (Attestations). This grouping mechanism also provides a
# security boundary, since IAM ACLs gate the ability for a principle to attach
# an occurrence to a given note. It also provides a single point of lookup to
# find all attached attestation occurrences, even if they don't all live in the
# same project.
class AttestationNote
include Google::Apis::Core::Hashable
# This submessage provides human-readable hints about the purpose of the
# authority. Because the name of a note acts as its resource reference, it is
# important to disambiguate the canonical name of the Note (which might be a
# UUID for security purposes) from "readable" names more suitable for debug
# output. Note that these hints should not be used to look up authorities in
# security sensitive contexts, such as when looking up attestations to verify.
# Corresponds to the JSON property `hint`
# @return [Google::Apis::ContaineranalysisV1::Hint]
attr_accessor :hint
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@hint = args[:hint] if args.key?(:hint)
end
end
# Occurrence that represents a single "attestation". The authenticity of an
# attestation can be verified using the attached signature. If the verifier
# trusts the public key of the signer, then verifying the signature is
# sufficient to establish trust. In this circumstance, the authority to which
# this attestation is attached is primarily useful for lookup (how to find this
# attestation if you already know the authority and artifact to be verified) and
# intent (for which authority this attestation was intended to sign.
class AttestationOccurrence
include Google::Apis::Core::Hashable
# One or more JWTs encoding a self-contained attestation. Each JWT encodes the
# payload that it verifies within the JWT itself. Verifier implementation SHOULD
# ignore the `serialized_payload` field when verifying these JWTs. If only JWTs
# are present on this AttestationOccurrence, then the `serialized_payload`
# SHOULD be left empty. Each JWT SHOULD encode a claim specific to the `
# resource_uri` of this Occurrence, but this is not validated by Grafeas
# metadata API implementations. The JWT itself is opaque to Grafeas.
# Corresponds to the JSON property `jwts`
# @return [Array<Google::Apis::ContaineranalysisV1::Jwt>]
attr_accessor :jwts
# Required. The serialized payload that is verified by one or more `signatures`.
# Corresponds to the JSON property `serializedPayload`
# NOTE: Values are automatically base64 encoded/decoded in the client library.
# @return [String]
attr_accessor :serialized_payload
# One or more signatures over `serialized_payload`. Verifier implementations
# should consider this attestation message verified if at least one `signature`
# verifies `serialized_payload`. See `Signature` in common.proto for more
# details on signature structure and verification.
# Corresponds to the JSON property `signatures`
# @return [Array<Google::Apis::ContaineranalysisV1::Signature>]
attr_accessor :signatures
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@jwts = args[:jwts] if args.key?(:jwts)
@serialized_payload = args[:serialized_payload] if args.key?(:serialized_payload)
@signatures = args[:signatures] if args.key?(:signatures)
end
end
# BaseImage describes a base image of a container image.
class BaseImage
include Google::Apis::Core::Hashable
# The number of layers that the base image is composed of.
# Corresponds to the JSON property `layerCount`
# @return [Fixnum]
attr_accessor :layer_count
# The name of the base image.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The registry in which the base image is from.
# Corresponds to the JSON property `registry`
# @return [String]
attr_accessor :registry
# The repository name in which the base image is from.
# Corresponds to the JSON property `repository`
# @return [String]
attr_accessor :repository
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@layer_count = args[:layer_count] if args.key?(:layer_count)
@name = args[:name] if args.key?(:name)
@registry = args[:registry] if args.key?(:registry)
@repository = args[:repository] if args.key?(:repository)
end
end
# Request to create notes in batch.
class BatchCreateNotesRequest
include Google::Apis::Core::Hashable
# Required. The notes to create. Max allowed length is 1000.
# Corresponds to the JSON property `notes`
# @return [Hash<String,Google::Apis::ContaineranalysisV1::Note>]
attr_accessor :notes
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@notes = args[:notes] if args.key?(:notes)
end
end
# Response for creating notes in batch.
class BatchCreateNotesResponse
include Google::Apis::Core::Hashable
# The notes that were created.
# Corresponds to the JSON property `notes`
# @return [Array<Google::Apis::ContaineranalysisV1::Note>]
attr_accessor :notes
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@notes = args[:notes] if args.key?(:notes)
end
end
# Request to create occurrences in batch.
class BatchCreateOccurrencesRequest
include Google::Apis::Core::Hashable
# Required. The occurrences to create. Max allowed length is 1000.
# Corresponds to the JSON property `occurrences`
# @return [Array<Google::Apis::ContaineranalysisV1::Occurrence>]
attr_accessor :occurrences
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@occurrences = args[:occurrences] if args.key?(:occurrences)
end
end
# Response for creating occurrences in batch.
class BatchCreateOccurrencesResponse
include Google::Apis::Core::Hashable
# The occurrences that were created.
# Corresponds to the JSON property `occurrences`
# @return [Array<Google::Apis::ContaineranalysisV1::Occurrence>]
attr_accessor :occurrences
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@occurrences = args[:occurrences] if args.key?(:occurrences)
end
end
# Associates `members`, or principals, with a `role`.
class Binding
include Google::Apis::Core::Hashable
# Represents a textual expression in the Common Expression Language (CEL) syntax.
# CEL is a C-like expression language. The syntax and semantics of CEL are
# documented at https://github.com/google/cel-spec. Example (Comparison): title:
# "Summary size limit" description: "Determines if a summary is less than 100
# chars" expression: "document.summary.size() < 100" Example (Equality): title: "
# Requestor is owner" description: "Determines if requestor is the document
# owner" expression: "document.owner == request.auth.claims.email" Example (
# Logic): title: "Public documents" description: "Determine whether the document
# should be publicly visible" expression: "document.type != 'private' &&
# document.type != 'internal'" Example (Data Manipulation): title: "Notification
# string" description: "Create a notification string with a timestamp."
# expression: "'New message received at ' + string(document.create_time)" The
# exact variables and functions that may be referenced within an expression are
# determined by the service that evaluates it. See the service documentation for
# additional information.
# Corresponds to the JSON property `condition`
# @return [Google::Apis::ContaineranalysisV1::Expr]
attr_accessor :condition
# Specifies the principals requesting access for a Google Cloud resource. `
# members` can have the following values: * `allUsers`: A special identifier
# that represents anyone who is on the internet; with or without a Google
# account. * `allAuthenticatedUsers`: A special identifier that represents
# anyone who is authenticated with a Google account or a service account. Does
# not include identities that come from external identity providers (IdPs)
# through identity federation. * `user:`emailid``: An email address that
# represents a specific Google account. For example, `alice@example.com` . * `
# serviceAccount:`emailid``: An email address that represents a Google service
# account. For example, `my-other-app@appspot.gserviceaccount.com`. * `
# serviceAccount:`projectid`.svc.id.goog[`namespace`/`kubernetes-sa`]`: An
# identifier for a [Kubernetes service account](https://cloud.google.com/
# kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-
# project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:`emailid``: An
# email address that represents a Google group. For example, `admins@example.com`
# . * `domain:`domain``: The G Suite domain (primary) that represents all the
# users of that domain. For example, `google.com` or `example.com`. * `principal:
# //iam.googleapis.com/locations/global/workforcePools/`pool_id`/subject/`
# subject_attribute_value``: A single identity in a workforce identity pool. * `
# principalSet://iam.googleapis.com/locations/global/workforcePools/`pool_id`/
# group/`group_id``: All workforce identities in a group. * `principalSet://iam.
# googleapis.com/locations/global/workforcePools/`pool_id`/attribute.`
# attribute_name`/`attribute_value``: All workforce identities with a specific
# attribute value. * `principalSet://iam.googleapis.com/locations/global/
# workforcePools/`pool_id`/*`: All identities in a workforce identity pool. * `
# principal://iam.googleapis.com/projects/`project_number`/locations/global/
# workloadIdentityPools/`pool_id`/subject/`subject_attribute_value``: A single
# identity in a workload identity pool. * `principalSet://iam.googleapis.com/
# projects/`project_number`/locations/global/workloadIdentityPools/`pool_id`/
# group/`group_id``: A workload identity pool group. * `principalSet://iam.
# googleapis.com/projects/`project_number`/locations/global/
# workloadIdentityPools/`pool_id`/attribute.`attribute_name`/`attribute_value``:
# All identities in a workload identity pool with a certain attribute. * `
# principalSet://iam.googleapis.com/projects/`project_number`/locations/global/
# workloadIdentityPools/`pool_id`/*`: All identities in a workload identity pool.
# * `deleted:user:`emailid`?uid=`uniqueid``: An email address (plus unique
# identifier) representing a user that has been recently deleted. For example, `
# alice@example.com?uid=123456789012345678901`. If the user is recovered, this
# value reverts to `user:`emailid`` and the recovered user retains the role in
# the binding. * `deleted:serviceAccount:`emailid`?uid=`uniqueid``: An email
# address (plus unique identifier) representing a service account that has been
# recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=
# 123456789012345678901`. If the service account is undeleted, this value
# reverts to `serviceAccount:`emailid`` and the undeleted service account
# retains the role in the binding. * `deleted:group:`emailid`?uid=`uniqueid``:
# An email address (plus unique identifier) representing a Google group that has
# been recently deleted. For example, `admins@example.com?uid=
# 123456789012345678901`. If the group is recovered, this value reverts to `
# group:`emailid`` and the recovered group retains the role in the binding. * `
# deleted:principal://iam.googleapis.com/locations/global/workforcePools/`
# pool_id`/subject/`subject_attribute_value``: Deleted single identity in a
# workforce identity pool. For example, `deleted:principal://iam.googleapis.com/
# locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
# Corresponds to the JSON property `members`
# @return [Array<String>]
attr_accessor :members
# Role that is assigned to the list of `members`, or principals. For example, `
# roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM
# roles and permissions, see the [IAM documentation](https://cloud.google.com/
# iam/docs/roles-overview). For a list of the available pre-defined roles, see [
# here](https://cloud.google.com/iam/docs/understanding-roles).
# Corresponds to the JSON property `role`
# @return [String]
attr_accessor :role
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@condition = args[:condition] if args.key?(:condition)
@members = args[:members] if args.key?(:members)
@role = args[:role] if args.key?(:role)
end
end
#
class BuildDefinition
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `buildType`
# @return [String]
attr_accessor :build_type
#
# Corresponds to the JSON property `externalParameters`
# @return [Hash<String,Object>]
attr_accessor :external_parameters
#
# Corresponds to the JSON property `internalParameters`
# @return [Hash<String,Object>]
attr_accessor :internal_parameters
#
# Corresponds to the JSON property `resolvedDependencies`
# @return [Array<Google::Apis::ContaineranalysisV1::ResourceDescriptor>]
attr_accessor :resolved_dependencies
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@build_type = args[:build_type] if args.key?(:build_type)
@external_parameters = args[:external_parameters] if args.key?(:external_parameters)
@internal_parameters = args[:internal_parameters] if args.key?(:internal_parameters)
@resolved_dependencies = args[:resolved_dependencies] if args.key?(:resolved_dependencies)
end
end
#
class BuildMetadata
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `finishedOn`
# @return [String]
attr_accessor :finished_on
#
# Corresponds to the JSON property `invocationId`
# @return [String]
attr_accessor :invocation_id
#
# Corresponds to the JSON property `startedOn`
# @return [String]
attr_accessor :started_on
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@finished_on = args[:finished_on] if args.key?(:finished_on)
@invocation_id = args[:invocation_id] if args.key?(:invocation_id)
@started_on = args[:started_on] if args.key?(:started_on)
end
end
# Note holding the version of the provider's builder and the signature of the
# provenance message in the build details occurrence.
class BuildNote
include Google::Apis::Core::Hashable
# Required. Immutable. Version of the builder which produced this build.
# Corresponds to the JSON property `builderVersion`
# @return [String]
attr_accessor :builder_version
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@builder_version = args[:builder_version] if args.key?(:builder_version)
end
end
# Details of a build occurrence.
class BuildOccurrence
include Google::Apis::Core::Hashable
# In-Toto Slsa Provenance V1 represents a slsa provenance meeting the slsa spec,
# wrapped in an in-toto statement. This allows for direct jsonification of a to-
# spec in-toto slsa statement with a to-spec slsa provenance.
# Corresponds to the JSON property `inTotoSlsaProvenanceV1`
# @return [Google::Apis::ContaineranalysisV1::InTotoSlsaProvenanceV1]
attr_accessor :in_toto_slsa_provenance_v1
# Deprecated. See InTotoStatement for the replacement. In-toto Provenance
# representation as defined in spec.
# Corresponds to the JSON property `intotoProvenance`
# @return [Google::Apis::ContaineranalysisV1::InTotoProvenance]
attr_accessor :intoto_provenance
# Spec defined at https://github.com/in-toto/attestation/tree/main/spec#
# statement The serialized InTotoStatement will be stored as Envelope.payload.
# Envelope.payloadType is always "application/vnd.in-toto+json".
# Corresponds to the JSON property `intotoStatement`
# @return [Google::Apis::ContaineranalysisV1::InTotoStatement]
attr_accessor :intoto_statement
# Provenance of a build. Contains all information needed to verify the full
# details about the build from source to completion.
# Corresponds to the JSON property `provenance`
# @return [Google::Apis::ContaineranalysisV1::BuildProvenance]
attr_accessor :provenance
# Serialized JSON representation of the provenance, used in generating the build
# signature in the corresponding build note. After verifying the signature, `
# provenance_bytes` can be unmarshalled and compared to the provenance to
# confirm that it is unchanged. A base64-encoded string representation of the
# provenance bytes is used for the signature in order to interoperate with
# openssl which expects this format for signature verification. The serialized
# form is captured both to avoid ambiguity in how the provenance is marshalled
# to json as well to prevent incompatibilities with future changes.
# Corresponds to the JSON property `provenanceBytes`
# @return [String]
attr_accessor :provenance_bytes
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@in_toto_slsa_provenance_v1 = args[:in_toto_slsa_provenance_v1] if args.key?(:in_toto_slsa_provenance_v1)
@intoto_provenance = args[:intoto_provenance] if args.key?(:intoto_provenance)
@intoto_statement = args[:intoto_statement] if args.key?(:intoto_statement)
@provenance = args[:provenance] if args.key?(:provenance)
@provenance_bytes = args[:provenance_bytes] if args.key?(:provenance_bytes)
end
end
# Provenance of a build. Contains all information needed to verify the full
# details about the build from source to completion.
class BuildProvenance
include Google::Apis::Core::Hashable
# Special options applied to this build. This is a catch-all field where build
# providers can enter any desired additional details.
# Corresponds to the JSON property `buildOptions`
# @return [Hash<String,String>]
attr_accessor :build_options
# Version string of the builder at the time this build was executed.
# Corresponds to the JSON property `builderVersion`
# @return [String]
attr_accessor :builder_version
# Output of the build.
# Corresponds to the JSON property `builtArtifacts`
# @return [Array<Google::Apis::ContaineranalysisV1::Artifact>]
attr_accessor :built_artifacts
# Commands requested by the build.
# Corresponds to the JSON property `commands`
# @return [Array<Google::Apis::ContaineranalysisV1::Command>]
attr_accessor :commands
# Time at which the build was created.
# Corresponds to the JSON property `createTime`
# @return [String]
attr_accessor :create_time
# E-mail address of the user who initiated this build. Note that this was the
# user's e-mail address at the time the build was initiated; this address may
# not represent the same end-user for all time.
# Corresponds to the JSON property `creator`
# @return [String]
attr_accessor :creator
# Time at which execution of the build was finished.
# Corresponds to the JSON property `endTime`
# @return [String]
attr_accessor :end_time
# Required. Unique identifier of the build.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# URI where any logs for this provenance were written.
# Corresponds to the JSON property `logsUri`
# @return [String]
attr_accessor :logs_uri
# ID of the project.
# Corresponds to the JSON property `projectId`
# @return [String]
attr_accessor :project_id
# Source describes the location of the source used for the build.
# Corresponds to the JSON property `sourceProvenance`
# @return [Google::Apis::ContaineranalysisV1::Source]
attr_accessor :source_provenance
# Time at which execution of the build was started.
# Corresponds to the JSON property `startTime`
# @return [String]
attr_accessor :start_time
# Trigger identifier if the build was triggered automatically; empty if not.
# Corresponds to the JSON property `triggerId`
# @return [String]
attr_accessor :trigger_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@build_options = args[:build_options] if args.key?(:build_options)
@builder_version = args[:builder_version] if args.key?(:builder_version)
@built_artifacts = args[:built_artifacts] if args.key?(:built_artifacts)
@commands = args[:commands] if args.key?(:commands)
@create_time = args[:create_time] if args.key?(:create_time)
@creator = args[:creator] if args.key?(:creator)
@end_time = args[:end_time] if args.key?(:end_time)
@id = args[:id] if args.key?(:id)
@logs_uri = args[:logs_uri] if args.key?(:logs_uri)
@project_id = args[:project_id] if args.key?(:project_id)
@source_provenance = args[:source_provenance] if args.key?(:source_provenance)
@start_time = args[:start_time] if args.key?(:start_time)
@trigger_id = args[:trigger_id] if args.key?(:trigger_id)
end
end
# A step in the build pipeline. Next ID: 23
class BuildStep
include Google::Apis::Core::Hashable
# Allow this build step to fail without failing the entire build if and only if
# the exit code is one of the specified codes. If allow_failure is also
# specified, this field will take precedence.
# Corresponds to the JSON property `allowExitCodes`
# @return [Array<Fixnum>]
attr_accessor :allow_exit_codes
# Allow this build step to fail without failing the entire build. If false, the
# entire build will fail if this step fails. Otherwise, the build will succeed,
# but this step will still have a failure status. Error information will be
# reported in the failure_detail field.
# Corresponds to the JSON property `allowFailure`
# @return [Boolean]
attr_accessor :allow_failure
alias_method :allow_failure?, :allow_failure
# A list of arguments that will be presented to the step when it is started. If
# the image used to run the step's container has an entrypoint, the `args` are
# used as arguments to that entrypoint. If the image does not define an
# entrypoint, the first element in args is used as the entrypoint, and the
# remainder will be used as arguments.
# Corresponds to the JSON property `args`
# @return [Array<String>]
attr_accessor :args
# Option to include built-in and custom substitutions as env variables for this
# build step. This option will override the global option in BuildOption.
# Corresponds to the JSON property `automapSubstitutions`
# @return [Boolean]
attr_accessor :automap_substitutions
alias_method :automap_substitutions?, :automap_substitutions
# Working directory to use when running this step's container. If this value is
# a relative path, it is relative to the build's working directory. If this
# value is absolute, it may be outside the build's working directory, in which
# case the contents of the path may not be persisted across build step
# executions, unless a `volume` for that path is specified. If the build
# specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies
# an absolute path, the `RepoSource` `dir` is ignored for the step's execution.
# Corresponds to the JSON property `dir`
# @return [String]
attr_accessor :dir
# Entrypoint to be used instead of the build step image's default entrypoint. If
# unset, the image's default entrypoint is used.
# Corresponds to the JSON property `entrypoint`
# @return [String]
attr_accessor :entrypoint
# A list of environment variable definitions to be used when running a step. The
# elements are of the form "KEY=VALUE" for the environment variable "KEY" being
# given the value "VALUE".
# Corresponds to the JSON property `env`
# @return [Array<String>]
attr_accessor :env
# Output only. Return code from running the step.
# Corresponds to the JSON property `exitCode`
# @return [Fixnum]
attr_accessor :exit_code
# Unique identifier for this build step, used in `wait_for` to reference this
# build step as a dependency.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Required. The name of the container image that will run this particular build
# step. If the image is available in the host's Docker daemon's cache, it will
# be run directly. If not, the host will attempt to pull the image first, using
# the builder service account's credentials if necessary. The Docker daemon's
# cache will already have the latest versions of all of the officially supported
# build steps ([https://github.com/GoogleCloudPlatform/cloud-builders](https://
# github.com/GoogleCloudPlatform/cloud-builders)). The Docker daemon will also
# have cached many of the layers for some popular images, like "ubuntu", "debian"
# , but they will be refreshed at the time you attempt to use them. If you built
# an image in a previous build step, it will be stored in the host's Docker
# daemon's cache and is available to use as the name for a later build step.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Start and end times for a build execution phase. Next ID: 3
# Corresponds to the JSON property `pullTiming`
# @return [Google::Apis::ContaineranalysisV1::TimeSpan]
attr_accessor :pull_timing
# Remote configuration for the build step.
# Corresponds to the JSON property `remoteConfig`
# @return [String]
attr_accessor :remote_config
#
# Corresponds to the JSON property `results`
# @return [Array<Google::Apis::ContaineranalysisV1::StepResult>]
attr_accessor :results
# A shell script to be executed in the step. When script is provided, the user
# cannot specify the entrypoint or args.
# Corresponds to the JSON property `script`
# @return [String]
attr_accessor :script
# A list of environment variables which are encrypted using a Cloud Key
# Management Service crypto key. These values must be specified in the build's `
# Secret`.
# Corresponds to the JSON property `secretEnv`
# @return [Array<String>]
attr_accessor :secret_env
# Output only. Status of the build step. At this time, build step status is only
# updated on build completion; step status is not updated in real-time as the
# build progresses.
# Corresponds to the JSON property `status`
# @return [String]
attr_accessor :status
# Time limit for executing this build step. If not defined, the step has no time
# limit and will be allowed to continue to run until either it completes or the
# build itself times out.
# Corresponds to the JSON property `timeout`
# @return [String]
attr_accessor :timeout
# Start and end times for a build execution phase. Next ID: 3
# Corresponds to the JSON property `timing`
# @return [Google::Apis::ContaineranalysisV1::TimeSpan]
attr_accessor :timing
# List of volumes to mount into the build step. Each volume is created as an
# empty volume prior to execution of the build step. Upon completion of the
# build, volumes and their contents are discarded. Using a named volume in only
# one step is not valid as it is indicative of a build request with an incorrect
# configuration.
# Corresponds to the JSON property `volumes`
# @return [Array<Google::Apis::ContaineranalysisV1::Volume>]
attr_accessor :volumes
# The ID(s) of the step(s) that this build step depends on. This build step will
# not start until all the build steps in `wait_for` have completed successfully.
# If `wait_for` is empty, this build step will start when all previous build
# steps in the `Build.Steps` list have completed successfully.
# Corresponds to the JSON property `waitFor`
# @return [Array<String>]
attr_accessor :wait_for
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@allow_exit_codes = args[:allow_exit_codes] if args.key?(:allow_exit_codes)
@allow_failure = args[:allow_failure] if args.key?(:allow_failure)
@args = args[:args] if args.key?(:args)
@automap_substitutions = args[:automap_substitutions] if args.key?(:automap_substitutions)
@dir = args[:dir] if args.key?(:dir)
@entrypoint = args[:entrypoint] if args.key?(:entrypoint)
@env = args[:env] if args.key?(:env)
@exit_code = args[:exit_code] if args.key?(:exit_code)
@id = args[:id] if args.key?(:id)
@name = args[:name] if args.key?(:name)
@pull_timing = args[:pull_timing] if args.key?(:pull_timing)
@remote_config = args[:remote_config] if args.key?(:remote_config)
@results = args[:results] if args.key?(:results)
@script = args[:script] if args.key?(:script)
@secret_env = args[:secret_env] if args.key?(:secret_env)
@status = args[:status] if args.key?(:status)
@timeout = args[:timeout] if args.key?(:timeout)
@timing = args[:timing] if args.key?(:timing)
@volumes = args[:volumes] if args.key?(:volumes)
@wait_for = args[:wait_for] if args.key?(:wait_for)
end
end
#
class BuilderConfig
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@id = args[:id] if args.key?(:id)
end
end
#
class CisaKnownExploitedVulnerabilities
include Google::Apis::Core::Hashable
# Whether the vulnerability is known to have been leveraged as part of a
# ransomware campaign.
# Corresponds to the JSON property `knownRansomwareCampaignUse`
# @return [String]
attr_accessor :known_ransomware_campaign_use
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@known_ransomware_campaign_use = args[:known_ransomware_campaign_use] if args.key?(:known_ransomware_campaign_use)
end
end
# Common Vulnerability Scoring System. For details, see https://www.first.org/
# cvss/specification-document This is a message we will try to use for storing
# various versions of CVSS rather than making a separate proto for storing a
# specific version.
class Cvss
include Google::Apis::Core::Hashable
# Attack Complexity (AC). Defined in CVSS v2, v3, v4.
# Corresponds to the JSON property `attackComplexity`
# @return [String]
attr_accessor :attack_complexity
# Attack Requirements (AT). Defined in CVSS v4.
# Corresponds to the JSON property `attackRequirements`
# @return [String]
attr_accessor :attack_requirements
# Attack Vector (AV). Defined in CVSS v2, v3, v4.
# Corresponds to the JSON property `attackVector`
# @return [String]
attr_accessor :attack_vector
# Authentication (Au). Defined in CVSS v2.
# Corresponds to the JSON property `authentication`
# @return [String]