@google-cloud/containeranalysis 3.2.0 → 4.0.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 (34) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +17 -17
  3. package/build/protos/google/devtools/containeranalysis/v1/containeranalysis.proto +12 -18
  4. package/build/protos/grafeas/v1/attestation.proto +17 -0
  5. package/build/protos/grafeas/v1/build.proto +13 -1
  6. package/build/protos/grafeas/v1/common.proto +20 -2
  7. package/build/protos/grafeas/v1/compliance.proto +79 -0
  8. package/build/protos/grafeas/v1/cvss.proto +76 -0
  9. package/build/protos/grafeas/v1/discovery.proto +5 -0
  10. package/build/protos/grafeas/v1/dsse_attestation.proto +52 -0
  11. package/build/protos/grafeas/v1/grafeas.proto +13 -0
  12. package/build/protos/grafeas/v1/intoto_provenance.proto +113 -0
  13. package/build/protos/grafeas/v1/intoto_statement.proto +50 -0
  14. package/build/protos/grafeas/v1/package.proto +9 -1
  15. package/build/protos/grafeas/v1/severity.proto +38 -0
  16. package/build/protos/grafeas/v1/slsa_provenance.proto +114 -0
  17. package/build/protos/grafeas/v1/vulnerability.proto +31 -19
  18. package/build/protos/protos.d.ts +6876 -3889
  19. package/build/protos/protos.js +19779 -11905
  20. package/build/protos/protos.json +1078 -410
  21. package/build/src/v1/container_analysis_client.d.ts +133 -4
  22. package/build/src/v1/container_analysis_client.js +2 -110
  23. package/build/src/v1/container_analysis_client.js.map +1 -1
  24. package/build/src/v1/index.js +1 -0
  25. package/build/src/v1/index.js.map +1 -1
  26. package/build/src/v1beta1/container_analysis_v1_beta1_client.d.ts +190 -11
  27. package/build/src/v1beta1/container_analysis_v1_beta1_client.js +8 -163
  28. package/build/src/v1beta1/container_analysis_v1_beta1_client.js.map +1 -1
  29. package/build/src/v1beta1/grafeas_v1_beta1_client.d.ts +403 -30
  30. package/build/src/v1beta1/grafeas_v1_beta1_client.js +20 -349
  31. package/build/src/v1beta1/grafeas_v1_beta1_client.js.map +1 -1
  32. package/build/src/v1beta1/index.js +1 -0
  33. package/build/src/v1beta1/index.js.map +1 -1
  34. package/package.json +9 -9
package/CHANGELOG.md CHANGED
@@ -4,6 +4,36 @@
4
4
 
5
5
  [1]: https://www.npmjs.com/package/@google-cloud/containeranalysis?activeTab=versions
6
6
 
7
+ ## [4.0.0](https://github.com/googleapis/nodejs-containeranalysis/compare/v3.4.0...v4.0.0) (2022-05-17)
8
+
9
+
10
+ ### ⚠ BREAKING CHANGES
11
+
12
+ * update library to use Node 12 (#408)
13
+
14
+ ### Bug Fixes
15
+
16
+ * Flaky pubsub test ([#394](https://github.com/googleapis/nodejs-containeranalysis/issues/394)) ([eb74ba8](https://github.com/googleapis/nodejs-containeranalysis/commit/eb74ba886c2a3397d57b3f99fca0fe1df1216f2d))
17
+
18
+
19
+ ### Build System
20
+
21
+ * update library to use Node 12 ([#408](https://github.com/googleapis/nodejs-containeranalysis/issues/408)) ([4aeecf8](https://github.com/googleapis/nodejs-containeranalysis/commit/4aeecf8ea7c476aa3dab167766121eeec7346a85))
22
+
23
+ ## [3.4.0](https://github.com/googleapis/nodejs-containeranalysis/compare/v3.3.0...v3.4.0) (2022-04-05)
24
+
25
+
26
+ ### Features
27
+
28
+ * AuditConfig for IAM v1 ([#388](https://github.com/googleapis/nodejs-containeranalysis/issues/388)) ([f4d14d7](https://github.com/googleapis/nodejs-containeranalysis/commit/f4d14d7734054b8bd7037b189e7af1876e119f51))
29
+
30
+ ## [3.3.0](https://www.github.com/googleapis/nodejs-containeranalysis/compare/v3.2.0...v3.3.0) (2021-11-11)
31
+
32
+
33
+ ### Features
34
+
35
+ * Updating the grafeas protos to include compliance and intoto attestation protos ([#352](https://www.github.com/googleapis/nodejs-containeranalysis/issues/352)) ([ea334fb](https://www.github.com/googleapis/nodejs-containeranalysis/commit/ea334fb38ba769af3e7473db9414db0850d2bbdb))
36
+
7
37
  ## [3.2.0](https://www.github.com/googleapis/nodejs-containeranalysis/compare/v3.1.8...v3.2.0) (2021-08-23)
8
38
 
9
39
 
package/README.md CHANGED
@@ -4,9 +4,8 @@
4
4
 
5
5
  # [Google Container Analysis: Node.js Client](https://github.com/googleapis/nodejs-containeranalysis)
6
6
 
7
- [![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
7
+ [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
8
8
  [![npm version](https://img.shields.io/npm/v/@google-cloud/containeranalysis.svg)](https://www.npmjs.org/package/@google-cloud/containeranalysis)
9
- [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-containeranalysis/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-containeranalysis)
10
9
 
11
10
 
12
11
 
@@ -136,37 +135,38 @@ also contains samples.
136
135
  Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/).
137
136
  Libraries are compatible with all current _active_ and _maintenance_ versions of
138
137
  Node.js.
138
+ If you are using an end-of-life version of Node.js, we recommend that you update
139
+ as soon as possible to an actively supported LTS version.
139
140
 
140
- Client libraries targeting some end-of-life versions of Node.js are available, and
141
- can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag).
142
- The dist-tags follow the naming convention `legacy-(version)`.
143
-
144
- _Legacy Node.js versions are supported as a best effort:_
145
-
146
- * Legacy versions will not be tested in continuous integration.
147
- * Some security patches may not be able to be backported.
148
- * Dependencies will not be kept up-to-date, and features will not be backported.
141
+ Google's client libraries support legacy versions of Node.js runtimes on a
142
+ best-efforts basis with the following warnings:
149
143
 
150
- #### Legacy tags available
144
+ * Legacy versions are not tested in continuous integration.
145
+ * Some security patches and features cannot be backported.
146
+ * Dependencies cannot be kept up-to-date.
151
147
 
152
- * `legacy-8`: install client libraries from this dist-tag for versions
153
- compatible with Node.js 8.
148
+ Client libraries targeting some end-of-life versions of Node.js are available, and
149
+ can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag).
150
+ The dist-tags follow the naming convention `legacy-(version)`.
151
+ For example, `npm install @google-cloud/containeranalysis@legacy-8` installs client libraries
152
+ for versions compatible with Node.js 8.
154
153
 
155
154
  ## Versioning
156
155
 
157
156
  This library follows [Semantic Versioning](http://semver.org/).
158
157
 
159
158
 
160
- This library is considered to be **General Availability (GA)**. This means it
161
- is stable; the code surface will not change in backwards-incompatible ways
159
+
160
+ This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways
162
161
  unless absolutely necessary (e.g. because of critical security issues) or with
163
- an extensive deprecation period. Issues and requests against **GA** libraries
162
+ an extensive deprecation period. Issues and requests against **stable** libraries
164
163
  are addressed with the highest priority.
165
164
 
166
165
 
167
166
 
168
167
 
169
168
 
169
+
170
170
  More Information: [Google Cloud Platform Launch Stages][launch_stages]
171
171
 
172
172
  [launch_stages]: https://cloud.google.com/terms/launch-stages
@@ -1,4 +1,4 @@
1
- // Copyright 2019 Google LLC
1
+ // Copyright 2021 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -22,8 +22,7 @@ import "google/api/field_behavior.proto";
22
22
  import "google/api/resource.proto";
23
23
  import "google/iam/v1/iam_policy.proto";
24
24
  import "google/iam/v1/policy.proto";
25
- import "google/protobuf/timestamp.proto";
26
- import "grafeas/v1/vulnerability.proto";
25
+ import "grafeas/v1/severity.proto";
27
26
 
28
27
  option csharp_namespace = "Google.Cloud.DevTools.ContainerAnalysis.V1";
29
28
  option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1;containeranalysis";
@@ -48,8 +47,7 @@ option php_namespace = "Google\\Cloud\\ContainerAnalysis\\V1";
48
47
  // image with the vulnerability referring to that note.
49
48
  service ContainerAnalysis {
50
49
  option (google.api.default_host) = "containeranalysis.googleapis.com";
51
- option (google.api.oauth_scopes) =
52
- "https://www.googleapis.com/auth/cloud-platform";
50
+ option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
53
51
 
54
52
  // Sets the access control policy on the specified note or occurrence.
55
53
  // Requires `containeranalysis.notes.setIamPolicy` or
@@ -59,8 +57,7 @@ service ContainerAnalysis {
59
57
  // The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for
60
58
  // notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for
61
59
  // occurrences.
62
- rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest)
63
- returns (google.iam.v1.Policy) {
60
+ rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) {
64
61
  option (google.api.http) = {
65
62
  post: "/v1/{resource=projects/*/notes/*}:setIamPolicy"
66
63
  body: "*"
@@ -80,8 +77,7 @@ service ContainerAnalysis {
80
77
  // The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for
81
78
  // notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for
82
79
  // occurrences.
83
- rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest)
84
- returns (google.iam.v1.Policy) {
80
+ rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) {
85
81
  option (google.api.http) = {
86
82
  post: "/v1/{resource=projects/*/notes/*}:getIamPolicy"
87
83
  body: "*"
@@ -100,8 +96,7 @@ service ContainerAnalysis {
100
96
  // The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for
101
97
  // notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for
102
98
  // occurrences.
103
- rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest)
104
- returns (google.iam.v1.TestIamPermissionsResponse) {
99
+ rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) {
105
100
  option (google.api.http) = {
106
101
  post: "/v1/{resource=projects/*/notes/*}:testIamPermissions"
107
102
  body: "*"
@@ -114,9 +109,7 @@ service ContainerAnalysis {
114
109
  }
115
110
 
116
111
  // Gets a summary of the number and severity of occurrences.
117
- rpc GetVulnerabilityOccurrencesSummary(
118
- GetVulnerabilityOccurrencesSummaryRequest)
119
- returns (VulnerabilityOccurrencesSummary) {
112
+ rpc GetVulnerabilityOccurrencesSummary(GetVulnerabilityOccurrencesSummaryRequest) returns (VulnerabilityOccurrencesSummary) {
120
113
  option (google.api.http) = {
121
114
  get: "/v1/{parent=projects/*}/occurrences:vulnerabilitySummary"
122
115
  };
@@ -126,12 +119,13 @@ service ContainerAnalysis {
126
119
 
127
120
  // Request to get a vulnerability summary for some set of occurrences.
128
121
  message GetVulnerabilityOccurrencesSummaryRequest {
129
- // The name of the project to get a vulnerability summary for in the form of
122
+ // Required. The name of the project to get a vulnerability summary for in the form of
130
123
  // `projects/[PROJECT_ID]`.
131
124
  string parent = 1 [
132
- (google.api.resource_reference).type =
133
- "cloudresourcemanager.googleapis.com/Project",
134
- (google.api.field_behavior) = REQUIRED
125
+ (google.api.field_behavior) = REQUIRED,
126
+ (google.api.resource_reference) = {
127
+ type: "cloudresourcemanager.googleapis.com/Project"
128
+ }
135
129
  ];
136
130
 
137
131
  // The filter expression.
@@ -53,6 +53,13 @@ message AttestationNote {
53
53
  Hint hint = 1;
54
54
  }
55
55
 
56
+ message Jwt {
57
+ // The compact encoding of a JWS, which is always three base64 encoded strings
58
+ // joined by periods. For details, see:
59
+ // https://tools.ietf.org/html/rfc7515.html#section-3.1
60
+ string compact_jwt = 1;
61
+ }
62
+
56
63
  // Occurrence that represents a single "attestation". The authenticity of an
57
64
  // attestation can be verified using the attached signature. If the verifier
58
65
  // trusts the public key of the signer, then verifying the signature is
@@ -70,4 +77,14 @@ message AttestationOccurrence {
70
77
  // `signature` verifies `serialized_payload`. See `Signature` in common.proto
71
78
  // for more details on signature structure and verification.
72
79
  repeated Signature signatures = 2;
80
+ // One or more JWTs encoding a self-contained attestation.
81
+ // Each JWT encodes the payload that it verifies within the JWT itself.
82
+ // Verifier implementation SHOULD ignore the `serialized_payload` field
83
+ // when verifying these JWTs.
84
+ // If only JWTs are present on this AttestationOccurrence, then the
85
+ // `serialized_payload` SHOULD be left empty.
86
+ // Each JWT SHOULD encode a claim specific to the `resource_uri` of this
87
+ // Occurrence, but this is not validated by Grafeas metadata API
88
+ // implementations. The JWT itself is opaque to Grafeas.
89
+ repeated Jwt jwts = 3;
73
90
  }
@@ -16,6 +16,8 @@ syntax = "proto3";
16
16
 
17
17
  package grafeas.v1;
18
18
 
19
+ import "grafeas/v1/intoto_provenance.proto";
20
+ import "grafeas/v1/intoto_statement.proto";
19
21
  import "grafeas/v1/provenance.proto";
20
22
 
21
23
  option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas";
@@ -32,7 +34,7 @@ message BuildNote {
32
34
 
33
35
  // Details of a build occurrence.
34
36
  message BuildOccurrence {
35
- // Required. The actual provenance for the build.
37
+ // The actual provenance for the build.
36
38
  grafeas.v1.BuildProvenance provenance = 1;
37
39
 
38
40
  // Serialized JSON representation of the provenance, used in generating the
@@ -47,4 +49,14 @@ message BuildOccurrence {
47
49
  // provenance is marshalled to json as well to prevent incompatibilities with
48
50
  // future changes.
49
51
  string provenance_bytes = 2;
52
+
53
+ // Deprecated. See InTotoStatement for the replacement.
54
+ // In-toto Provenance representation as defined in spec.
55
+ InTotoProvenance intoto_provenance = 3;
56
+
57
+ // In-toto Statement representation as defined in spec.
58
+ // The intoto_statement can contain any type of provenance. The serialized
59
+ // payload of the statement can be stored and signed in the Occurrence's
60
+ // envelope.
61
+ InTotoStatement intoto_statement = 4;
50
62
  }
@@ -23,7 +23,7 @@ option objc_class_prefix = "GRA";
23
23
 
24
24
  // Kind represents the kinds of notes supported.
25
25
  enum NoteKind {
26
- // Unknown.
26
+ // Default value. This value is unused.
27
27
  NOTE_KIND_UNSPECIFIED = 0;
28
28
  // The note and occurrence represent a package vulnerability.
29
29
  VULNERABILITY = 1;
@@ -41,6 +41,10 @@ enum NoteKind {
41
41
  ATTESTATION = 7;
42
42
  // This represents an available package upgrade.
43
43
  UPGRADE = 8;
44
+ // This represents a Compliance Note
45
+ COMPLIANCE = 9;
46
+ // This represents a DSSE attestation Note
47
+ DSSE_ATTESTATION = 10;
44
48
  }
45
49
 
46
50
  // Metadata for any related URL information.
@@ -84,7 +88,7 @@ message Signature {
84
88
 
85
89
  // The identifier for the public key that verifies this signature.
86
90
  // * The `public_key_id` is required.
87
- // * The `public_key_id` MUST be an RFC3986 conformant URI.
91
+ // * The `public_key_id` SHOULD be an RFC3986 conformant URI.
88
92
  // * When possible, the `public_key_id` SHOULD be an immutable reference,
89
93
  // such as a cryptographic digest.
90
94
  //
@@ -101,3 +105,17 @@ message Signature {
101
105
  // * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5"
102
106
  string public_key_id = 2;
103
107
  }
108
+
109
+ // MUST match
110
+ // https://github.com/secure-systems-lab/dsse/blob/master/envelope.proto. An
111
+ // authenticated message of arbitrary type.
112
+ message Envelope {
113
+ bytes payload = 1;
114
+ string payload_type = 2;
115
+ repeated EnvelopeSignature signatures = 3;
116
+ }
117
+
118
+ message EnvelopeSignature {
119
+ bytes sig = 1;
120
+ string keyid = 2;
121
+ }
@@ -0,0 +1,79 @@
1
+ // Copyright 2021 The Grafeas Authors. All rights reserved.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ package grafeas.v1;
18
+
19
+ import "grafeas/v1/severity.proto";
20
+
21
+ option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas";
22
+ option java_multiple_files = true;
23
+ option java_package = "io.grafeas.v1";
24
+ option objc_class_prefix = "GRA";
25
+
26
+ message ComplianceNote {
27
+ // The title that identifies this compliance check.
28
+ string title = 1;
29
+ // A description about this compliance check.
30
+ string description = 2;
31
+ // The OS and config versions the benchmark applies to.
32
+ repeated grafeas.v1.ComplianceVersion version = 3;
33
+ // A rationale for the existence of this compliance check.
34
+ string rationale = 4;
35
+ // A description of remediation steps if the compliance check fails.
36
+ string remediation = 5;
37
+ // A compliance check that is a CIS benchmark.
38
+ message CisBenchmark {
39
+ int32 profile_level = 1;
40
+ grafeas.v1.Severity severity = 2;
41
+ }
42
+ oneof compliance_type {
43
+ CisBenchmark cis_benchmark = 6;
44
+ }
45
+ // Serialized scan instructions with a predefined format.
46
+ bytes scan_instructions = 7;
47
+ }
48
+
49
+ // Describes the CIS benchmark version that is applicable to a given OS and
50
+ // os version.
51
+ message ComplianceVersion {
52
+ // The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
53
+ // applicable to.
54
+ string cpe_uri = 1;
55
+ // The version of the benchmark. This is set to the version of the OS-specific
56
+ // CIS document the benchmark is defined in.
57
+ string version = 2;
58
+ }
59
+
60
+ // An indication that the compliance checks in the associated ComplianceNote
61
+ // were not satisfied for particular resources or a specified reason.
62
+ message ComplianceOccurrence {
63
+ repeated NonCompliantFile non_compliant_files = 2;
64
+ string non_compliance_reason = 3;
65
+ }
66
+
67
+ // Details about files that caused a compliance check to fail.
68
+ message NonCompliantFile {
69
+ // display_command is a single command that can be used to display a list of
70
+ // non compliant files. When there is no such command, we can also iterate a
71
+ // list of non compliant file using 'path'.
72
+
73
+ // Empty if `display_command` is set.
74
+ string path = 1;
75
+ // Command to display the non-compliant files.
76
+ string display_command = 2;
77
+ // Explains why a file is non compliant for a CIS check.
78
+ string reason = 3;
79
+ }
@@ -19,6 +19,7 @@ package grafeas.v1;
19
19
  option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas";
20
20
  option java_multiple_files = true;
21
21
  option java_package = "io.grafeas.v1";
22
+ option java_outer_classname = "CvssProto";
22
23
  option objc_class_prefix = "GRA";
23
24
 
24
25
  // Common Vulnerability Scoring System version 3.
@@ -83,3 +84,78 @@ message CVSSv3 {
83
84
  IMPACT_NONE = 3;
84
85
  }
85
86
  }
87
+
88
+ // Common Vulnerability Scoring System.
89
+ // For details, see https://www.first.org/cvss/specification-document
90
+ // This is a message we will try to use for storing multiple versions of
91
+ // CVSS. The intention is that as new versions of CVSS scores get added, we
92
+ // will be able to modify this message rather than adding new protos for each
93
+ // new version of the score.
94
+ message CVSS {
95
+ // The base score is a function of the base metric scores.
96
+ float base_score = 1;
97
+
98
+ float exploitability_score = 2;
99
+
100
+ float impact_score = 3;
101
+
102
+ // Base Metrics
103
+ // Represents the intrinsic characteristics of a vulnerability that are
104
+ // constant over time and across user environments.
105
+ AttackVector attack_vector = 4;
106
+ AttackComplexity attack_complexity = 5;
107
+ Authentication authentication = 6;
108
+ PrivilegesRequired privileges_required = 7;
109
+ UserInteraction user_interaction = 8;
110
+ Scope scope = 9;
111
+ Impact confidentiality_impact = 10;
112
+ Impact integrity_impact = 11;
113
+ Impact availability_impact = 12;
114
+
115
+ enum AttackVector {
116
+ ATTACK_VECTOR_UNSPECIFIED = 0;
117
+ ATTACK_VECTOR_NETWORK = 1;
118
+ ATTACK_VECTOR_ADJACENT = 2;
119
+ ATTACK_VECTOR_LOCAL = 3;
120
+ ATTACK_VECTOR_PHYSICAL = 4;
121
+ }
122
+
123
+ enum AttackComplexity {
124
+ ATTACK_COMPLEXITY_UNSPECIFIED = 0;
125
+ ATTACK_COMPLEXITY_LOW = 1;
126
+ ATTACK_COMPLEXITY_HIGH = 2;
127
+ }
128
+
129
+ enum Authentication {
130
+ AUTHENTICATION_UNSPECIFIED = 0;
131
+ AUTHENTICATION_MULTIPLE = 1;
132
+ AUTHENTICATION_SINGLE = 2;
133
+ AUTHENTICATION_NONE = 3;
134
+ }
135
+
136
+ enum PrivilegesRequired {
137
+ PRIVILEGES_REQUIRED_UNSPECIFIED = 0;
138
+ PRIVILEGES_REQUIRED_NONE = 1;
139
+ PRIVILEGES_REQUIRED_LOW = 2;
140
+ PRIVILEGES_REQUIRED_HIGH = 3;
141
+ }
142
+
143
+ enum UserInteraction {
144
+ USER_INTERACTION_UNSPECIFIED = 0;
145
+ USER_INTERACTION_NONE = 1;
146
+ USER_INTERACTION_REQUIRED = 2;
147
+ }
148
+
149
+ enum Scope {
150
+ SCOPE_UNSPECIFIED = 0;
151
+ SCOPE_UNCHANGED = 1;
152
+ SCOPE_CHANGED = 2;
153
+ }
154
+
155
+ enum Impact {
156
+ IMPACT_UNSPECIFIED = 0;
157
+ IMPACT_HIGH = 1;
158
+ IMPACT_LOW = 2;
159
+ IMPACT_NONE = 3;
160
+ }
161
+ }
@@ -16,6 +16,7 @@ syntax = "proto3";
16
16
 
17
17
  package grafeas.v1;
18
18
 
19
+ import "google/api/field_behavior.proto";
19
20
  import "google/protobuf/timestamp.proto";
20
21
  import "google/rpc/status.proto";
21
22
  import "grafeas/v1/common.proto";
@@ -80,4 +81,8 @@ message DiscoveryOccurrence {
80
81
 
81
82
  // The last time this resource was scanned.
82
83
  google.protobuf.Timestamp last_scan_time = 5;
84
+
85
+ // The time occurrences related to this discovery occurrence were archived.
86
+ google.protobuf.Timestamp archive_time = 6
87
+ [(google.api.field_behavior) = OUTPUT_ONLY];
83
88
  }
@@ -0,0 +1,52 @@
1
+ // Copyright 2021 The Grafeas Authors. All rights reserved.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+ syntax = "proto3";
15
+
16
+ package grafeas.v1;
17
+
18
+ import "grafeas/v1/common.proto";
19
+ import "grafeas/v1/intoto_statement.proto";
20
+
21
+ option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas";
22
+ option java_multiple_files = true;
23
+ option java_package = "io.grafeas.v1";
24
+ option objc_class_prefix = "GRA";
25
+
26
+ message DSSEAttestationNote {
27
+ // This submessage provides human-readable hints about the purpose of the
28
+ // authority. Because the name of a note acts as its resource reference, it is
29
+ // important to disambiguate the canonical name of the Note (which might be a
30
+ // UUID for security purposes) from "readable" names more suitable for debug
31
+ // output. Note that these hints should not be used to look up authorities in
32
+ // security sensitive contexts, such as when looking up attestations to
33
+ // verify.
34
+ message DSSEHint {
35
+ // Required. The human readable name of this attestation authority, for
36
+ // example "cloudbuild-prod".
37
+ string human_readable_name = 1;
38
+ }
39
+ // DSSEHint hints at the purpose of the attestation authority.
40
+ DSSEHint hint = 1;
41
+ }
42
+
43
+ // Deprecated. Prefer to use a regular Occurrence, and populate the
44
+ // Envelope at the top level of the Occurrence.
45
+ message DSSEAttestationOccurrence {
46
+ // If doing something security critical, make sure to verify the signatures in
47
+ // this metadata.
48
+ Envelope envelope = 1;
49
+ oneof decoded_payload {
50
+ InTotoStatement statement = 2;
51
+ }
52
+ }
@@ -26,8 +26,10 @@ import "google/protobuf/timestamp.proto";
26
26
  import "grafeas/v1/attestation.proto";
27
27
  import "grafeas/v1/build.proto";
28
28
  import "grafeas/v1/common.proto";
29
+ import "grafeas/v1/compliance.proto";
29
30
  import "grafeas/v1/deployment.proto";
30
31
  import "grafeas/v1/discovery.proto";
32
+ import "grafeas/v1/dsse_attestation.proto";
31
33
  import "grafeas/v1/image.proto";
32
34
  import "grafeas/v1/package.proto";
33
35
  import "grafeas/v1/upgrade.proto";
@@ -242,7 +244,14 @@ message Occurrence {
242
244
  grafeas.v1.AttestationOccurrence attestation = 14;
243
245
  // Describes an available package upgrade on the linked resource.
244
246
  grafeas.v1.UpgradeOccurrence upgrade = 15;
247
+ // Describes a compliance violation on a linked resource.
248
+ grafeas.v1.ComplianceOccurrence compliance = 16;
249
+ // Describes an attestation of an artifact using dsse.
250
+ grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17;
245
251
  }
252
+
253
+ // https://github.com/secure-systems-lab/dsse
254
+ grafeas.v1.Envelope envelope = 18;
246
255
  }
247
256
 
248
257
  // A type of analysis that can be done for a resource.
@@ -301,6 +310,10 @@ message Note {
301
310
  grafeas.v1.AttestationNote attestation = 16;
302
311
  // A note describing available package upgrades.
303
312
  grafeas.v1.UpgradeNote upgrade = 17;
313
+ // A note describing a compliance check.
314
+ grafeas.v1.ComplianceNote compliance = 18;
315
+ // A note describing a dsse attestation note.
316
+ grafeas.v1.DSSEAttestationNote dsse_attestation = 19;
304
317
  }
305
318
  }
306
319