@google-cloud/containeranalysis 6.1.0 → 6.3.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/README.md +3 -2
- package/build/protos/google/devtools/containeranalysis/v1/containeranalysis.proto +81 -8
- package/build/protos/google/devtools/containeranalysis/v1beta1/containeranalysis.proto +32 -0
- package/build/protos/grafeas/v1/common.proto +31 -0
- package/build/protos/grafeas/v1/grafeas.proto +5 -0
- package/build/protos/grafeas/v1/secret.proto +90 -0
- package/build/protos/protos.d.ts +1036 -33
- package/build/protos/protos.js +3787 -789
- package/build/protos/protos.json +383 -56
- package/build/src/v1/container_analysis_client.d.ts +38 -11
- package/build/src/v1/container_analysis_client.js +104 -74
- package/build/src/v1/container_analysis_client_config.json +4 -0
- package/build/src/v1/container_analysis_proto_list.json +1 -0
- package/build/src/v1/gapic_metadata.json +10 -0
- package/build/src/v1/grafeas_proto_list.json +1 -0
- package/build/src/v1beta1/container_analysis_v1_beta1_client.d.ts +2 -2
- package/build/src/v1beta1/container_analysis_v1_beta1_client.js +69 -73
- package/build/src/v1beta1/grafeas_v1_beta1_client.d.ts +78 -78
- package/build/src/v1beta1/grafeas_v1_beta1_client.js +174 -198
- package/package.json +4 -4
- package/CHANGELOG.md +0 -560
package/README.md
CHANGED
|
@@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
|
|
|
44
44
|
1. [Select or create a Cloud Platform project][projects].
|
|
45
45
|
1. [Enable billing for your project][billing].
|
|
46
46
|
1. [Enable the Google Container Analysis API][enable_api].
|
|
47
|
-
1. [Set up authentication
|
|
47
|
+
1. [Set up authentication][auth] so you can access the
|
|
48
48
|
API from your local workstation.
|
|
49
49
|
|
|
50
50
|
### Installing the client library
|
|
@@ -62,6 +62,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
|
|
|
62
62
|
|
|
63
63
|
| Sample | Source Code | Try it |
|
|
64
64
|
| --------------------------- | --------------------------------- | ------ |
|
|
65
|
+
| Container_analysis.export_s_b_o_m | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.export_s_b_o_m.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.export_s_b_o_m.js,packages/google-devtools-containeranalysis/samples/README.md) |
|
|
65
66
|
| Container_analysis.get_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.get_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.get_iam_policy.js,packages/google-devtools-containeranalysis/samples/README.md) |
|
|
66
67
|
| Container_analysis.get_vulnerability_occurrences_summary | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.get_vulnerability_occurrences_summary.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.get_vulnerability_occurrences_summary.js,packages/google-devtools-containeranalysis/samples/README.md) |
|
|
67
68
|
| Container_analysis.set_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.set_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.set_iam_policy.js,packages/google-devtools-containeranalysis/samples/README.md) |
|
|
@@ -173,4 +174,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
|
|
|
173
174
|
[projects]: https://console.cloud.google.com/project
|
|
174
175
|
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
|
|
175
176
|
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=containeranalysis.googleapis.com
|
|
176
|
-
[auth]: https://cloud.google.com/docs/authentication/
|
|
177
|
+
[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local
|
|
@@ -29,8 +29,8 @@ option go_package = "cloud.google.com/go/containeranalysis/apiv1/containeranalys
|
|
|
29
29
|
option java_multiple_files = true;
|
|
30
30
|
option java_package = "com.google.containeranalysis.v1";
|
|
31
31
|
option objc_class_prefix = "GCA";
|
|
32
|
-
option ruby_package = "Google::Cloud::ContainerAnalysis::V1";
|
|
33
32
|
option php_namespace = "Google\\Cloud\\ContainerAnalysis\\V1";
|
|
33
|
+
option ruby_package = "Google::Cloud::ContainerAnalysis::V1";
|
|
34
34
|
|
|
35
35
|
// Retrieves analysis results of Cloud components such as Docker container
|
|
36
36
|
// images. The Container Analysis API is an implementation of the
|
|
@@ -47,7 +47,8 @@ option php_namespace = "Google\\Cloud\\ContainerAnalysis\\V1";
|
|
|
47
47
|
// image with the vulnerability referring to that note.
|
|
48
48
|
service ContainerAnalysis {
|
|
49
49
|
option (google.api.default_host) = "containeranalysis.googleapis.com";
|
|
50
|
-
option (google.api.oauth_scopes) =
|
|
50
|
+
option (google.api.oauth_scopes) =
|
|
51
|
+
"https://www.googleapis.com/auth/cloud-platform";
|
|
51
52
|
|
|
52
53
|
// Sets the access control policy on the specified note or occurrence.
|
|
53
54
|
// Requires `containeranalysis.notes.setIamPolicy` or
|
|
@@ -57,7 +58,8 @@ service ContainerAnalysis {
|
|
|
57
58
|
// The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for
|
|
58
59
|
// notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for
|
|
59
60
|
// occurrences.
|
|
60
|
-
rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest)
|
|
61
|
+
rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest)
|
|
62
|
+
returns (google.iam.v1.Policy) {
|
|
61
63
|
option (google.api.http) = {
|
|
62
64
|
post: "/v1/{resource=projects/*/notes/*}:setIamPolicy"
|
|
63
65
|
body: "*"
|
|
@@ -65,6 +67,14 @@ service ContainerAnalysis {
|
|
|
65
67
|
post: "/v1/{resource=projects/*/occurrences/*}:setIamPolicy"
|
|
66
68
|
body: "*"
|
|
67
69
|
}
|
|
70
|
+
additional_bindings {
|
|
71
|
+
post: "/v1/{resource=projects/*/locations/*/notes/*}:setIamPolicy"
|
|
72
|
+
body: "*"
|
|
73
|
+
}
|
|
74
|
+
additional_bindings {
|
|
75
|
+
post: "/v1/{resource=projects/*/locations/*/occurrences/*}:setIamPolicy"
|
|
76
|
+
body: "*"
|
|
77
|
+
}
|
|
68
78
|
};
|
|
69
79
|
option (google.api.method_signature) = "resource,policy";
|
|
70
80
|
}
|
|
@@ -77,7 +87,8 @@ service ContainerAnalysis {
|
|
|
77
87
|
// The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for
|
|
78
88
|
// notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for
|
|
79
89
|
// occurrences.
|
|
80
|
-
rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest)
|
|
90
|
+
rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest)
|
|
91
|
+
returns (google.iam.v1.Policy) {
|
|
81
92
|
option (google.api.http) = {
|
|
82
93
|
post: "/v1/{resource=projects/*/notes/*}:getIamPolicy"
|
|
83
94
|
body: "*"
|
|
@@ -85,6 +96,14 @@ service ContainerAnalysis {
|
|
|
85
96
|
post: "/v1/{resource=projects/*/occurrences/*}:getIamPolicy"
|
|
86
97
|
body: "*"
|
|
87
98
|
}
|
|
99
|
+
additional_bindings {
|
|
100
|
+
post: "/v1/{resource=projects/*/locations/*/notes/*}:getIamPolicy"
|
|
101
|
+
body: "*"
|
|
102
|
+
}
|
|
103
|
+
additional_bindings {
|
|
104
|
+
post: "/v1/{resource=projects/*/locations/*/occurrences/*}:getIamPolicy"
|
|
105
|
+
body: "*"
|
|
106
|
+
}
|
|
88
107
|
};
|
|
89
108
|
option (google.api.method_signature) = "resource";
|
|
90
109
|
}
|
|
@@ -96,7 +115,8 @@ service ContainerAnalysis {
|
|
|
96
115
|
// The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for
|
|
97
116
|
// notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for
|
|
98
117
|
// occurrences.
|
|
99
|
-
rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest)
|
|
118
|
+
rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest)
|
|
119
|
+
returns (google.iam.v1.TestIamPermissionsResponse) {
|
|
100
120
|
option (google.api.http) = {
|
|
101
121
|
post: "/v1/{resource=projects/*/notes/*}:testIamPermissions"
|
|
102
122
|
body: "*"
|
|
@@ -104,23 +124,76 @@ service ContainerAnalysis {
|
|
|
104
124
|
post: "/v1/{resource=projects/*/occurrences/*}:testIamPermissions"
|
|
105
125
|
body: "*"
|
|
106
126
|
}
|
|
127
|
+
additional_bindings {
|
|
128
|
+
post: "/v1/{resource=projects/*/locations/*/notes/*}:testIamPermissions"
|
|
129
|
+
body: "*"
|
|
130
|
+
}
|
|
131
|
+
additional_bindings {
|
|
132
|
+
post: "/v1/{resource=projects/*/locations/*/occurrences/*}:testIamPermissions"
|
|
133
|
+
body: "*"
|
|
134
|
+
}
|
|
107
135
|
};
|
|
108
136
|
option (google.api.method_signature) = "resource,permissions";
|
|
109
137
|
}
|
|
110
138
|
|
|
111
139
|
// Gets a summary of the number and severity of occurrences.
|
|
112
|
-
rpc GetVulnerabilityOccurrencesSummary(
|
|
140
|
+
rpc GetVulnerabilityOccurrencesSummary(
|
|
141
|
+
GetVulnerabilityOccurrencesSummaryRequest)
|
|
142
|
+
returns (VulnerabilityOccurrencesSummary) {
|
|
113
143
|
option (google.api.http) = {
|
|
114
144
|
get: "/v1/{parent=projects/*}/occurrences:vulnerabilitySummary"
|
|
145
|
+
additional_bindings {
|
|
146
|
+
get: "/v1/{parent=projects/*/locations/*}/occurrences:vulnerabilitySummary"
|
|
147
|
+
}
|
|
115
148
|
};
|
|
116
149
|
option (google.api.method_signature) = "parent,filter";
|
|
117
150
|
}
|
|
151
|
+
|
|
152
|
+
// Generates an SBOM for the given resource.
|
|
153
|
+
rpc ExportSBOM(ExportSBOMRequest) returns (ExportSBOMResponse) {
|
|
154
|
+
option (google.api.http) = {
|
|
155
|
+
post: "/v1/{name=projects/*/resources/**}:exportSBOM"
|
|
156
|
+
body: "*"
|
|
157
|
+
additional_bindings {
|
|
158
|
+
post: "/v1/{name=projects/*/locations/*/resources/**}:exportSBOM"
|
|
159
|
+
body: "*"
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// The request to generate and export SBOM. Target must be specified for the
|
|
166
|
+
// request.
|
|
167
|
+
message ExportSBOMRequest {
|
|
168
|
+
// Empty placeholder to denote that this is a Google Cloud Storage
|
|
169
|
+
// export request.
|
|
170
|
+
message CloudStorageLocation {}
|
|
171
|
+
|
|
172
|
+
// Required. The name of the resource in the form of
|
|
173
|
+
// `projects/[PROJECT_ID]/resources/[RESOURCE_URL]`.
|
|
174
|
+
string name = 1 [(google.api.field_behavior) = REQUIRED];
|
|
175
|
+
|
|
176
|
+
// The location of the SBOM export.
|
|
177
|
+
oneof target {
|
|
178
|
+
// Optional. Empty placeholder to denote that this is a Google Cloud Storage
|
|
179
|
+
// export request.
|
|
180
|
+
CloudStorageLocation cloud_storage_location = 2
|
|
181
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// The response from a call to ExportSBOM.
|
|
186
|
+
message ExportSBOMResponse {
|
|
187
|
+
// The name of the discovery occurrence in the form
|
|
188
|
+
// "projects/{project_id}/occurrences/{OCCURRENCE_ID}
|
|
189
|
+
// It can be used to track the progress of the SBOM export.
|
|
190
|
+
string discovery_occurrence = 1;
|
|
118
191
|
}
|
|
119
192
|
|
|
120
193
|
// Request to get a vulnerability summary for some set of occurrences.
|
|
121
194
|
message GetVulnerabilityOccurrencesSummaryRequest {
|
|
122
|
-
// Required. The name of the project to get a vulnerability summary for in the
|
|
123
|
-
// `projects/[PROJECT_ID]`.
|
|
195
|
+
// Required. The name of the project to get a vulnerability summary for in the
|
|
196
|
+
// form of `projects/[PROJECT_ID]`.
|
|
124
197
|
string parent = 1 [
|
|
125
198
|
(google.api.field_behavior) = REQUIRED,
|
|
126
199
|
(google.api.resource_reference) = {
|
|
@@ -62,6 +62,14 @@ service ContainerAnalysisV1Beta1 {
|
|
|
62
62
|
post: "/v1beta1/{resource=projects/*/occurrences/*}:setIamPolicy"
|
|
63
63
|
body: "*"
|
|
64
64
|
}
|
|
65
|
+
additional_bindings {
|
|
66
|
+
post: "/v1beta1/{resource=projects/*/locations/*/notes/*}:setIamPolicy"
|
|
67
|
+
body: "*"
|
|
68
|
+
}
|
|
69
|
+
additional_bindings {
|
|
70
|
+
post: "/v1beta1/{resource=projects/*/locations/*/occurrences/*}:setIamPolicy"
|
|
71
|
+
body: "*"
|
|
72
|
+
}
|
|
65
73
|
};
|
|
66
74
|
option (google.api.method_signature) = "resource,policy";
|
|
67
75
|
}
|
|
@@ -83,6 +91,14 @@ service ContainerAnalysisV1Beta1 {
|
|
|
83
91
|
post: "/v1beta1/{resource=projects/*/occurrences/*}:getIamPolicy"
|
|
84
92
|
body: "*"
|
|
85
93
|
}
|
|
94
|
+
additional_bindings {
|
|
95
|
+
post: "/v1beta1/{resource=projects/*/locations/*/notes/*}:getIamPolicy"
|
|
96
|
+
body: "*"
|
|
97
|
+
}
|
|
98
|
+
additional_bindings {
|
|
99
|
+
post: "/v1beta1/{resource=projects/*/locations/*/occurrences/*}:getIamPolicy"
|
|
100
|
+
body: "*"
|
|
101
|
+
}
|
|
86
102
|
};
|
|
87
103
|
option (google.api.method_signature) = "resource";
|
|
88
104
|
}
|
|
@@ -103,6 +119,14 @@ service ContainerAnalysisV1Beta1 {
|
|
|
103
119
|
post: "/v1beta1/{resource=projects/*/occurrences/*}:testIamPermissions"
|
|
104
120
|
body: "*"
|
|
105
121
|
}
|
|
122
|
+
additional_bindings {
|
|
123
|
+
post: "/v1beta1/{resource=projects/*/locations/*/notes/*}:testIamPermissions"
|
|
124
|
+
body: "*"
|
|
125
|
+
}
|
|
126
|
+
additional_bindings {
|
|
127
|
+
post: "/v1beta1/{resource=projects/*/locations/*/occurrences/*}:testIamPermissions"
|
|
128
|
+
body: "*"
|
|
129
|
+
}
|
|
106
130
|
};
|
|
107
131
|
option (google.api.method_signature) = "resource,permissions";
|
|
108
132
|
}
|
|
@@ -113,6 +137,10 @@ service ContainerAnalysisV1Beta1 {
|
|
|
113
137
|
option (google.api.http) = {
|
|
114
138
|
post: "/v1beta1/{name=projects/*/resources/**}:generatePackagesSummary"
|
|
115
139
|
body: "*"
|
|
140
|
+
additional_bindings {
|
|
141
|
+
post: "/v1beta1/{name=projects/*/locations/*/resources/**}:generatePackagesSummary"
|
|
142
|
+
body: "*"
|
|
143
|
+
}
|
|
116
144
|
};
|
|
117
145
|
}
|
|
118
146
|
|
|
@@ -121,6 +149,10 @@ service ContainerAnalysisV1Beta1 {
|
|
|
121
149
|
option (google.api.http) = {
|
|
122
150
|
post: "/v1beta1/{name=projects/*/resources/**}:exportSBOM"
|
|
123
151
|
body: "*"
|
|
152
|
+
additional_bindings {
|
|
153
|
+
post: "/v1beta1/{name=projects/*/locations/*/resources/**}:exportSBOM"
|
|
154
|
+
body: "*"
|
|
155
|
+
}
|
|
124
156
|
};
|
|
125
157
|
}
|
|
126
158
|
}
|
|
@@ -49,6 +49,8 @@ enum NoteKind {
|
|
|
49
49
|
VULNERABILITY_ASSESSMENT = 11;
|
|
50
50
|
// This represents an SBOM Reference.
|
|
51
51
|
SBOM_REFERENCE = 12;
|
|
52
|
+
// This represents a secret.
|
|
53
|
+
SECRET = 13;
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
// Metadata for any related URL information.
|
|
@@ -129,6 +131,35 @@ message FileLocation {
|
|
|
129
131
|
// For jars that are contained inside .war files, this filepath
|
|
130
132
|
// can indicate the path to war file combined with the path to jar file.
|
|
131
133
|
string file_path = 1;
|
|
134
|
+
// Each package found in a file should have its own layer metadata (that is,
|
|
135
|
+
// information from the origin layer of the package).
|
|
136
|
+
LayerDetails layer_details = 2;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// BaseImage describes a base image of a container image.
|
|
140
|
+
message BaseImage {
|
|
141
|
+
// The name of the base image.
|
|
142
|
+
string name = 1;
|
|
143
|
+
// The repository name in which the base image is from.
|
|
144
|
+
string repository = 2;
|
|
145
|
+
// The number of layers that the base image is composed of.
|
|
146
|
+
int32 layer_count = 3;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// Details about the layer a package was found in.
|
|
150
|
+
message LayerDetails {
|
|
151
|
+
// The index of the layer in the container image.
|
|
152
|
+
int32 index = 1;
|
|
153
|
+
// The diff ID (typically a sha256 hash) of the layer in the container image.
|
|
154
|
+
string diff_id = 2;
|
|
155
|
+
// The layer chain ID (sha256 hash) of the layer in the container image.
|
|
156
|
+
// https://github.com/opencontainers/image-spec/blob/main/config.md#layer-chainid
|
|
157
|
+
string chain_id = 5;
|
|
158
|
+
// The layer build command that was used to build the layer. This may not be
|
|
159
|
+
// found in all layers depending on how the container image is built.
|
|
160
|
+
string command = 3;
|
|
161
|
+
// The base images the layer is found within.
|
|
162
|
+
repeated BaseImage base_images = 4;
|
|
132
163
|
}
|
|
133
164
|
|
|
134
165
|
// License information.
|
|
@@ -33,6 +33,7 @@ import "grafeas/v1/dsse_attestation.proto";
|
|
|
33
33
|
import "grafeas/v1/image.proto";
|
|
34
34
|
import "grafeas/v1/package.proto";
|
|
35
35
|
import "grafeas/v1/sbom.proto";
|
|
36
|
+
import "grafeas/v1/secret.proto";
|
|
36
37
|
import "grafeas/v1/upgrade.proto";
|
|
37
38
|
import "grafeas/v1/vex.proto";
|
|
38
39
|
import "grafeas/v1/vulnerability.proto";
|
|
@@ -296,6 +297,8 @@ message Occurrence {
|
|
|
296
297
|
grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17;
|
|
297
298
|
// Describes a specific SBOM reference occurrences.
|
|
298
299
|
grafeas.v1.SBOMReferenceOccurrence sbom_reference = 19;
|
|
300
|
+
// Describes a secret.
|
|
301
|
+
grafeas.v1.SecretOccurrence secret = 20;
|
|
299
302
|
}
|
|
300
303
|
|
|
301
304
|
// https://github.com/secure-systems-lab/dsse
|
|
@@ -366,6 +369,8 @@ message Note {
|
|
|
366
369
|
grafeas.v1.VulnerabilityAssessmentNote vulnerability_assessment = 20;
|
|
367
370
|
// A note describing an SBOM reference.
|
|
368
371
|
grafeas.v1.SBOMReferenceNote sbom_reference = 21;
|
|
372
|
+
// A note describing a secret.
|
|
373
|
+
grafeas.v1.SecretNote secret = 22;
|
|
369
374
|
}
|
|
370
375
|
}
|
|
371
376
|
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// Copyright 2025 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/api/field_behavior.proto";
|
|
20
|
+
import "google/protobuf/timestamp.proto";
|
|
21
|
+
import "grafeas/v1/common.proto";
|
|
22
|
+
|
|
23
|
+
option go_package = "google.golang.org/genproto/googleapis/grafeas/v1;grafeas";
|
|
24
|
+
option java_multiple_files = true;
|
|
25
|
+
option java_package = "io.grafeas.v1";
|
|
26
|
+
option objc_class_prefix = "GRA";
|
|
27
|
+
|
|
28
|
+
// The note representing a secret.
|
|
29
|
+
message SecretNote {}
|
|
30
|
+
|
|
31
|
+
// The occurrence provides details of a secret.
|
|
32
|
+
message SecretOccurrence {
|
|
33
|
+
// Type of secret.
|
|
34
|
+
SecretKind kind = 1 [(google.api.field_behavior) = REQUIRED];
|
|
35
|
+
|
|
36
|
+
// Locations where the secret is detected.
|
|
37
|
+
repeated SecretLocation locations = 2
|
|
38
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
39
|
+
|
|
40
|
+
// Status of the secret.
|
|
41
|
+
repeated SecretStatus statuses = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// The location of the secret.
|
|
45
|
+
message SecretLocation {
|
|
46
|
+
// The detailed location of the secret.
|
|
47
|
+
oneof location {
|
|
48
|
+
// The secret is found from a file.
|
|
49
|
+
FileLocation file_location = 1;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// The status of the secret with a timestamp.
|
|
54
|
+
message SecretStatus {
|
|
55
|
+
// The status of the secret.
|
|
56
|
+
enum Status {
|
|
57
|
+
// Unspecified
|
|
58
|
+
STATUS_UNSPECIFIED = 0;
|
|
59
|
+
|
|
60
|
+
// The status of the secret is unknown.
|
|
61
|
+
UNKNOWN = 1;
|
|
62
|
+
|
|
63
|
+
// The secret is valid.
|
|
64
|
+
VALID = 2;
|
|
65
|
+
|
|
66
|
+
// The secret is invalid.
|
|
67
|
+
INVALID = 3;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// The status of the secret.
|
|
71
|
+
Status status = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
72
|
+
|
|
73
|
+
// The time the secret status was last updated.
|
|
74
|
+
google.protobuf.Timestamp update_time = 2
|
|
75
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
76
|
+
|
|
77
|
+
// Optional message about the status code.
|
|
78
|
+
string message = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Kind of secret.
|
|
82
|
+
enum SecretKind {
|
|
83
|
+
// Unspecified
|
|
84
|
+
SECRET_KIND_UNSPECIFIED = 0;
|
|
85
|
+
// The secret kind is unknown.
|
|
86
|
+
SECRET_KIND_UNKNOWN = 1;
|
|
87
|
+
// A GCP service account key per:
|
|
88
|
+
// https://cloud.google.com/iam/docs/creating-managing-service-account-keys
|
|
89
|
+
SECRET_KIND_GCP_SERVICE_ACCOUNT_KEY = 2;
|
|
90
|
+
}
|