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,64 +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
- # Note kind that represents a logical attestation "role" or "authority". For
19
- # example, an organization might have one `Authority` for "QA" and one for
20
- # "build". This note is intended to act strictly as a grouping mechanism for
21
- # the attached occurrences (Attestations). This grouping mechanism also
22
- # provides a security boundary, since IAM ACLs gate the ability for a principle
23
- # to attach an occurrence to a given note. It also provides a single point of
24
- # lookup to find all attached attestation occurrences, even if they don't all
25
- # live in the same project.
26
- # @!attribute [rw] hint
27
- # @return [Grafeas::V1::AttestationNote::Hint]
28
- # Hint hints at the purpose of the attestation authority.
29
- class AttestationNote
30
- # This submessage provides human-readable hints about the purpose of the
31
- # authority. Because the name of a note acts as its resource reference, it is
32
- # important to disambiguate the canonical name of the Note (which might be a
33
- # UUID for security purposes) from "readable" names more suitable for debug
34
- # output. Note that these hints should not be used to look up authorities in
35
- # security sensitive contexts, such as when looking up attestations to
36
- # verify.
37
- # @!attribute [rw] human_readable_name
38
- # @return [String]
39
- # Required. The human readable name of this attestation authority, for
40
- # example "qa".
41
- class Hint; end
42
- end
43
-
44
- # Occurrence that represents a single "attestation". The authenticity of an
45
- # attestation can be verified using the attached signature. If the verifier
46
- # trusts the public key of the signer, then verifying the signature is
47
- # sufficient to establish trust. In this circumstance, the authority to which
48
- # this attestation is attached is primarily useful for lookup (how to find
49
- # this attestation if you already know the authority and artifact to be
50
- # verified) and intent (for which authority this attestation was intended to
51
- # sign.
52
- # @!attribute [rw] serialized_payload
53
- # @return [String]
54
- # Required. The serialized payload that is verified by one or more
55
- # `signatures`.
56
- # @!attribute [rw] signatures
57
- # @return [Array<Grafeas::V1::Signature>]
58
- # One or more signatures over `serialized_payload`. Verifier implementations
59
- # should consider this attestation message verified if at least one
60
- # `signature` verifies `serialized_payload`. See `Signature` in common.proto
61
- # for more details on signature structure and verification.
62
- class AttestationOccurrence; end
63
- end
64
- end
@@ -1,44 +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
- # Note holding the version of the provider's builder and the signature of the
19
- # provenance message in the build details occurrence.
20
- # @!attribute [rw] builder_version
21
- # @return [String]
22
- # Required. Immutable. Version of the builder which produced this build.
23
- class BuildNote; end
24
-
25
- # Details of a build occurrence.
26
- # @!attribute [rw] provenance
27
- # @return [Grafeas::V1::BuildProvenance]
28
- # Required. The actual provenance for the build.
29
- # @!attribute [rw] provenance_bytes
30
- # @return [String]
31
- # Serialized JSON representation of the provenance, used in generating the
32
- # build signature in the corresponding build note. After verifying the
33
- # signature, `provenance_bytes` can be unmarshalled and compared to the
34
- # provenance to confirm that it is unchanged. A base64-encoded string
35
- # representation of the provenance bytes is used for the signature in order
36
- # to interoperate with openssl which expects this format for signature
37
- # verification.
38
- #
39
- # The serialized form is captured both to avoid ambiguity in how the
40
- # provenance is marshalled to json as well to prevent incompatibilities with
41
- # future changes.
42
- class BuildOccurrence; end
43
- end
44
- end
@@ -1,105 +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
- # Metadata for any related URL information.
19
- # @!attribute [rw] url
20
- # @return [String]
21
- # Specific URL associated with the resource.
22
- # @!attribute [rw] label
23
- # @return [String]
24
- # Label to describe usage of the URL.
25
- class RelatedUrl; end
26
-
27
- # Verifiers (e.g. Kritis implementations) MUST verify signatures
28
- # with respect to the trust anchors defined in policy (e.g. a Kritis policy).
29
- # Typically this means that the verifier has been configured with a map from
30
- # `public_key_id` to public key material (and any required parameters, e.g.
31
- # signing algorithm).
32
- #
33
- # In particular, verification implementations MUST NOT treat the signature
34
- # `public_key_id` as anything more than a key lookup hint. The `public_key_id`
35
- # DOES NOT validate or authenticate a public key; it only provides a mechanism
36
- # for quickly selecting a public key ALREADY CONFIGURED on the verifier through
37
- # a trusted channel. Verification implementations MUST reject signatures in any
38
- # of the following circumstances:
39
- # * The `public_key_id` is not recognized by the verifier.
40
- # * The public key that `public_key_id` refers to does not verify the
41
- # signature with respect to the payload.
42
- #
43
- # The `signature` contents SHOULD NOT be "attached" (where the payload is
44
- # included with the serialized `signature` bytes). Verifiers MUST ignore any
45
- # "attached" payload and only verify signatures with respect to explicitly
46
- # provided payload (e.g. a `payload` field on the proto message that holds
47
- # this Signature, or the canonical serialization of the proto message that
48
- # holds this signature).
49
- # @!attribute [rw] signature
50
- # @return [String]
51
- # The content of the signature, an opaque bytestring.
52
- # The payload that this signature verifies MUST be unambiguously provided
53
- # with the Signature during verification. A wrapper message might provide
54
- # the payload explicitly. Alternatively, a message might have a canonical
55
- # serialization that can always be unambiguously computed to derive the
56
- # payload.
57
- # @!attribute [rw] public_key_id
58
- # @return [String]
59
- # The identifier for the public key that verifies this signature.
60
- # * The `public_key_id` is required.
61
- # * The `public_key_id` MUST be an RFC3986 conformant URI.
62
- # * When possible, the `public_key_id` SHOULD be an immutable reference,
63
- # such as a cryptographic digest.
64
- #
65
- # Examples of valid `public_key_id`s:
66
- #
67
- # OpenPGP V4 public key fingerprint:
68
- # * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA"
69
- # See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more
70
- # details on this scheme.
71
- #
72
- # RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER
73
- # serialization):
74
- # * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU"
75
- # * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
76
- class Signature; end
77
-
78
- # Kind represents the kinds of notes supported.
79
- module NoteKind
80
- # Unknown.
81
- NOTE_KIND_UNSPECIFIED = 0
82
-
83
- # The note and occurrence represent a package vulnerability.
84
- VULNERABILITY = 1
85
-
86
- # The note and occurrence assert build provenance.
87
- BUILD = 2
88
-
89
- # This represents an image basis relationship.
90
- IMAGE = 3
91
-
92
- # This represents a package installed via a package manager.
93
- PACKAGE = 4
94
-
95
- # The note and occurrence track deployment events.
96
- DEPLOYMENT = 5
97
-
98
- # The note and occurrence track the initial discovery status of a resource.
99
- DISCOVERY = 6
100
-
101
- # This represents a logical "role" that can attest to artifacts.
102
- ATTESTATION = 7
103
- end
104
- end
105
- end
@@ -1,104 +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
- # Common Vulnerability Scoring System version 3.
19
- # For details, see https://www.first.org/cvss/specification-document
20
- # @!attribute [rw] base_score
21
- # @return [Float]
22
- # The base score is a function of the base metric scores.
23
- # @!attribute [rw] exploitability_score
24
- # @return [Float]
25
- # @!attribute [rw] impact_score
26
- # @return [Float]
27
- # @!attribute [rw] attack_vector
28
- # @return [Grafeas::V1::CVSSv3::AttackVector]
29
- # Base Metrics
30
- # Represents the intrinsic characteristics of a vulnerability that are
31
- # constant over time and across user environments.
32
- # @!attribute [rw] attack_complexity
33
- # @return [Grafeas::V1::CVSSv3::AttackComplexity]
34
- # @!attribute [rw] privileges_required
35
- # @return [Grafeas::V1::CVSSv3::PrivilegesRequired]
36
- # @!attribute [rw] user_interaction
37
- # @return [Grafeas::V1::CVSSv3::UserInteraction]
38
- # @!attribute [rw] scope
39
- # @return [Grafeas::V1::CVSSv3::Scope]
40
- # @!attribute [rw] confidentiality_impact
41
- # @return [Grafeas::V1::CVSSv3::Impact]
42
- # @!attribute [rw] integrity_impact
43
- # @return [Grafeas::V1::CVSSv3::Impact]
44
- # @!attribute [rw] availability_impact
45
- # @return [Grafeas::V1::CVSSv3::Impact]
46
- class CVSSv3
47
- module AttackComplexity
48
- ATTACK_COMPLEXITY_UNSPECIFIED = 0
49
-
50
- ATTACK_COMPLEXITY_LOW = 1
51
-
52
- ATTACK_COMPLEXITY_HIGH = 2
53
- end
54
-
55
- module AttackVector
56
- ATTACK_VECTOR_UNSPECIFIED = 0
57
-
58
- ATTACK_VECTOR_NETWORK = 1
59
-
60
- ATTACK_VECTOR_ADJACENT = 2
61
-
62
- ATTACK_VECTOR_LOCAL = 3
63
-
64
- ATTACK_VECTOR_PHYSICAL = 4
65
- end
66
-
67
- module Impact
68
- IMPACT_UNSPECIFIED = 0
69
-
70
- IMPACT_HIGH = 1
71
-
72
- IMPACT_LOW = 2
73
-
74
- IMPACT_NONE = 3
75
- end
76
-
77
- module PrivilegesRequired
78
- PRIVILEGES_REQUIRED_UNSPECIFIED = 0
79
-
80
- PRIVILEGES_REQUIRED_NONE = 1
81
-
82
- PRIVILEGES_REQUIRED_LOW = 2
83
-
84
- PRIVILEGES_REQUIRED_HIGH = 3
85
- end
86
-
87
- module Scope
88
- SCOPE_UNSPECIFIED = 0
89
-
90
- SCOPE_UNCHANGED = 1
91
-
92
- SCOPE_CHANGED = 2
93
- end
94
-
95
- module UserInteraction
96
- USER_INTERACTION_UNSPECIFIED = 0
97
-
98
- USER_INTERACTION_NONE = 1
99
-
100
- USER_INTERACTION_REQUIRED = 2
101
- end
102
- end
103
- end
104
- end
@@ -1,64 +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 artifact that can be deployed in some runtime.
19
- # @!attribute [rw] resource_uri
20
- # @return [Array<String>]
21
- # Required. Resource URI for the artifact being deployed.
22
- class DeploymentNote; end
23
-
24
- # The period during which some deployable was active in a runtime.
25
- # @!attribute [rw] user_email
26
- # @return [String]
27
- # Identity of the user that triggered this deployment.
28
- # @!attribute [rw] deploy_time
29
- # @return [Google::Protobuf::Timestamp]
30
- # Required. Beginning of the lifetime of this deployment.
31
- # @!attribute [rw] undeploy_time
32
- # @return [Google::Protobuf::Timestamp]
33
- # End of the lifetime of this deployment.
34
- # @!attribute [rw] config
35
- # @return [String]
36
- # Configuration used to create this deployment.
37
- # @!attribute [rw] address
38
- # @return [String]
39
- # Address of the runtime element hosting this deployment.
40
- # @!attribute [rw] resource_uri
41
- # @return [Array<String>]
42
- # Output only. Resource URI for the artifact being deployed taken from
43
- # the deployable field with the same name.
44
- # @!attribute [rw] platform
45
- # @return [Grafeas::V1::DeploymentOccurrence::Platform]
46
- # Platform hosting this deployment.
47
- class DeploymentOccurrence
48
- # Types of platforms.
49
- module Platform
50
- # Unknown.
51
- PLATFORM_UNSPECIFIED = 0
52
-
53
- # Google Container Engine.
54
- GKE = 1
55
-
56
- # Google App Engine: Flexible Environment.
57
- FLEX = 2
58
-
59
- # Custom user-defined platform.
60
- CUSTOM = 3
61
- end
62
- end
63
- end
64
- end
@@ -1,76 +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
- # A note that indicates a type of analysis a provider would perform. This note
19
- # exists in a provider's project. A `Discovery` occurrence is created in a
20
- # consumer's project at the start of analysis.
21
- # @!attribute [rw] analysis_kind
22
- # @return [Grafeas::V1::NoteKind]
23
- # Required. Immutable. The kind of analysis that is handled by this
24
- # discovery.
25
- class DiscoveryNote; end
26
-
27
- # Provides information about the analysis status of a discovered resource.
28
- # @!attribute [rw] continuous_analysis
29
- # @return [Grafeas::V1::DiscoveryOccurrence::ContinuousAnalysis]
30
- # Whether the resource is continuously analyzed.
31
- # @!attribute [rw] analysis_status
32
- # @return [Grafeas::V1::DiscoveryOccurrence::AnalysisStatus]
33
- # The status of discovery for the resource.
34
- # @!attribute [rw] analysis_status_error
35
- # @return [Google::Rpc::Status]
36
- # When an error is encountered this will contain a LocalizedMessage under
37
- # details to show to the user. The LocalizedMessage is output only and
38
- # populated by the API.
39
- class DiscoveryOccurrence
40
- # Analysis status for a resource. Currently for initial analysis only (not
41
- # updated in continuous analysis).
42
- module AnalysisStatus
43
- # Unknown.
44
- ANALYSIS_STATUS_UNSPECIFIED = 0
45
-
46
- # Resource is known but no action has been taken yet.
47
- PENDING = 1
48
-
49
- # Resource is being analyzed.
50
- SCANNING = 2
51
-
52
- # Analysis has finished successfully.
53
- FINISHED_SUCCESS = 3
54
-
55
- # Analysis has finished unsuccessfully, the analysis itself is in a bad
56
- # state.
57
- FINISHED_FAILED = 4
58
-
59
- # The resource is known not to be supported
60
- FINISHED_UNSUPPORTED = 5
61
- end
62
-
63
- # Whether the resource is continuously analyzed.
64
- module ContinuousAnalysis
65
- # Unknown.
66
- CONTINUOUS_ANALYSIS_UNSPECIFIED = 0
67
-
68
- # The resource is continuously analyzed.
69
- ACTIVE = 1
70
-
71
- # The resource is ignored for continuous analysis.
72
- INACTIVE = 2
73
- end
74
- end
75
- end
76
- end