google-cloud-web_security_scanner-v1beta 0.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.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +203 -0
- data/README.md +75 -0
- data/lib/google-cloud-web_security_scanner-v1beta.rb +21 -0
- data/lib/google/cloud/web_security_scanner/v1beta.rb +35 -0
- data/lib/google/cloud/web_security_scanner/v1beta/version.rb +28 -0
- data/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner.rb +51 -0
- data/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/client.rb +1395 -0
- data/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/credentials.rb +51 -0
- data/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/paths.rb +104 -0
- data/lib/google/cloud/websecurityscanner/v1beta/crawled_url_pb.rb +24 -0
- data/lib/google/cloud/websecurityscanner/v1beta/finding_addon_pb.rb +53 -0
- data/lib/google/cloud/websecurityscanner/v1beta/finding_pb.rb +39 -0
- data/lib/google/cloud/websecurityscanner/v1beta/finding_type_stats_pb.rb +23 -0
- data/lib/google/cloud/websecurityscanner/v1beta/scan_config_error_pb.rb +68 -0
- data/lib/google/cloud/websecurityscanner/v1beta/scan_config_pb.rb +85 -0
- data/lib/google/cloud/websecurityscanner/v1beta/scan_run_error_trace_pb.rb +35 -0
- data/lib/google/cloud/websecurityscanner/v1beta/scan_run_pb.rb +50 -0
- data/lib/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace_pb.rb +30 -0
- data/lib/google/cloud/websecurityscanner/v1beta/web_security_scanner_pb.rb +116 -0
- data/lib/google/cloud/websecurityscanner/v1beta/web_security_scanner_services_pb.rb +73 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +59 -0
- data/proto_docs/google/api/resource.rb +283 -0
- data/proto_docs/google/cloud/websecurityscanner/v1beta/crawled_url.rb +44 -0
- data/proto_docs/google/cloud/websecurityscanner/v1beta/finding.rb +93 -0
- data/proto_docs/google/cloud/websecurityscanner/v1beta/finding_addon.rb +111 -0
- data/proto_docs/google/cloud/websecurityscanner/v1beta/finding_type_stats.rb +39 -0
- data/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config.rb +188 -0
- data/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config_error.rb +191 -0
- data/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run.rb +110 -0
- data/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_error_trace.rb +77 -0
- data/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.rb +62 -0
- data/proto_docs/google/cloud/websecurityscanner/v1beta/web_security_scanner.rb +278 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +120 -0
- metadata +221 -0
@@ -0,0 +1,191 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module WebSecurityScanner
|
23
|
+
module V1beta
|
24
|
+
# Defines a custom error message used by CreateScanConfig and UpdateScanConfig
|
25
|
+
# APIs when scan configuration validation fails. It is also reported as part of
|
26
|
+
# a ScanRunErrorTrace message if scan validation fails due to a scan
|
27
|
+
# configuration error.
|
28
|
+
# @!attribute [rw] code
|
29
|
+
# @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfigError::Code]
|
30
|
+
# Indicates the reason code for a configuration failure.
|
31
|
+
# @!attribute [rw] field_name
|
32
|
+
# @return [::String]
|
33
|
+
# Indicates the full name of the ScanConfig field that triggers this error,
|
34
|
+
# for example "scan_config.max_qps". This field is provided for
|
35
|
+
# troubleshooting purposes only and its actual value can change in the
|
36
|
+
# future.
|
37
|
+
class ScanConfigError
|
38
|
+
include ::Google::Protobuf::MessageExts
|
39
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
40
|
+
|
41
|
+
# Output only.
|
42
|
+
# Defines an error reason code.
|
43
|
+
# Next id: 44
|
44
|
+
module Code
|
45
|
+
# There is no error.
|
46
|
+
CODE_UNSPECIFIED = 0
|
47
|
+
|
48
|
+
# There is no error.
|
49
|
+
OK = 0
|
50
|
+
|
51
|
+
# Indicates an internal server error.
|
52
|
+
# Please DO NOT USE THIS ERROR CODE unless the root cause is truly unknown.
|
53
|
+
INTERNAL_ERROR = 1
|
54
|
+
|
55
|
+
# One of the seed URLs is an App Engine URL but we cannot validate the scan
|
56
|
+
# settings due to an App Engine API backend error.
|
57
|
+
APPENGINE_API_BACKEND_ERROR = 2
|
58
|
+
|
59
|
+
# One of the seed URLs is an App Engine URL but we cannot access the
|
60
|
+
# App Engine API to validate scan settings.
|
61
|
+
APPENGINE_API_NOT_ACCESSIBLE = 3
|
62
|
+
|
63
|
+
# One of the seed URLs is an App Engine URL but the Default Host of the
|
64
|
+
# App Engine is not set.
|
65
|
+
APPENGINE_DEFAULT_HOST_MISSING = 4
|
66
|
+
|
67
|
+
# Google corporate accounts can not be used for scanning.
|
68
|
+
CANNOT_USE_GOOGLE_COM_ACCOUNT = 6
|
69
|
+
|
70
|
+
# The account of the scan creator can not be used for scanning.
|
71
|
+
CANNOT_USE_OWNER_ACCOUNT = 7
|
72
|
+
|
73
|
+
# This scan targets Compute Engine, but we cannot validate scan settings
|
74
|
+
# due to a Compute Engine API backend error.
|
75
|
+
COMPUTE_API_BACKEND_ERROR = 8
|
76
|
+
|
77
|
+
# This scan targets Compute Engine, but we cannot access the Compute Engine
|
78
|
+
# API to validate the scan settings.
|
79
|
+
COMPUTE_API_NOT_ACCESSIBLE = 9
|
80
|
+
|
81
|
+
# The Custom Login URL does not belong to the current project.
|
82
|
+
CUSTOM_LOGIN_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT = 10
|
83
|
+
|
84
|
+
# The Custom Login URL is malformed (can not be parsed).
|
85
|
+
CUSTOM_LOGIN_URL_MALFORMED = 11
|
86
|
+
|
87
|
+
# The Custom Login URL is mapped to a non-routable IP address in DNS.
|
88
|
+
CUSTOM_LOGIN_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS = 12
|
89
|
+
|
90
|
+
# The Custom Login URL is mapped to an IP address which is not reserved for
|
91
|
+
# the current project.
|
92
|
+
CUSTOM_LOGIN_URL_MAPPED_TO_UNRESERVED_ADDRESS = 13
|
93
|
+
|
94
|
+
# The Custom Login URL has a non-routable IP address.
|
95
|
+
CUSTOM_LOGIN_URL_HAS_NON_ROUTABLE_IP_ADDRESS = 14
|
96
|
+
|
97
|
+
# The Custom Login URL has an IP address which is not reserved for the
|
98
|
+
# current project.
|
99
|
+
CUSTOM_LOGIN_URL_HAS_UNRESERVED_IP_ADDRESS = 15
|
100
|
+
|
101
|
+
# Another scan with the same name (case-sensitive) already exists.
|
102
|
+
DUPLICATE_SCAN_NAME = 16
|
103
|
+
|
104
|
+
# A field is set to an invalid value.
|
105
|
+
INVALID_FIELD_VALUE = 18
|
106
|
+
|
107
|
+
# There was an error trying to authenticate to the scan target.
|
108
|
+
FAILED_TO_AUTHENTICATE_TO_TARGET = 19
|
109
|
+
|
110
|
+
# Finding type value is not specified in the list findings request.
|
111
|
+
FINDING_TYPE_UNSPECIFIED = 20
|
112
|
+
|
113
|
+
# Scan targets Compute Engine, yet current project was not whitelisted for
|
114
|
+
# Google Compute Engine Scanning Alpha access.
|
115
|
+
FORBIDDEN_TO_SCAN_COMPUTE = 21
|
116
|
+
|
117
|
+
# User tries to update managed scan
|
118
|
+
FORBIDDEN_UPDATE_TO_MANAGED_SCAN = 43
|
119
|
+
|
120
|
+
# The supplied filter is malformed. For example, it can not be parsed, does
|
121
|
+
# not have a filter type in expression, or the same filter type appears
|
122
|
+
# more than once.
|
123
|
+
MALFORMED_FILTER = 22
|
124
|
+
|
125
|
+
# The supplied resource name is malformed (can not be parsed).
|
126
|
+
MALFORMED_RESOURCE_NAME = 23
|
127
|
+
|
128
|
+
# The current project is not in an active state.
|
129
|
+
PROJECT_INACTIVE = 24
|
130
|
+
|
131
|
+
# A required field is not set.
|
132
|
+
REQUIRED_FIELD = 25
|
133
|
+
|
134
|
+
# Project id, scanconfig id, scanrun id, or finding id are not consistent
|
135
|
+
# with each other in resource name.
|
136
|
+
RESOURCE_NAME_INCONSISTENT = 26
|
137
|
+
|
138
|
+
# The scan being requested to start is already running.
|
139
|
+
SCAN_ALREADY_RUNNING = 27
|
140
|
+
|
141
|
+
# The scan that was requested to be stopped is not running.
|
142
|
+
SCAN_NOT_RUNNING = 28
|
143
|
+
|
144
|
+
# One of the seed URLs does not belong to the current project.
|
145
|
+
SEED_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT = 29
|
146
|
+
|
147
|
+
# One of the seed URLs is malformed (can not be parsed).
|
148
|
+
SEED_URL_MALFORMED = 30
|
149
|
+
|
150
|
+
# One of the seed URLs is mapped to a non-routable IP address in DNS.
|
151
|
+
SEED_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS = 31
|
152
|
+
|
153
|
+
# One of the seed URLs is mapped to an IP address which is not reserved
|
154
|
+
# for the current project.
|
155
|
+
SEED_URL_MAPPED_TO_UNRESERVED_ADDRESS = 32
|
156
|
+
|
157
|
+
# One of the seed URLs has on-routable IP address.
|
158
|
+
SEED_URL_HAS_NON_ROUTABLE_IP_ADDRESS = 33
|
159
|
+
|
160
|
+
# One of the seed URLs has an IP address that is not reserved
|
161
|
+
# for the current project.
|
162
|
+
SEED_URL_HAS_UNRESERVED_IP_ADDRESS = 35
|
163
|
+
|
164
|
+
# The Cloud Security Scanner service account is not configured under the
|
165
|
+
# project.
|
166
|
+
SERVICE_ACCOUNT_NOT_CONFIGURED = 36
|
167
|
+
|
168
|
+
# A project has reached the maximum number of scans.
|
169
|
+
TOO_MANY_SCANS = 37
|
170
|
+
|
171
|
+
# Resolving the details of the current project fails.
|
172
|
+
UNABLE_TO_RESOLVE_PROJECT_INFO = 38
|
173
|
+
|
174
|
+
# One or more blacklist patterns were in the wrong format.
|
175
|
+
UNSUPPORTED_BLACKLIST_PATTERN_FORMAT = 39
|
176
|
+
|
177
|
+
# The supplied filter is not supported.
|
178
|
+
UNSUPPORTED_FILTER = 40
|
179
|
+
|
180
|
+
# The supplied finding type is not supported. For example, we do not
|
181
|
+
# provide findings of the given finding type.
|
182
|
+
UNSUPPORTED_FINDING_TYPE = 41
|
183
|
+
|
184
|
+
# The URL scheme of one or more of the supplied URLs is not supported.
|
185
|
+
UNSUPPORTED_URL_SCHEME = 42
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|
189
|
+
end
|
190
|
+
end
|
191
|
+
end
|
@@ -0,0 +1,110 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module WebSecurityScanner
|
23
|
+
module V1beta
|
24
|
+
# A ScanRun is a output-only resource representing an actual run of the scan.
|
25
|
+
# Next id: 12
|
26
|
+
# @!attribute [rw] name
|
27
|
+
# @return [::String]
|
28
|
+
# The resource name of the ScanRun. The name follows the format of
|
29
|
+
# 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'.
|
30
|
+
# The ScanRun IDs are generated by the system.
|
31
|
+
# @!attribute [rw] execution_state
|
32
|
+
# @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun::ExecutionState]
|
33
|
+
# The execution state of the ScanRun.
|
34
|
+
# @!attribute [rw] result_state
|
35
|
+
# @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun::ResultState]
|
36
|
+
# The result state of the ScanRun. This field is only available after the
|
37
|
+
# execution state reaches "FINISHED".
|
38
|
+
# @!attribute [rw] start_time
|
39
|
+
# @return [::Google::Protobuf::Timestamp]
|
40
|
+
# The time at which the ScanRun started.
|
41
|
+
# @!attribute [rw] end_time
|
42
|
+
# @return [::Google::Protobuf::Timestamp]
|
43
|
+
# The time at which the ScanRun reached termination state - that the ScanRun
|
44
|
+
# is either finished or stopped by user.
|
45
|
+
# @!attribute [rw] urls_crawled_count
|
46
|
+
# @return [::Integer]
|
47
|
+
# The number of URLs crawled during this ScanRun. If the scan is in progress,
|
48
|
+
# the value represents the number of URLs crawled up to now.
|
49
|
+
# @!attribute [rw] urls_tested_count
|
50
|
+
# @return [::Integer]
|
51
|
+
# The number of URLs tested during this ScanRun. If the scan is in progress,
|
52
|
+
# the value represents the number of URLs tested up to now. The number of
|
53
|
+
# URLs tested is usually larger than the number URLS crawled because
|
54
|
+
# typically a crawled URL is tested with multiple test payloads.
|
55
|
+
# @!attribute [rw] has_vulnerabilities
|
56
|
+
# @return [::Boolean]
|
57
|
+
# Whether the scan run has found any vulnerabilities.
|
58
|
+
# @!attribute [rw] progress_percent
|
59
|
+
# @return [::Integer]
|
60
|
+
# The percentage of total completion ranging from 0 to 100.
|
61
|
+
# If the scan is in queue, the value is 0.
|
62
|
+
# If the scan is running, the value ranges from 0 to 100.
|
63
|
+
# If the scan is finished, the value is 100.
|
64
|
+
# @!attribute [rw] error_trace
|
65
|
+
# @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRunErrorTrace]
|
66
|
+
# If result_state is an ERROR, this field provides the primary reason for
|
67
|
+
# scan's termination and more details, if such are available.
|
68
|
+
# @!attribute [rw] warning_traces
|
69
|
+
# @return [::Array<::Google::Cloud::WebSecurityScanner::V1beta::ScanRunWarningTrace>]
|
70
|
+
# A list of warnings, if such are encountered during this scan run.
|
71
|
+
class ScanRun
|
72
|
+
include ::Google::Protobuf::MessageExts
|
73
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
74
|
+
|
75
|
+
# Types of ScanRun execution state.
|
76
|
+
module ExecutionState
|
77
|
+
# Represents an invalid state caused by internal server error. This value
|
78
|
+
# should never be returned.
|
79
|
+
EXECUTION_STATE_UNSPECIFIED = 0
|
80
|
+
|
81
|
+
# The scan is waiting in the queue.
|
82
|
+
QUEUED = 1
|
83
|
+
|
84
|
+
# The scan is in progress.
|
85
|
+
SCANNING = 2
|
86
|
+
|
87
|
+
# The scan is either finished or stopped by user.
|
88
|
+
FINISHED = 3
|
89
|
+
end
|
90
|
+
|
91
|
+
# Types of ScanRun result state.
|
92
|
+
module ResultState
|
93
|
+
# Default value. This value is returned when the ScanRun is not yet
|
94
|
+
# finished.
|
95
|
+
RESULT_STATE_UNSPECIFIED = 0
|
96
|
+
|
97
|
+
# The scan finished without errors.
|
98
|
+
SUCCESS = 1
|
99
|
+
|
100
|
+
# The scan finished with errors.
|
101
|
+
ERROR = 2
|
102
|
+
|
103
|
+
# The scan was terminated by user.
|
104
|
+
KILLED = 3
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module WebSecurityScanner
|
23
|
+
module V1beta
|
24
|
+
# Output only.
|
25
|
+
# Defines an error trace message for a ScanRun.
|
26
|
+
# @!attribute [rw] code
|
27
|
+
# @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRunErrorTrace::Code]
|
28
|
+
# Indicates the error reason code.
|
29
|
+
# @!attribute [rw] scan_config_error
|
30
|
+
# @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfigError]
|
31
|
+
# If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error
|
32
|
+
# message encountered during scan configuration validation that is performed
|
33
|
+
# before each scan run.
|
34
|
+
# @!attribute [rw] most_common_http_error_code
|
35
|
+
# @return [::Integer]
|
36
|
+
# If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most
|
37
|
+
# common HTTP error code, if such is available. For example, if this code is
|
38
|
+
# 404, the scan has encountered too many NOT_FOUND responses.
|
39
|
+
class ScanRunErrorTrace
|
40
|
+
include ::Google::Protobuf::MessageExts
|
41
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
42
|
+
|
43
|
+
# Output only.
|
44
|
+
# Defines an error reason code.
|
45
|
+
# Next id: 7
|
46
|
+
module Code
|
47
|
+
# Default value is never used.
|
48
|
+
CODE_UNSPECIFIED = 0
|
49
|
+
|
50
|
+
# Indicates that the scan run failed due to an internal server error.
|
51
|
+
INTERNAL_ERROR = 1
|
52
|
+
|
53
|
+
# Indicates a scan configuration error, usually due to outdated ScanConfig
|
54
|
+
# settings, such as starting_urls or the DNS configuration.
|
55
|
+
SCAN_CONFIG_ISSUE = 2
|
56
|
+
|
57
|
+
# Indicates an authentication error, usually due to outdated ScanConfig
|
58
|
+
# authentication settings.
|
59
|
+
AUTHENTICATION_CONFIG_ISSUE = 3
|
60
|
+
|
61
|
+
# Indicates a scan operation timeout, usually caused by a very large site.
|
62
|
+
TIMED_OUT_WHILE_SCANNING = 4
|
63
|
+
|
64
|
+
# Indicates that a scan encountered excessive redirects, either to
|
65
|
+
# authentication or some other page outside of the scan scope.
|
66
|
+
TOO_MANY_REDIRECTS = 5
|
67
|
+
|
68
|
+
# Indicates that a scan encountered numerous errors from the web site
|
69
|
+
# pages. When available, most_common_http_error_code field indicates the
|
70
|
+
# most common HTTP error code encountered during the scan.
|
71
|
+
TOO_MANY_HTTP_ERRORS = 6
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module WebSecurityScanner
|
23
|
+
module V1beta
|
24
|
+
# Output only.
|
25
|
+
# Defines a warning trace message for ScanRun. Warning traces provide customers
|
26
|
+
# with useful information that helps make the scanning process more effective.
|
27
|
+
# @!attribute [rw] code
|
28
|
+
# @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRunWarningTrace::Code]
|
29
|
+
# Indicates the warning code.
|
30
|
+
class ScanRunWarningTrace
|
31
|
+
include ::Google::Protobuf::MessageExts
|
32
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
33
|
+
|
34
|
+
# Output only.
|
35
|
+
# Defines a warning message code.
|
36
|
+
# Next id: 6
|
37
|
+
module Code
|
38
|
+
# Default value is never used.
|
39
|
+
CODE_UNSPECIFIED = 0
|
40
|
+
|
41
|
+
# Indicates that a scan discovered an unexpectedly low number of URLs. This
|
42
|
+
# is sometimes caused by complex navigation features or by using a single
|
43
|
+
# URL for numerous pages.
|
44
|
+
INSUFFICIENT_CRAWL_RESULTS = 1
|
45
|
+
|
46
|
+
# Indicates that a scan discovered too many URLs to test, or excessive
|
47
|
+
# redundant URLs.
|
48
|
+
TOO_MANY_CRAWL_RESULTS = 2
|
49
|
+
|
50
|
+
# Indicates that too many tests have been generated for the scan. Customer
|
51
|
+
# should try reducing the number of starting URLs, increasing the QPS rate,
|
52
|
+
# or narrowing down the scope of the scan using the excluded patterns.
|
53
|
+
TOO_MANY_FUZZ_TASKS = 3
|
54
|
+
|
55
|
+
# Indicates that a scan is blocked by IAP.
|
56
|
+
BLOCKED_BY_IAP = 4
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,278 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module WebSecurityScanner
|
23
|
+
module V1beta
|
24
|
+
# Request for the `CreateScanConfig` method.
|
25
|
+
# @!attribute [rw] parent
|
26
|
+
# @return [::String]
|
27
|
+
# Required. The parent resource name where the scan is created, which should be a
|
28
|
+
# project resource name in the format 'projects/\\{projectId}'.
|
29
|
+
# @!attribute [rw] scan_config
|
30
|
+
# @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig]
|
31
|
+
# Required. The ScanConfig to be created.
|
32
|
+
class CreateScanConfigRequest
|
33
|
+
include ::Google::Protobuf::MessageExts
|
34
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
35
|
+
end
|
36
|
+
|
37
|
+
# Request for the `DeleteScanConfig` method.
|
38
|
+
# @!attribute [rw] name
|
39
|
+
# @return [::String]
|
40
|
+
# Required. The resource name of the ScanConfig to be deleted. The name follows the
|
41
|
+
# format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'.
|
42
|
+
class DeleteScanConfigRequest
|
43
|
+
include ::Google::Protobuf::MessageExts
|
44
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
45
|
+
end
|
46
|
+
|
47
|
+
# Request for the `GetScanConfig` method.
|
48
|
+
# @!attribute [rw] name
|
49
|
+
# @return [::String]
|
50
|
+
# Required. The resource name of the ScanConfig to be returned. The name follows the
|
51
|
+
# format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'.
|
52
|
+
class GetScanConfigRequest
|
53
|
+
include ::Google::Protobuf::MessageExts
|
54
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
55
|
+
end
|
56
|
+
|
57
|
+
# Request for the `ListScanConfigs` method.
|
58
|
+
# @!attribute [rw] parent
|
59
|
+
# @return [::String]
|
60
|
+
# Required. The parent resource name, which should be a project resource name in the
|
61
|
+
# format 'projects/\\{projectId}'.
|
62
|
+
# @!attribute [rw] page_token
|
63
|
+
# @return [::String]
|
64
|
+
# A token identifying a page of results to be returned. This should be a
|
65
|
+
# `next_page_token` value returned from a previous List request.
|
66
|
+
# If unspecified, the first page of results is returned.
|
67
|
+
# @!attribute [rw] page_size
|
68
|
+
# @return [::Integer]
|
69
|
+
# The maximum number of ScanConfigs to return, can be limited by server.
|
70
|
+
# If not specified or not positive, the implementation will select a
|
71
|
+
# reasonable value.
|
72
|
+
class ListScanConfigsRequest
|
73
|
+
include ::Google::Protobuf::MessageExts
|
74
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
75
|
+
end
|
76
|
+
|
77
|
+
# Request for the `UpdateScanConfigRequest` method.
|
78
|
+
# @!attribute [rw] scan_config
|
79
|
+
# @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig]
|
80
|
+
# Required. The ScanConfig to be updated. The name field must be set to identify the
|
81
|
+
# resource to be updated. The values of fields not covered by the mask
|
82
|
+
# will be ignored.
|
83
|
+
# @!attribute [rw] update_mask
|
84
|
+
# @return [::Google::Protobuf::FieldMask]
|
85
|
+
# Required. The update mask applies to the resource. For the `FieldMask` definition,
|
86
|
+
# see
|
87
|
+
# https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
|
88
|
+
class UpdateScanConfigRequest
|
89
|
+
include ::Google::Protobuf::MessageExts
|
90
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
91
|
+
end
|
92
|
+
|
93
|
+
# Response for the `ListScanConfigs` method.
|
94
|
+
# @!attribute [rw] scan_configs
|
95
|
+
# @return [::Array<::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig>]
|
96
|
+
# The list of ScanConfigs returned.
|
97
|
+
# @!attribute [rw] next_page_token
|
98
|
+
# @return [::String]
|
99
|
+
# Token to retrieve the next page of results, or empty if there are no
|
100
|
+
# more results in the list.
|
101
|
+
class ListScanConfigsResponse
|
102
|
+
include ::Google::Protobuf::MessageExts
|
103
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
104
|
+
end
|
105
|
+
|
106
|
+
# Request for the `StartScanRun` method.
|
107
|
+
# @!attribute [rw] name
|
108
|
+
# @return [::String]
|
109
|
+
# Required. The resource name of the ScanConfig to be used. The name follows the
|
110
|
+
# format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'.
|
111
|
+
class StartScanRunRequest
|
112
|
+
include ::Google::Protobuf::MessageExts
|
113
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
114
|
+
end
|
115
|
+
|
116
|
+
# Request for the `GetScanRun` method.
|
117
|
+
# @!attribute [rw] name
|
118
|
+
# @return [::String]
|
119
|
+
# Required. The resource name of the ScanRun to be returned. The name follows the
|
120
|
+
# format of
|
121
|
+
# 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'.
|
122
|
+
class GetScanRunRequest
|
123
|
+
include ::Google::Protobuf::MessageExts
|
124
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
125
|
+
end
|
126
|
+
|
127
|
+
# Request for the `ListScanRuns` method.
|
128
|
+
# @!attribute [rw] parent
|
129
|
+
# @return [::String]
|
130
|
+
# Required. The parent resource name, which should be a scan resource name in the
|
131
|
+
# format 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'.
|
132
|
+
# @!attribute [rw] page_token
|
133
|
+
# @return [::String]
|
134
|
+
# A token identifying a page of results to be returned. This should be a
|
135
|
+
# `next_page_token` value returned from a previous List request.
|
136
|
+
# If unspecified, the first page of results is returned.
|
137
|
+
# @!attribute [rw] page_size
|
138
|
+
# @return [::Integer]
|
139
|
+
# The maximum number of ScanRuns to return, can be limited by server.
|
140
|
+
# If not specified or not positive, the implementation will select a
|
141
|
+
# reasonable value.
|
142
|
+
class ListScanRunsRequest
|
143
|
+
include ::Google::Protobuf::MessageExts
|
144
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
145
|
+
end
|
146
|
+
|
147
|
+
# Response for the `ListScanRuns` method.
|
148
|
+
# @!attribute [rw] scan_runs
|
149
|
+
# @return [::Array<::Google::Cloud::WebSecurityScanner::V1beta::ScanRun>]
|
150
|
+
# The list of ScanRuns returned.
|
151
|
+
# @!attribute [rw] next_page_token
|
152
|
+
# @return [::String]
|
153
|
+
# Token to retrieve the next page of results, or empty if there are no
|
154
|
+
# more results in the list.
|
155
|
+
class ListScanRunsResponse
|
156
|
+
include ::Google::Protobuf::MessageExts
|
157
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
158
|
+
end
|
159
|
+
|
160
|
+
# Request for the `StopScanRun` method.
|
161
|
+
# @!attribute [rw] name
|
162
|
+
# @return [::String]
|
163
|
+
# Required. The resource name of the ScanRun to be stopped. The name follows the
|
164
|
+
# format of
|
165
|
+
# 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'.
|
166
|
+
class StopScanRunRequest
|
167
|
+
include ::Google::Protobuf::MessageExts
|
168
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
169
|
+
end
|
170
|
+
|
171
|
+
# Request for the `ListCrawledUrls` method.
|
172
|
+
# @!attribute [rw] parent
|
173
|
+
# @return [::String]
|
174
|
+
# Required. The parent resource name, which should be a scan run resource name in the
|
175
|
+
# format
|
176
|
+
# 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'.
|
177
|
+
# @!attribute [rw] page_token
|
178
|
+
# @return [::String]
|
179
|
+
# A token identifying a page of results to be returned. This should be a
|
180
|
+
# `next_page_token` value returned from a previous List request.
|
181
|
+
# If unspecified, the first page of results is returned.
|
182
|
+
# @!attribute [rw] page_size
|
183
|
+
# @return [::Integer]
|
184
|
+
# The maximum number of CrawledUrls to return, can be limited by server.
|
185
|
+
# If not specified or not positive, the implementation will select a
|
186
|
+
# reasonable value.
|
187
|
+
class ListCrawledUrlsRequest
|
188
|
+
include ::Google::Protobuf::MessageExts
|
189
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
190
|
+
end
|
191
|
+
|
192
|
+
# Response for the `ListCrawledUrls` method.
|
193
|
+
# @!attribute [rw] crawled_urls
|
194
|
+
# @return [::Array<::Google::Cloud::WebSecurityScanner::V1beta::CrawledUrl>]
|
195
|
+
# The list of CrawledUrls returned.
|
196
|
+
# @!attribute [rw] next_page_token
|
197
|
+
# @return [::String]
|
198
|
+
# Token to retrieve the next page of results, or empty if there are no
|
199
|
+
# more results in the list.
|
200
|
+
class ListCrawledUrlsResponse
|
201
|
+
include ::Google::Protobuf::MessageExts
|
202
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
203
|
+
end
|
204
|
+
|
205
|
+
# Request for the `GetFinding` method.
|
206
|
+
# @!attribute [rw] name
|
207
|
+
# @return [::String]
|
208
|
+
# Required. The resource name of the Finding to be returned. The name follows the
|
209
|
+
# format of
|
210
|
+
# 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}/findings/\\{findingId}'.
|
211
|
+
class GetFindingRequest
|
212
|
+
include ::Google::Protobuf::MessageExts
|
213
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
214
|
+
end
|
215
|
+
|
216
|
+
# Request for the `ListFindings` method.
|
217
|
+
# @!attribute [rw] parent
|
218
|
+
# @return [::String]
|
219
|
+
# Required. The parent resource name, which should be a scan run resource name in the
|
220
|
+
# format
|
221
|
+
# 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'.
|
222
|
+
# @!attribute [rw] filter
|
223
|
+
# @return [::String]
|
224
|
+
# Required. The filter expression. The expression must be in the format: <field>
|
225
|
+
# <operator> <value>.
|
226
|
+
# Supported field: 'finding_type'.
|
227
|
+
# Supported operator: '='.
|
228
|
+
# @!attribute [rw] page_token
|
229
|
+
# @return [::String]
|
230
|
+
# A token identifying a page of results to be returned. This should be a
|
231
|
+
# `next_page_token` value returned from a previous List request.
|
232
|
+
# If unspecified, the first page of results is returned.
|
233
|
+
# @!attribute [rw] page_size
|
234
|
+
# @return [::Integer]
|
235
|
+
# The maximum number of Findings to return, can be limited by server.
|
236
|
+
# If not specified or not positive, the implementation will select a
|
237
|
+
# reasonable value.
|
238
|
+
class ListFindingsRequest
|
239
|
+
include ::Google::Protobuf::MessageExts
|
240
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
241
|
+
end
|
242
|
+
|
243
|
+
# Response for the `ListFindings` method.
|
244
|
+
# @!attribute [rw] findings
|
245
|
+
# @return [::Array<::Google::Cloud::WebSecurityScanner::V1beta::Finding>]
|
246
|
+
# The list of Findings returned.
|
247
|
+
# @!attribute [rw] next_page_token
|
248
|
+
# @return [::String]
|
249
|
+
# Token to retrieve the next page of results, or empty if there are no
|
250
|
+
# more results in the list.
|
251
|
+
class ListFindingsResponse
|
252
|
+
include ::Google::Protobuf::MessageExts
|
253
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
254
|
+
end
|
255
|
+
|
256
|
+
# Request for the `ListFindingTypeStats` method.
|
257
|
+
# @!attribute [rw] parent
|
258
|
+
# @return [::String]
|
259
|
+
# Required. The parent resource name, which should be a scan run resource name in the
|
260
|
+
# format
|
261
|
+
# 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'.
|
262
|
+
class ListFindingTypeStatsRequest
|
263
|
+
include ::Google::Protobuf::MessageExts
|
264
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
265
|
+
end
|
266
|
+
|
267
|
+
# Response for the `ListFindingTypeStats` method.
|
268
|
+
# @!attribute [rw] finding_type_stats
|
269
|
+
# @return [::Array<::Google::Cloud::WebSecurityScanner::V1beta::FindingTypeStats>]
|
270
|
+
# The list of FindingTypeStats returned.
|
271
|
+
class ListFindingTypeStatsResponse
|
272
|
+
include ::Google::Protobuf::MessageExts
|
273
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
274
|
+
end
|
275
|
+
end
|
276
|
+
end
|
277
|
+
end
|
278
|
+
end
|