grafeas-client 0.3.0 → 0.4.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.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +0 -2
  3. data/README.md +4 -4
  4. data/lib/grafeas/client/version.rb +1 -2
  5. metadata +12 -73
  6. data/AUTHENTICATION.md +0 -199
  7. data/lib/grafeas.rb +0 -154
  8. data/lib/grafeas/v1.rb +0 -155
  9. data/lib/grafeas/v1/attestation_pb.rb +0 -27
  10. data/lib/grafeas/v1/build_pb.rb +0 -23
  11. data/lib/grafeas/v1/common_pb.rb +0 -34
  12. data/lib/grafeas/v1/credentials.rb +0 -37
  13. data/lib/grafeas/v1/cvss_pb.rb +0 -67
  14. data/lib/grafeas/v1/deployment_pb.rb +0 -35
  15. data/lib/grafeas/v1/discovery_pb.rb +0 -40
  16. data/lib/grafeas/v1/doc/google/protobuf/any.rb +0 -131
  17. data/lib/grafeas/v1/doc/google/protobuf/empty.rb +0 -29
  18. data/lib/grafeas/v1/doc/google/protobuf/field_mask.rb +0 -222
  19. data/lib/grafeas/v1/doc/google/protobuf/timestamp.rb +0 -113
  20. data/lib/grafeas/v1/doc/google/rpc/status.rb +0 -87
  21. data/lib/grafeas/v1/doc/grafeas/v1/attestation.rb +0 -64
  22. data/lib/grafeas/v1/doc/grafeas/v1/build.rb +0 -44
  23. data/lib/grafeas/v1/doc/grafeas/v1/common.rb +0 -105
  24. data/lib/grafeas/v1/doc/grafeas/v1/cvss.rb +0 -104
  25. data/lib/grafeas/v1/doc/grafeas/v1/deployment.rb +0 -64
  26. data/lib/grafeas/v1/doc/grafeas/v1/discovery.rb +0 -76
  27. data/lib/grafeas/v1/doc/grafeas/v1/grafeas.rb +0 -322
  28. data/lib/grafeas/v1/doc/grafeas/v1/image.rb +0 -79
  29. data/lib/grafeas/v1/doc/grafeas/v1/package.rb +0 -125
  30. data/lib/grafeas/v1/doc/grafeas/v1/provenance.rb +0 -248
  31. data/lib/grafeas/v1/doc/grafeas/v1/vulnerability.rb +0 -214
  32. data/lib/grafeas/v1/grafeas_client.rb +0 -961
  33. data/lib/grafeas/v1/grafeas_client_config.json +0 -96
  34. data/lib/grafeas/v1/grafeas_pb.rb +0 -163
  35. data/lib/grafeas/v1/grafeas_services_pb.rb +0 -86
  36. data/lib/grafeas/v1/image_pb.rb +0 -36
  37. data/lib/grafeas/v1/package_pb.rb +0 -59
  38. data/lib/grafeas/v1/provenance_pb.rb +0 -116
  39. data/lib/grafeas/v1/vulnerability_pb.rb +0 -81
@@ -1,322 +0,0 @@
1
- # Copyright 2019 Google LLC
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
- # https://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
-
16
- module Grafeas
17
- module V1
18
- # An instance of an analysis type that has been found on a resource.
19
- # @!attribute [rw] name
20
- # @return [String]
21
- # Output only. The name of the occurrence in the form of
22
- # `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
23
- # @!attribute [rw] resource_uri
24
- # @return [String]
25
- # Required. Immutable. A URI that represents the resource for which the
26
- # occurrence applies. For example,
27
- # `https://gcr.io/project/image@sha256:123abc` for a Docker image.
28
- # @!attribute [rw] note_name
29
- # @return [String]
30
- # Required. Immutable. The analysis note associated with this occurrence, in
31
- # the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be
32
- # used as a filter in list requests.
33
- # @!attribute [rw] kind
34
- # @return [Grafeas::V1::NoteKind]
35
- # Output only. This explicitly denotes which of the occurrence details are
36
- # specified. This field can be used as a filter in list requests.
37
- # @!attribute [rw] remediation
38
- # @return [String]
39
- # A description of actions that can be taken to remedy the note.
40
- # @!attribute [rw] create_time
41
- # @return [Google::Protobuf::Timestamp]
42
- # Output only. The time this occurrence was created.
43
- # @!attribute [rw] update_time
44
- # @return [Google::Protobuf::Timestamp]
45
- # Output only. The time this occurrence was last updated.
46
- # @!attribute [rw] vulnerability
47
- # @return [Grafeas::V1::VulnerabilityOccurrence]
48
- # Describes a security vulnerability.
49
- # @!attribute [rw] build
50
- # @return [Grafeas::V1::BuildOccurrence]
51
- # Describes a verifiable build.
52
- # @!attribute [rw] image
53
- # @return [Grafeas::V1::ImageOccurrence]
54
- # Describes how this resource derives from the basis in the associated
55
- # note.
56
- # @!attribute [rw] package
57
- # @return [Grafeas::V1::PackageOccurrence]
58
- # Describes the installation of a package on the linked resource.
59
- # @!attribute [rw] deployment
60
- # @return [Grafeas::V1::DeploymentOccurrence]
61
- # Describes the deployment of an artifact on a runtime.
62
- # @!attribute [rw] discovery
63
- # @return [Grafeas::V1::DiscoveryOccurrence]
64
- # Describes when a resource was discovered.
65
- # @!attribute [rw] attestation
66
- # @return [Grafeas::V1::AttestationOccurrence]
67
- # Describes an attestation of an artifact.
68
- class Occurrence; end
69
-
70
- # A type of analysis that can be done for a resource.
71
- # @!attribute [rw] name
72
- # @return [String]
73
- # Output only. The name of the note in the form of
74
- # `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
75
- # @!attribute [rw] short_description
76
- # @return [String]
77
- # A one sentence description of this note.
78
- # @!attribute [rw] long_description
79
- # @return [String]
80
- # A detailed description of this note.
81
- # @!attribute [rw] kind
82
- # @return [Grafeas::V1::NoteKind]
83
- # Output only. The type of analysis. This field can be used as a filter in
84
- # list requests.
85
- # @!attribute [rw] related_url
86
- # @return [Array<Grafeas::V1::RelatedUrl>]
87
- # URLs associated with this note.
88
- # @!attribute [rw] expiration_time
89
- # @return [Google::Protobuf::Timestamp]
90
- # Time of expiration for this note. Empty if note does not expire.
91
- # @!attribute [rw] create_time
92
- # @return [Google::Protobuf::Timestamp]
93
- # Output only. The time this note was created. This field can be used as a
94
- # filter in list requests.
95
- # @!attribute [rw] update_time
96
- # @return [Google::Protobuf::Timestamp]
97
- # Output only. The time this note was last updated. This field can be used as
98
- # a filter in list requests.
99
- # @!attribute [rw] related_note_names
100
- # @return [Array<String>]
101
- # Other notes related to this note.
102
- # @!attribute [rw] vulnerability
103
- # @return [Grafeas::V1::VulnerabilityNote]
104
- # A note describing a package vulnerability.
105
- # @!attribute [rw] build
106
- # @return [Grafeas::V1::BuildNote]
107
- # A note describing build provenance for a verifiable build.
108
- # @!attribute [rw] image
109
- # @return [Grafeas::V1::ImageNote]
110
- # A note describing a base image.
111
- # @!attribute [rw] package
112
- # @return [Grafeas::V1::PackageNote]
113
- # A note describing a package hosted by various package managers.
114
- # @!attribute [rw] deployment
115
- # @return [Grafeas::V1::DeploymentNote]
116
- # A note describing something that can be deployed.
117
- # @!attribute [rw] discovery
118
- # @return [Grafeas::V1::DiscoveryNote]
119
- # A note describing the initial analysis of a resource.
120
- # @!attribute [rw] attestation
121
- # @return [Grafeas::V1::AttestationNote]
122
- # A note describing an attestation role.
123
- class Note; end
124
-
125
- # Request to get an occurrence.
126
- # @!attribute [rw] name
127
- # @return [String]
128
- # The name of the occurrence in the form of
129
- # `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
130
- class GetOccurrenceRequest; end
131
-
132
- # Request to list occurrences.
133
- # @!attribute [rw] parent
134
- # @return [String]
135
- # The name of the project to list occurrences for in the form of
136
- # `projects/[PROJECT_ID]`.
137
- # @!attribute [rw] filter
138
- # @return [String]
139
- # The filter expression.
140
- # @!attribute [rw] page_size
141
- # @return [Integer]
142
- # Number of occurrences to return in the list. Must be positive. Max allowed
143
- # page size is 1000. If not specified, page size defaults to 20.
144
- # @!attribute [rw] page_token
145
- # @return [String]
146
- # Token to provide to skip to a particular spot in the list.
147
- class ListOccurrencesRequest; end
148
-
149
- # Response for listing occurrences.
150
- # @!attribute [rw] occurrences
151
- # @return [Array<Grafeas::V1::Occurrence>]
152
- # The occurrences requested.
153
- # @!attribute [rw] next_page_token
154
- # @return [String]
155
- # The next pagination token in the list response. It should be used as
156
- # `page_token` for the following request. An empty value means no more
157
- # results.
158
- class ListOccurrencesResponse; end
159
-
160
- # Request to delete a occurrence.
161
- # @!attribute [rw] name
162
- # @return [String]
163
- # The name of the occurrence in the form of
164
- # `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
165
- class DeleteOccurrenceRequest; end
166
-
167
- # Request to create a new occurrence.
168
- # @!attribute [rw] parent
169
- # @return [String]
170
- # The name of the project in the form of `projects/[PROJECT_ID]`, under which
171
- # the occurrence is to be created.
172
- # @!attribute [rw] occurrence
173
- # @return [Grafeas::V1::Occurrence]
174
- # The occurrence to create.
175
- class CreateOccurrenceRequest; end
176
-
177
- # Request to update an occurrence.
178
- # @!attribute [rw] name
179
- # @return [String]
180
- # The name of the occurrence in the form of
181
- # `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
182
- # @!attribute [rw] occurrence
183
- # @return [Grafeas::V1::Occurrence]
184
- # The updated occurrence.
185
- # @!attribute [rw] update_mask
186
- # @return [Google::Protobuf::FieldMask]
187
- # The fields to update.
188
- class UpdateOccurrenceRequest; end
189
-
190
- # Request to get a note.
191
- # @!attribute [rw] name
192
- # @return [String]
193
- # The name of the note in the form of
194
- # `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
195
- class GetNoteRequest; end
196
-
197
- # Request to get the note to which the specified occurrence is attached.
198
- # @!attribute [rw] name
199
- # @return [String]
200
- # The name of the occurrence in the form of
201
- # `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
202
- class GetOccurrenceNoteRequest; end
203
-
204
- # Request to list notes.
205
- # @!attribute [rw] parent
206
- # @return [String]
207
- # The name of the project to list notes for in the form of
208
- # `projects/[PROJECT_ID]`.
209
- # @!attribute [rw] filter
210
- # @return [String]
211
- # The filter expression.
212
- # @!attribute [rw] page_size
213
- # @return [Integer]
214
- # Number of notes to return in the list. Must be positive. Max allowed page
215
- # size is 1000. If not specified, page size defaults to 20.
216
- # @!attribute [rw] page_token
217
- # @return [String]
218
- # Token to provide to skip to a particular spot in the list.
219
- class ListNotesRequest; end
220
-
221
- # Response for listing notes.
222
- # @!attribute [rw] notes
223
- # @return [Array<Grafeas::V1::Note>]
224
- # The notes requested.
225
- # @!attribute [rw] next_page_token
226
- # @return [String]
227
- # The next pagination token in the list response. It should be used as
228
- # `page_token` for the following request. An empty value means no more
229
- # results.
230
- class ListNotesResponse; end
231
-
232
- # Request to delete a note.
233
- # @!attribute [rw] name
234
- # @return [String]
235
- # The name of the note in the form of
236
- # `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
237
- class DeleteNoteRequest; end
238
-
239
- # Request to create a new note.
240
- # @!attribute [rw] parent
241
- # @return [String]
242
- # The name of the project in the form of `projects/[PROJECT_ID]`, under which
243
- # the note is to be created.
244
- # @!attribute [rw] note_id
245
- # @return [String]
246
- # The ID to use for this note.
247
- # @!attribute [rw] note
248
- # @return [Grafeas::V1::Note]
249
- # The note to create.
250
- class CreateNoteRequest; end
251
-
252
- # Request to update a note.
253
- # @!attribute [rw] name
254
- # @return [String]
255
- # The name of the note in the form of
256
- # `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
257
- # @!attribute [rw] note
258
- # @return [Grafeas::V1::Note]
259
- # The updated note.
260
- # @!attribute [rw] update_mask
261
- # @return [Google::Protobuf::FieldMask]
262
- # The fields to update.
263
- class UpdateNoteRequest; end
264
-
265
- # Request to list occurrences for a note.
266
- # @!attribute [rw] name
267
- # @return [String]
268
- # The name of the note to list occurrences for in the form of
269
- # `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
270
- # @!attribute [rw] filter
271
- # @return [String]
272
- # The filter expression.
273
- # @!attribute [rw] page_size
274
- # @return [Integer]
275
- # Number of occurrences to return in the list.
276
- # @!attribute [rw] page_token
277
- # @return [String]
278
- # Token to provide to skip to a particular spot in the list.
279
- class ListNoteOccurrencesRequest; end
280
-
281
- # Response for listing occurrences for a note.
282
- # @!attribute [rw] occurrences
283
- # @return [Array<Grafeas::V1::Occurrence>]
284
- # The occurrences attached to the specified note.
285
- # @!attribute [rw] next_page_token
286
- # @return [String]
287
- # Token to provide to skip to a particular spot in the list.
288
- class ListNoteOccurrencesResponse; end
289
-
290
- # Request to create notes in batch.
291
- # @!attribute [rw] parent
292
- # @return [String]
293
- # The name of the project in the form of `projects/[PROJECT_ID]`, under which
294
- # the notes are to be created.
295
- # @!attribute [rw] notes
296
- # @return [Hash{String => Grafeas::V1::Note}]
297
- # The notes to create. Max allowed length is 1000.
298
- class BatchCreateNotesRequest; end
299
-
300
- # Response for creating notes in batch.
301
- # @!attribute [rw] notes
302
- # @return [Array<Grafeas::V1::Note>]
303
- # The notes that were created.
304
- class BatchCreateNotesResponse; end
305
-
306
- # Request to create occurrences in batch.
307
- # @!attribute [rw] parent
308
- # @return [String]
309
- # The name of the project in the form of `projects/[PROJECT_ID]`, under which
310
- # the occurrences are to be created.
311
- # @!attribute [rw] occurrences
312
- # @return [Array<Grafeas::V1::Occurrence>]
313
- # The occurrences to create. Max allowed length is 1000.
314
- class BatchCreateOccurrencesRequest; end
315
-
316
- # Response for creating occurrences in batch.
317
- # @!attribute [rw] occurrences
318
- # @return [Array<Grafeas::V1::Occurrence>]
319
- # The occurrences that were created.
320
- class BatchCreateOccurrencesResponse; end
321
- end
322
- end
@@ -1,79 +0,0 @@
1
- # Copyright 2019 Google LLC
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
- # https://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
-
16
- module Grafeas
17
- module V1
18
- # Layer holds metadata specific to a layer of a Docker image.
19
- # @!attribute [rw] directive
20
- # @return [String]
21
- # Required. The recovered Dockerfile directive used to construct this layer.
22
- # See https://docs.docker.com/engine/reference/builder/ for more information.
23
- # @!attribute [rw] arguments
24
- # @return [String]
25
- # The recovered arguments to the Dockerfile directive.
26
- class Layer; end
27
-
28
- # A set of properties that uniquely identify a given Docker image.
29
- # @!attribute [rw] v1_name
30
- # @return [String]
31
- # Required. The layer ID of the final layer in the Docker image's v1
32
- # representation.
33
- # @!attribute [rw] v2_blob
34
- # @return [Array<String>]
35
- # Required. The ordered list of v2 blobs that represent a given image.
36
- # @!attribute [rw] v2_name
37
- # @return [String]
38
- # Output only. The name of the image's v2 blobs computed via:
39
- # [bottom] := v2_blob[bottom]
40
- # [N] := sha256(v2_blob[N] + " " + v2_name[N+1])
41
- # Only the name of the final blob is kept.
42
- class Fingerprint; end
43
-
44
- # Basis describes the base image portion (Note) of the DockerImage
45
- # relationship. Linked occurrences are derived from this or an equivalent image
46
- # via:
47
- # FROM <Basis.resource_url>
48
- # Or an equivalent reference, e.g., a tag of the resource_url.
49
- # @!attribute [rw] resource_url
50
- # @return [String]
51
- # Required. Immutable. The resource_url for the resource representing the
52
- # basis of associated occurrence images.
53
- # @!attribute [rw] fingerprint
54
- # @return [Grafeas::V1::Fingerprint]
55
- # Required. Immutable. The fingerprint of the base image.
56
- class ImageNote; end
57
-
58
- # Details of the derived image portion of the DockerImage relationship. This
59
- # image would be produced from a Dockerfile with FROM <DockerImage.Basis in
60
- # attached Note>.
61
- # @!attribute [rw] fingerprint
62
- # @return [Grafeas::V1::Fingerprint]
63
- # Required. The fingerprint of the derived image.
64
- # @!attribute [rw] distance
65
- # @return [Integer]
66
- # Output only. The number of layers by which this image differs from the
67
- # associated image basis.
68
- # @!attribute [rw] layer_info
69
- # @return [Array<Grafeas::V1::Layer>]
70
- # This contains layer-specific metadata, if populated it has length
71
- # "distance" and is ordered with [distance] being the layer immediately
72
- # following the base image and [1] being the final layer.
73
- # @!attribute [rw] base_resource_url
74
- # @return [String]
75
- # Output only. This contains the base image URL for the derived image
76
- # occurrence.
77
- class ImageOccurrence; end
78
- end
79
- end
@@ -1,125 +0,0 @@
1
- # Copyright 2019 Google LLC
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
- # https://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
-
16
- module Grafeas
17
- module V1
18
- # This represents a particular channel of distribution for a given package.
19
- # E.g., Debian's jessie-backports dpkg mirror.
20
- # @!attribute [rw] cpe_uri
21
- # @return [String]
22
- # Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
23
- # denoting the package manager version distributing a package.
24
- # @!attribute [rw] architecture
25
- # @return [Grafeas::V1::Architecture]
26
- # The CPU architecture for which packages in this distribution channel were
27
- # built.
28
- # @!attribute [rw] latest_version
29
- # @return [Grafeas::V1::Version]
30
- # The latest available version of this package in this distribution channel.
31
- # @!attribute [rw] maintainer
32
- # @return [String]
33
- # A freeform string denoting the maintainer of this package.
34
- # @!attribute [rw] url
35
- # @return [String]
36
- # The distribution channel-specific homepage for this package.
37
- # @!attribute [rw] description
38
- # @return [String]
39
- # The distribution channel-specific description of this package.
40
- class Distribution; end
41
-
42
- # An occurrence of a particular package installation found within a system's
43
- # filesystem. E.g., glibc was found in `/var/lib/dpkg/status`.
44
- # @!attribute [rw] cpe_uri
45
- # @return [String]
46
- # Required. The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
47
- # denoting the package manager version distributing a package.
48
- # @!attribute [rw] version
49
- # @return [Grafeas::V1::Version]
50
- # The version installed at this location.
51
- # @!attribute [rw] path
52
- # @return [String]
53
- # The path from which we gathered that this package/version is installed.
54
- class Location; end
55
-
56
- # This represents a particular package that is distributed over various
57
- # channels. E.g., glibc (aka libc6) is distributed by many, at various
58
- # versions.
59
- # @!attribute [rw] name
60
- # @return [String]
61
- # Required. Immutable. The name of the package.
62
- # @!attribute [rw] distribution
63
- # @return [Array<Grafeas::V1::Distribution>]
64
- # The various channels by which a package is distributed.
65
- class PackageNote; end
66
-
67
- # Details on how a particular software package was installed on a system.
68
- # @!attribute [rw] name
69
- # @return [String]
70
- # Output only. The name of the installed package.
71
- # @!attribute [rw] location
72
- # @return [Array<Grafeas::V1::Location>]
73
- # Required. All of the places within the filesystem versions of this package
74
- # have been found.
75
- class PackageOccurrence; end
76
-
77
- # Version contains structured information about the version of a package.
78
- # @!attribute [rw] epoch
79
- # @return [Integer]
80
- # Used to correct mistakes in the version numbering scheme.
81
- # @!attribute [rw] name
82
- # @return [String]
83
- # Required only when version kind is NORMAL. The main part of the version
84
- # name.
85
- # @!attribute [rw] revision
86
- # @return [String]
87
- # The iteration of the package build from the above version.
88
- # @!attribute [rw] kind
89
- # @return [Grafeas::V1::Version::VersionKind]
90
- # Required. Distinguishes between sentinel MIN/MAX versions and normal
91
- # versions.
92
- # @!attribute [rw] full_name
93
- # @return [String]
94
- # Human readable version string. This string is of the form
95
- # <epoch>:<name>-<revision> and is only set when kind is NORMAL.
96
- class Version
97
- # Whether this is an ordinary package version or a sentinel MIN/MAX version.
98
- module VersionKind
99
- # Unknown.
100
- VERSION_KIND_UNSPECIFIED = 0
101
-
102
- # A standard package version.
103
- NORMAL = 1
104
-
105
- # A special version representing negative infinity.
106
- MINIMUM = 2
107
-
108
- # A special version representing positive infinity.
109
- MAXIMUM = 3
110
- end
111
- end
112
-
113
- # Instruction set architectures supported by various package managers.
114
- module Architecture
115
- # Unknown architecture.
116
- ARCHITECTURE_UNSPECIFIED = 0
117
-
118
- # X86 architecture.
119
- X86 = 1
120
-
121
- # X64 architecture.
122
- X64 = 2
123
- end
124
- end
125
- end