@google-cloud/containeranalysis 3.3.0 → 4.1.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.
- package/CHANGELOG.md +35 -0
- package/README.md +17 -17
- package/build/protos/google/devtools/containeranalysis/v1/containeranalysis.proto +12 -18
- package/build/protos/grafeas/v1/common.proto +29 -0
- package/build/protos/grafeas/v1/compliance.proto +4 -1
- package/build/protos/grafeas/v1/cvss.proto +74 -0
- package/build/protos/grafeas/v1/discovery.proto +5 -0
- package/build/protos/grafeas/v1/dsse_attestation.proto +1 -1
- package/build/protos/grafeas/v1/intoto_provenance.proto +1 -0
- package/build/protos/grafeas/v1/intoto_statement.proto +3 -0
- package/build/protos/grafeas/v1/package.proto +72 -12
- package/build/protos/grafeas/v1/severity.proto +38 -0
- package/build/protos/grafeas/v1/slsa_provenance.proto +2 -1
- package/build/protos/grafeas/v1/slsa_provenance_zero_two.proto +82 -0
- package/build/protos/grafeas/v1/vulnerability.proto +10 -30
- package/build/protos/protos.d.ts +7815 -6050
- package/build/protos/protos.js +21805 -16953
- package/build/protos/protos.json +1076 -608
- package/build/src/v1/container_analysis_client.d.ts +28 -6
- package/build/src/v1/container_analysis_client.js +2 -3
- package/build/src/v1/container_analysis_client.js.map +1 -1
- package/build/src/v1/index.js +1 -0
- package/build/src/v1/index.js.map +1 -1
- package/build/src/v1beta1/container_analysis_v1_beta1_client.d.ts +37 -7
- package/build/src/v1beta1/container_analysis_v1_beta1_client.js +2 -3
- package/build/src/v1beta1/container_analysis_v1_beta1_client.js.map +1 -1
- package/build/src/v1beta1/grafeas_v1_beta1_client.d.ts +75 -15
- package/build/src/v1beta1/grafeas_v1_beta1_client.js +2 -3
- package/build/src/v1beta1/grafeas_v1_beta1_client.js.map +1 -1
- package/build/src/v1beta1/index.js +1 -0
- package/build/src/v1beta1/index.js.map +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,41 @@
|
|
|
4
4
|
|
|
5
5
|
[1]: https://www.npmjs.com/package/@google-cloud/containeranalysis?activeTab=versions
|
|
6
6
|
|
|
7
|
+
## [4.1.0](https://github.com/googleapis/nodejs-containeranalysis/compare/v4.0.0...v4.1.0) (2022-06-10)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* Import of Grafeas from Github ([#413](https://github.com/googleapis/nodejs-containeranalysis/issues/413)) ([fda2b32](https://github.com/googleapis/nodejs-containeranalysis/commit/fda2b3218680d9f0b81435ba9913d150eeded826))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* **deps:** update dependency @google-cloud/pubsub to v3 ([#410](https://github.com/googleapis/nodejs-containeranalysis/issues/410)) ([fb503c8](https://github.com/googleapis/nodejs-containeranalysis/commit/fb503c89c6e0b8af7c4a4c60cddae7cf8727bd2b))
|
|
18
|
+
|
|
19
|
+
## [4.0.0](https://github.com/googleapis/nodejs-containeranalysis/compare/v3.4.0...v4.0.0) (2022-05-17)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### ⚠ BREAKING CHANGES
|
|
23
|
+
|
|
24
|
+
* update library to use Node 12 (#408)
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
* Flaky pubsub test ([#394](https://github.com/googleapis/nodejs-containeranalysis/issues/394)) ([eb74ba8](https://github.com/googleapis/nodejs-containeranalysis/commit/eb74ba886c2a3397d57b3f99fca0fe1df1216f2d))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Build System
|
|
32
|
+
|
|
33
|
+
* update library to use Node 12 ([#408](https://github.com/googleapis/nodejs-containeranalysis/issues/408)) ([4aeecf8](https://github.com/googleapis/nodejs-containeranalysis/commit/4aeecf8ea7c476aa3dab167766121eeec7346a85))
|
|
34
|
+
|
|
35
|
+
## [3.4.0](https://github.com/googleapis/nodejs-containeranalysis/compare/v3.3.0...v3.4.0) (2022-04-05)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### Features
|
|
39
|
+
|
|
40
|
+
* AuditConfig for IAM v1 ([#388](https://github.com/googleapis/nodejs-containeranalysis/issues/388)) ([f4d14d7](https://github.com/googleapis/nodejs-containeranalysis/commit/f4d14d7734054b8bd7037b189e7af1876e119f51))
|
|
41
|
+
|
|
7
42
|
## [3.3.0](https://www.github.com/googleapis/nodejs-containeranalysis/compare/v3.2.0...v3.3.0) (2021-11-11)
|
|
8
43
|
|
|
9
44
|
|
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
|
-
[](https://cloud.google.com/terms/launch-stages)
|
|
8
8
|
[](https://www.npmjs.org/package/@google-cloud/containeranalysis)
|
|
9
|
-
[](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
|
-
|
|
141
|
-
|
|
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
|
-
|
|
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
|
-
|
|
153
|
-
|
|
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
|
-
|
|
161
|
-
is stable
|
|
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 **
|
|
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
|
|
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 "
|
|
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.
|
|
133
|
-
|
|
134
|
-
|
|
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.
|
|
@@ -119,3 +119,32 @@ message EnvelopeSignature {
|
|
|
119
119
|
bytes sig = 1;
|
|
120
120
|
string keyid = 2;
|
|
121
121
|
}
|
|
122
|
+
|
|
123
|
+
// Indicates the location at which a package was found.
|
|
124
|
+
message FileLocation {
|
|
125
|
+
// For jars that are contained inside .war files, this filepath
|
|
126
|
+
// can indicate the path to war file combined with the path to jar file.
|
|
127
|
+
string file_path = 1;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// License information.
|
|
131
|
+
message License {
|
|
132
|
+
// Often a single license can be used to represent the licensing terms.
|
|
133
|
+
// Sometimes it is necessary to include a choice of one or more licenses
|
|
134
|
+
// or some combination of license identifiers.
|
|
135
|
+
// Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT",
|
|
136
|
+
// "GPL-2.0-or-later WITH Bison-exception-2.2".
|
|
137
|
+
string expression = 1;
|
|
138
|
+
|
|
139
|
+
// Comments
|
|
140
|
+
string comments = 2;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Digest information.
|
|
144
|
+
message Digest {
|
|
145
|
+
// `SHA1`, `SHA512` etc.
|
|
146
|
+
string algo = 1;
|
|
147
|
+
|
|
148
|
+
// Value of the digest.
|
|
149
|
+
bytes digest_bytes = 2;
|
|
150
|
+
}
|
|
@@ -16,7 +16,7 @@ syntax = "proto3";
|
|
|
16
16
|
|
|
17
17
|
package grafeas.v1;
|
|
18
18
|
|
|
19
|
-
import "grafeas/v1/
|
|
19
|
+
import "grafeas/v1/severity.proto";
|
|
20
20
|
|
|
21
21
|
option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas";
|
|
22
22
|
option java_multiple_files = true;
|
|
@@ -52,6 +52,9 @@ message ComplianceVersion {
|
|
|
52
52
|
// The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
|
|
53
53
|
// applicable to.
|
|
54
54
|
string cpe_uri = 1;
|
|
55
|
+
// The name of the document that defines this benchmark, e.g. "CIS
|
|
56
|
+
// Container-Optimized OS".
|
|
57
|
+
string benchmark_document = 3;
|
|
55
58
|
// The version of the benchmark. This is set to the version of the OS-specific
|
|
56
59
|
// CIS document the benchmark is defined in.
|
|
57
60
|
string version = 2;
|
|
@@ -20,6 +20,7 @@ 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
22
|
option objc_class_prefix = "GRA";
|
|
23
|
+
option java_outer_classname = "CVSSProto";
|
|
23
24
|
|
|
24
25
|
// Common Vulnerability Scoring System version 3.
|
|
25
26
|
// For details, see https://www.first.org/cvss/specification-document
|
|
@@ -83,3 +84,76 @@ 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 various versions of CVSS
|
|
91
|
+
// rather than making a separate proto for storing a specific version.
|
|
92
|
+
message CVSS {
|
|
93
|
+
// The base score is a function of the base metric scores.
|
|
94
|
+
float base_score = 1;
|
|
95
|
+
|
|
96
|
+
float exploitability_score = 2;
|
|
97
|
+
|
|
98
|
+
float impact_score = 3;
|
|
99
|
+
|
|
100
|
+
// Base Metrics
|
|
101
|
+
// Represents the intrinsic characteristics of a vulnerability that are
|
|
102
|
+
// constant over time and across user environments.
|
|
103
|
+
AttackVector attack_vector = 4;
|
|
104
|
+
AttackComplexity attack_complexity = 5;
|
|
105
|
+
Authentication authentication = 6;
|
|
106
|
+
PrivilegesRequired privileges_required = 7;
|
|
107
|
+
UserInteraction user_interaction = 8;
|
|
108
|
+
Scope scope = 9;
|
|
109
|
+
Impact confidentiality_impact = 10;
|
|
110
|
+
Impact integrity_impact = 11;
|
|
111
|
+
Impact availability_impact = 12;
|
|
112
|
+
|
|
113
|
+
enum AttackVector {
|
|
114
|
+
ATTACK_VECTOR_UNSPECIFIED = 0;
|
|
115
|
+
ATTACK_VECTOR_NETWORK = 1;
|
|
116
|
+
ATTACK_VECTOR_ADJACENT = 2;
|
|
117
|
+
ATTACK_VECTOR_LOCAL = 3;
|
|
118
|
+
ATTACK_VECTOR_PHYSICAL = 4;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
enum AttackComplexity {
|
|
122
|
+
ATTACK_COMPLEXITY_UNSPECIFIED = 0;
|
|
123
|
+
ATTACK_COMPLEXITY_LOW = 1;
|
|
124
|
+
ATTACK_COMPLEXITY_HIGH = 2;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
enum Authentication {
|
|
128
|
+
AUTHENTICATION_UNSPECIFIED = 0;
|
|
129
|
+
AUTHENTICATION_MULTIPLE = 1;
|
|
130
|
+
AUTHENTICATION_SINGLE = 2;
|
|
131
|
+
AUTHENTICATION_NONE = 3;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
enum PrivilegesRequired {
|
|
135
|
+
PRIVILEGES_REQUIRED_UNSPECIFIED = 0;
|
|
136
|
+
PRIVILEGES_REQUIRED_NONE = 1;
|
|
137
|
+
PRIVILEGES_REQUIRED_LOW = 2;
|
|
138
|
+
PRIVILEGES_REQUIRED_HIGH = 3;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
enum UserInteraction {
|
|
142
|
+
USER_INTERACTION_UNSPECIFIED = 0;
|
|
143
|
+
USER_INTERACTION_NONE = 1;
|
|
144
|
+
USER_INTERACTION_REQUIRED = 2;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
enum Scope {
|
|
148
|
+
SCOPE_UNSPECIFIED = 0;
|
|
149
|
+
SCOPE_UNCHANGED = 1;
|
|
150
|
+
SCOPE_CHANGED = 2;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
enum Impact {
|
|
154
|
+
IMPACT_UNSPECIFIED = 0;
|
|
155
|
+
IMPACT_HIGH = 1;
|
|
156
|
+
IMPACT_LOW = 2;
|
|
157
|
+
IMPACT_NONE = 3;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
@@ -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
|
}
|
|
@@ -23,6 +23,7 @@ option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas";
|
|
|
23
23
|
option java_multiple_files = true;
|
|
24
24
|
option java_package = "io.grafeas.v1";
|
|
25
25
|
option objc_class_prefix = "GRA";
|
|
26
|
+
option java_outer_classname = "InTotoProvenanceProto";
|
|
26
27
|
|
|
27
28
|
// Spec defined at
|
|
28
29
|
// https://github.com/in-toto/attestation/blob/main/spec/predicates/provenance.md
|
|
@@ -18,11 +18,13 @@ package grafeas.v1;
|
|
|
18
18
|
|
|
19
19
|
import "grafeas/v1/intoto_provenance.proto";
|
|
20
20
|
import "grafeas/v1/slsa_provenance.proto";
|
|
21
|
+
import "grafeas/v1/slsa_provenance_zero_two.proto";
|
|
21
22
|
|
|
22
23
|
option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas";
|
|
23
24
|
option java_multiple_files = true;
|
|
24
25
|
option java_package = "io.grafeas.v1";
|
|
25
26
|
option objc_class_prefix = "GRA";
|
|
27
|
+
option java_outer_classname = "InTotoStatementProto";
|
|
26
28
|
|
|
27
29
|
// Spec defined at
|
|
28
30
|
// https://github.com/in-toto/attestation/tree/main/spec#statement The
|
|
@@ -37,6 +39,7 @@ message InTotoStatement {
|
|
|
37
39
|
oneof predicate {
|
|
38
40
|
InTotoProvenance provenance = 4;
|
|
39
41
|
SlsaProvenance slsa_provenance = 5;
|
|
42
|
+
SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6;
|
|
40
43
|
}
|
|
41
44
|
}
|
|
42
45
|
message Subject {
|
|
@@ -16,6 +16,9 @@ syntax = "proto3";
|
|
|
16
16
|
|
|
17
17
|
package grafeas.v1;
|
|
18
18
|
|
|
19
|
+
import "google/api/field_behavior.proto";
|
|
20
|
+
import "grafeas/v1/common.proto";
|
|
21
|
+
|
|
19
22
|
option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas";
|
|
20
23
|
option java_multiple_files = true;
|
|
21
24
|
option java_package = "io.grafeas.v1";
|
|
@@ -34,9 +37,9 @@ enum Architecture {
|
|
|
34
37
|
// This represents a particular channel of distribution for a given package.
|
|
35
38
|
// E.g., Debian's jessie-backports dpkg mirror.
|
|
36
39
|
message Distribution {
|
|
37
|
-
//
|
|
40
|
+
// The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
|
|
38
41
|
// denoting the package manager version distributing a package.
|
|
39
|
-
string cpe_uri = 1;
|
|
42
|
+
string cpe_uri = 1 [(google.api.field_behavior) = REQUIRED];
|
|
40
43
|
|
|
41
44
|
// The CPU architecture for which packages in this distribution channel were
|
|
42
45
|
// built.
|
|
@@ -58,10 +61,11 @@ message Distribution {
|
|
|
58
61
|
// An occurrence of a particular package installation found within a system's
|
|
59
62
|
// filesystem. E.g., glibc was found in `/var/lib/dpkg/status`.
|
|
60
63
|
message Location {
|
|
61
|
-
//
|
|
62
|
-
//
|
|
64
|
+
// Deprecated.
|
|
65
|
+
// The CPE URI in [CPE format](https://cpe.mitre.org/specification/)
|
|
63
66
|
string cpe_uri = 1;
|
|
64
67
|
|
|
68
|
+
// Deprecated.
|
|
65
69
|
// The version installed at this location.
|
|
66
70
|
Version version = 2;
|
|
67
71
|
|
|
@@ -69,25 +73,81 @@ message Location {
|
|
|
69
73
|
string path = 3;
|
|
70
74
|
}
|
|
71
75
|
|
|
72
|
-
//
|
|
73
|
-
// channels. E.g., glibc (aka libc6) is distributed by many, at various
|
|
74
|
-
// versions.
|
|
76
|
+
// PackageNote represents a particular package version.
|
|
75
77
|
message PackageNote {
|
|
76
|
-
//
|
|
77
|
-
string name = 1
|
|
78
|
+
// The name of the package.
|
|
79
|
+
string name = 1 [
|
|
80
|
+
(google.api.field_behavior) = REQUIRED,
|
|
81
|
+
(google.api.field_behavior) = IMMUTABLE
|
|
82
|
+
];
|
|
78
83
|
|
|
84
|
+
// Deprecated.
|
|
79
85
|
// The various channels by which a package is distributed.
|
|
80
86
|
repeated Distribution distribution = 10;
|
|
87
|
+
|
|
88
|
+
// The type of package; whether native or non native (e.g., ruby gems,
|
|
89
|
+
// node.js packages, etc.).
|
|
90
|
+
string package_type = 11;
|
|
91
|
+
|
|
92
|
+
// The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
|
|
93
|
+
// denoting the package manager version distributing a package.
|
|
94
|
+
// The cpe_uri will be blank for language packages.
|
|
95
|
+
string cpe_uri = 12;
|
|
96
|
+
|
|
97
|
+
// The CPU architecture for which packages in this distribution channel were
|
|
98
|
+
// built. Architecture will be blank for language packages.
|
|
99
|
+
Architecture architecture = 13;
|
|
100
|
+
|
|
101
|
+
// The version of the package.
|
|
102
|
+
Version version = 14;
|
|
103
|
+
|
|
104
|
+
// A freeform text denoting the maintainer of this package.
|
|
105
|
+
string maintainer = 15;
|
|
106
|
+
|
|
107
|
+
// The homepage for this package.
|
|
108
|
+
string url = 16;
|
|
109
|
+
|
|
110
|
+
// The description of this package.
|
|
111
|
+
string description = 17;
|
|
112
|
+
|
|
113
|
+
// Licenses that have been declared by the authors of the package.
|
|
114
|
+
License license = 18;
|
|
115
|
+
|
|
116
|
+
// Hash value, typically a file digest, that allows unique
|
|
117
|
+
// identification a specific package.
|
|
118
|
+
repeated Digest digest = 19;
|
|
81
119
|
}
|
|
82
120
|
|
|
83
121
|
// Details on how a particular software package was installed on a system.
|
|
84
122
|
message PackageOccurrence {
|
|
85
|
-
//
|
|
86
|
-
string name = 1
|
|
123
|
+
// The name of the installed package.
|
|
124
|
+
string name = 1 [
|
|
125
|
+
(google.api.field_behavior) = REQUIRED,
|
|
126
|
+
(google.api.field_behavior) = OUTPUT_ONLY
|
|
127
|
+
];
|
|
87
128
|
|
|
88
|
-
//
|
|
129
|
+
// All of the places within the filesystem versions of this package
|
|
89
130
|
// have been found.
|
|
90
131
|
repeated Location location = 2;
|
|
132
|
+
|
|
133
|
+
// The type of package; whether native or non native (e.g., ruby gems,
|
|
134
|
+
// node.js packages, etc.).
|
|
135
|
+
string package_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
136
|
+
|
|
137
|
+
// The cpe_uri in [CPE format](https://cpe.mitre.org/specification/)
|
|
138
|
+
// denoting the package manager version distributing a package.
|
|
139
|
+
// The cpe_uri will be blank for language packages.
|
|
140
|
+
string cpe_uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
141
|
+
|
|
142
|
+
// The CPU architecture for which packages in this distribution channel were
|
|
143
|
+
// built. Architecture will be blank for language packages.
|
|
144
|
+
Architecture architecture = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
145
|
+
|
|
146
|
+
// Licenses that have been declared by the authors of the package.
|
|
147
|
+
License license = 6;
|
|
148
|
+
|
|
149
|
+
// The version of the package.
|
|
150
|
+
Version version = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
91
151
|
}
|
|
92
152
|
|
|
93
153
|
// Version contains structured information about the version of a package.
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas";
|
|
20
|
+
option java_multiple_files = true;
|
|
21
|
+
option java_package = "io.grafeas.v1";
|
|
22
|
+
option objc_class_prefix = "GRA";
|
|
23
|
+
|
|
24
|
+
// Note provider assigned severity/impact ranking.
|
|
25
|
+
enum Severity {
|
|
26
|
+
// Unknown.
|
|
27
|
+
SEVERITY_UNSPECIFIED = 0;
|
|
28
|
+
// Minimal severity.
|
|
29
|
+
MINIMAL = 1;
|
|
30
|
+
// Low severity.
|
|
31
|
+
LOW = 2;
|
|
32
|
+
// Medium severity.
|
|
33
|
+
MEDIUM = 3;
|
|
34
|
+
// High severity.
|
|
35
|
+
HIGH = 4;
|
|
36
|
+
// Critical severity.
|
|
37
|
+
CRITICAL = 5;
|
|
38
|
+
}
|
|
@@ -23,6 +23,7 @@ option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas";
|
|
|
23
23
|
option java_multiple_files = true;
|
|
24
24
|
option java_package = "io.grafeas.v1";
|
|
25
25
|
option objc_class_prefix = "GRA";
|
|
26
|
+
option java_outer_classname = "SlsaProvenanceProto";
|
|
26
27
|
|
|
27
28
|
message SlsaProvenance {
|
|
28
29
|
// Steps taken to build the artifact.
|
|
@@ -111,4 +112,4 @@ message SlsaProvenance {
|
|
|
111
112
|
// incomplete unless metadata.completeness.materials is true. Unset or null is
|
|
112
113
|
// equivalent to empty.
|
|
113
114
|
repeated Material materials = 4;
|
|
114
|
-
}
|
|
115
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
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 "google/protobuf/struct.proto";
|
|
20
|
+
import "google/protobuf/timestamp.proto";
|
|
21
|
+
|
|
22
|
+
option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas";
|
|
23
|
+
option java_multiple_files = true;
|
|
24
|
+
option java_package = "io.grafeas.v1";
|
|
25
|
+
option objc_class_prefix = "GRA";
|
|
26
|
+
option java_outer_classname = "SlsaProvenanceZeroTwoProto";
|
|
27
|
+
|
|
28
|
+
message SlsaProvenanceZeroTwo {
|
|
29
|
+
// See full explanation of fields at slsa.dev/provenance/v0.2.
|
|
30
|
+
|
|
31
|
+
// Identifies the entity that executed the recipe, which is trusted to have
|
|
32
|
+
// correctly performed the operation and populated this provenance.
|
|
33
|
+
message SlsaBuilder {
|
|
34
|
+
string id = 1;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// The collection of artifacts that influenced the build including sources,
|
|
38
|
+
// dependencies, build tools, base images, and so on.
|
|
39
|
+
message SlsaMaterial {
|
|
40
|
+
string uri = 1;
|
|
41
|
+
map<string, string> digest = 2;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Identifies the event that kicked off the build.
|
|
45
|
+
message SlsaInvocation {
|
|
46
|
+
SlsaConfigSource config_source = 1;
|
|
47
|
+
google.protobuf.Struct parameters = 2;
|
|
48
|
+
google.protobuf.Struct environment = 3;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Describes where the config file that kicked off the build came from.
|
|
52
|
+
// This is effectively a pointer to the source where buildConfig came from.
|
|
53
|
+
message SlsaConfigSource {
|
|
54
|
+
string uri = 1;
|
|
55
|
+
map<string, string> digest = 2;
|
|
56
|
+
string entry_point = 3;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Other properties of the build.
|
|
60
|
+
message SlsaMetadata {
|
|
61
|
+
string build_invocation_id = 1;
|
|
62
|
+
google.protobuf.Timestamp build_started_on = 2;
|
|
63
|
+
google.protobuf.Timestamp build_finished_on = 3;
|
|
64
|
+
SlsaCompleteness completeness = 4;
|
|
65
|
+
bool reproducible = 5;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Indicates that the builder claims certain fields in this message to be
|
|
69
|
+
// complete.
|
|
70
|
+
message SlsaCompleteness {
|
|
71
|
+
bool parameters = 1;
|
|
72
|
+
bool environment = 2;
|
|
73
|
+
bool materials = 3;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
SlsaBuilder builder = 1;
|
|
77
|
+
string build_type = 2;
|
|
78
|
+
SlsaInvocation invocation = 3;
|
|
79
|
+
google.protobuf.Struct build_config = 4;
|
|
80
|
+
SlsaMetadata metadata = 5;
|
|
81
|
+
repeated SlsaMaterial materials = 6;
|
|
82
|
+
}
|