google-apis-websecurityscanner_v1 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.
@@ -0,0 +1,28 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # 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
+ module Google
16
+ module Apis
17
+ module WebsecurityscannerV1
18
+ # Version of the google-apis-websecurityscanner_v1 gem
19
+ GEM_VERSION = "0.1.0"
20
+
21
+ # Version of the code generator used to generate this client
22
+ GENERATOR_VERSION = "0.1.1"
23
+
24
+ # Revision of the discovery document this client was generated from
25
+ REVISION = "20200919"
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,484 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # 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
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module WebsecurityscannerV1
24
+
25
+ class Authentication
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class CrawledUrl
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class CustomAccount
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class Empty
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class Finding
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class FindingTypeStats
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
61
+ class Form
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class GoogleAccount
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
73
+ class Header
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
79
+ class IapCredential
80
+ class Representation < Google::Apis::Core::JsonRepresentation; end
81
+
82
+ include Google::Apis::Core::JsonObjectSupport
83
+ end
84
+
85
+ class IapTestServiceAccountInfo
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ include Google::Apis::Core::JsonObjectSupport
89
+ end
90
+
91
+ class ListCrawledUrlsResponse
92
+ class Representation < Google::Apis::Core::JsonRepresentation; end
93
+
94
+ include Google::Apis::Core::JsonObjectSupport
95
+ end
96
+
97
+ class ListFindingTypeStatsResponse
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+
100
+ include Google::Apis::Core::JsonObjectSupport
101
+ end
102
+
103
+ class ListFindingsResponse
104
+ class Representation < Google::Apis::Core::JsonRepresentation; end
105
+
106
+ include Google::Apis::Core::JsonObjectSupport
107
+ end
108
+
109
+ class ListScanConfigsResponse
110
+ class Representation < Google::Apis::Core::JsonRepresentation; end
111
+
112
+ include Google::Apis::Core::JsonObjectSupport
113
+ end
114
+
115
+ class ListScanRunsResponse
116
+ class Representation < Google::Apis::Core::JsonRepresentation; end
117
+
118
+ include Google::Apis::Core::JsonObjectSupport
119
+ end
120
+
121
+ class OutdatedLibrary
122
+ class Representation < Google::Apis::Core::JsonRepresentation; end
123
+
124
+ include Google::Apis::Core::JsonObjectSupport
125
+ end
126
+
127
+ class ScanConfig
128
+ class Representation < Google::Apis::Core::JsonRepresentation; end
129
+
130
+ include Google::Apis::Core::JsonObjectSupport
131
+ end
132
+
133
+ class ScanConfigError
134
+ class Representation < Google::Apis::Core::JsonRepresentation; end
135
+
136
+ include Google::Apis::Core::JsonObjectSupport
137
+ end
138
+
139
+ class ScanRun
140
+ class Representation < Google::Apis::Core::JsonRepresentation; end
141
+
142
+ include Google::Apis::Core::JsonObjectSupport
143
+ end
144
+
145
+ class ScanRunErrorTrace
146
+ class Representation < Google::Apis::Core::JsonRepresentation; end
147
+
148
+ include Google::Apis::Core::JsonObjectSupport
149
+ end
150
+
151
+ class ScanRunWarningTrace
152
+ class Representation < Google::Apis::Core::JsonRepresentation; end
153
+
154
+ include Google::Apis::Core::JsonObjectSupport
155
+ end
156
+
157
+ class Schedule
158
+ class Representation < Google::Apis::Core::JsonRepresentation; end
159
+
160
+ include Google::Apis::Core::JsonObjectSupport
161
+ end
162
+
163
+ class StartScanRunRequest
164
+ class Representation < Google::Apis::Core::JsonRepresentation; end
165
+
166
+ include Google::Apis::Core::JsonObjectSupport
167
+ end
168
+
169
+ class StopScanRunRequest
170
+ class Representation < Google::Apis::Core::JsonRepresentation; end
171
+
172
+ include Google::Apis::Core::JsonObjectSupport
173
+ end
174
+
175
+ class ViolatingResource
176
+ class Representation < Google::Apis::Core::JsonRepresentation; end
177
+
178
+ include Google::Apis::Core::JsonObjectSupport
179
+ end
180
+
181
+ class VulnerableHeaders
182
+ class Representation < Google::Apis::Core::JsonRepresentation; end
183
+
184
+ include Google::Apis::Core::JsonObjectSupport
185
+ end
186
+
187
+ class VulnerableParameters
188
+ class Representation < Google::Apis::Core::JsonRepresentation; end
189
+
190
+ include Google::Apis::Core::JsonObjectSupport
191
+ end
192
+
193
+ class Xss
194
+ class Representation < Google::Apis::Core::JsonRepresentation; end
195
+
196
+ include Google::Apis::Core::JsonObjectSupport
197
+ end
198
+
199
+ class Authentication
200
+ # @private
201
+ class Representation < Google::Apis::Core::JsonRepresentation
202
+ property :custom_account, as: 'customAccount', class: Google::Apis::WebsecurityscannerV1::CustomAccount, decorator: Google::Apis::WebsecurityscannerV1::CustomAccount::Representation
203
+
204
+ property :google_account, as: 'googleAccount', class: Google::Apis::WebsecurityscannerV1::GoogleAccount, decorator: Google::Apis::WebsecurityscannerV1::GoogleAccount::Representation
205
+
206
+ property :iap_credential, as: 'iapCredential', class: Google::Apis::WebsecurityscannerV1::IapCredential, decorator: Google::Apis::WebsecurityscannerV1::IapCredential::Representation
207
+
208
+ end
209
+ end
210
+
211
+ class CrawledUrl
212
+ # @private
213
+ class Representation < Google::Apis::Core::JsonRepresentation
214
+ property :body, as: 'body'
215
+ property :http_method, as: 'httpMethod'
216
+ property :url, as: 'url'
217
+ end
218
+ end
219
+
220
+ class CustomAccount
221
+ # @private
222
+ class Representation < Google::Apis::Core::JsonRepresentation
223
+ property :login_url, as: 'loginUrl'
224
+ property :password, as: 'password'
225
+ property :username, as: 'username'
226
+ end
227
+ end
228
+
229
+ class Empty
230
+ # @private
231
+ class Representation < Google::Apis::Core::JsonRepresentation
232
+ end
233
+ end
234
+
235
+ class Finding
236
+ # @private
237
+ class Representation < Google::Apis::Core::JsonRepresentation
238
+ property :body, as: 'body'
239
+ property :description, as: 'description'
240
+ property :final_url, as: 'finalUrl'
241
+ property :finding_type, as: 'findingType'
242
+ property :form, as: 'form', class: Google::Apis::WebsecurityscannerV1::Form, decorator: Google::Apis::WebsecurityscannerV1::Form::Representation
243
+
244
+ property :frame_url, as: 'frameUrl'
245
+ property :fuzzed_url, as: 'fuzzedUrl'
246
+ property :http_method, as: 'httpMethod'
247
+ property :name, as: 'name'
248
+ property :outdated_library, as: 'outdatedLibrary', class: Google::Apis::WebsecurityscannerV1::OutdatedLibrary, decorator: Google::Apis::WebsecurityscannerV1::OutdatedLibrary::Representation
249
+
250
+ property :reproduction_url, as: 'reproductionUrl'
251
+ property :severity, as: 'severity'
252
+ property :tracking_id, as: 'trackingId'
253
+ property :violating_resource, as: 'violatingResource', class: Google::Apis::WebsecurityscannerV1::ViolatingResource, decorator: Google::Apis::WebsecurityscannerV1::ViolatingResource::Representation
254
+
255
+ property :vulnerable_headers, as: 'vulnerableHeaders', class: Google::Apis::WebsecurityscannerV1::VulnerableHeaders, decorator: Google::Apis::WebsecurityscannerV1::VulnerableHeaders::Representation
256
+
257
+ property :vulnerable_parameters, as: 'vulnerableParameters', class: Google::Apis::WebsecurityscannerV1::VulnerableParameters, decorator: Google::Apis::WebsecurityscannerV1::VulnerableParameters::Representation
258
+
259
+ property :xss, as: 'xss', class: Google::Apis::WebsecurityscannerV1::Xss, decorator: Google::Apis::WebsecurityscannerV1::Xss::Representation
260
+
261
+ end
262
+ end
263
+
264
+ class FindingTypeStats
265
+ # @private
266
+ class Representation < Google::Apis::Core::JsonRepresentation
267
+ property :finding_count, as: 'findingCount'
268
+ property :finding_type, as: 'findingType'
269
+ end
270
+ end
271
+
272
+ class Form
273
+ # @private
274
+ class Representation < Google::Apis::Core::JsonRepresentation
275
+ property :action_uri, as: 'actionUri'
276
+ collection :fields, as: 'fields'
277
+ end
278
+ end
279
+
280
+ class GoogleAccount
281
+ # @private
282
+ class Representation < Google::Apis::Core::JsonRepresentation
283
+ property :password, as: 'password'
284
+ property :username, as: 'username'
285
+ end
286
+ end
287
+
288
+ class Header
289
+ # @private
290
+ class Representation < Google::Apis::Core::JsonRepresentation
291
+ property :name, as: 'name'
292
+ property :value, as: 'value'
293
+ end
294
+ end
295
+
296
+ class IapCredential
297
+ # @private
298
+ class Representation < Google::Apis::Core::JsonRepresentation
299
+ property :iap_test_service_account_info, as: 'iapTestServiceAccountInfo', class: Google::Apis::WebsecurityscannerV1::IapTestServiceAccountInfo, decorator: Google::Apis::WebsecurityscannerV1::IapTestServiceAccountInfo::Representation
300
+
301
+ end
302
+ end
303
+
304
+ class IapTestServiceAccountInfo
305
+ # @private
306
+ class Representation < Google::Apis::Core::JsonRepresentation
307
+ property :target_audience_client_id, as: 'targetAudienceClientId'
308
+ end
309
+ end
310
+
311
+ class ListCrawledUrlsResponse
312
+ # @private
313
+ class Representation < Google::Apis::Core::JsonRepresentation
314
+ collection :crawled_urls, as: 'crawledUrls', class: Google::Apis::WebsecurityscannerV1::CrawledUrl, decorator: Google::Apis::WebsecurityscannerV1::CrawledUrl::Representation
315
+
316
+ property :next_page_token, as: 'nextPageToken'
317
+ end
318
+ end
319
+
320
+ class ListFindingTypeStatsResponse
321
+ # @private
322
+ class Representation < Google::Apis::Core::JsonRepresentation
323
+ collection :finding_type_stats, as: 'findingTypeStats', class: Google::Apis::WebsecurityscannerV1::FindingTypeStats, decorator: Google::Apis::WebsecurityscannerV1::FindingTypeStats::Representation
324
+
325
+ end
326
+ end
327
+
328
+ class ListFindingsResponse
329
+ # @private
330
+ class Representation < Google::Apis::Core::JsonRepresentation
331
+ collection :findings, as: 'findings', class: Google::Apis::WebsecurityscannerV1::Finding, decorator: Google::Apis::WebsecurityscannerV1::Finding::Representation
332
+
333
+ property :next_page_token, as: 'nextPageToken'
334
+ end
335
+ end
336
+
337
+ class ListScanConfigsResponse
338
+ # @private
339
+ class Representation < Google::Apis::Core::JsonRepresentation
340
+ property :next_page_token, as: 'nextPageToken'
341
+ collection :scan_configs, as: 'scanConfigs', class: Google::Apis::WebsecurityscannerV1::ScanConfig, decorator: Google::Apis::WebsecurityscannerV1::ScanConfig::Representation
342
+
343
+ end
344
+ end
345
+
346
+ class ListScanRunsResponse
347
+ # @private
348
+ class Representation < Google::Apis::Core::JsonRepresentation
349
+ property :next_page_token, as: 'nextPageToken'
350
+ collection :scan_runs, as: 'scanRuns', class: Google::Apis::WebsecurityscannerV1::ScanRun, decorator: Google::Apis::WebsecurityscannerV1::ScanRun::Representation
351
+
352
+ end
353
+ end
354
+
355
+ class OutdatedLibrary
356
+ # @private
357
+ class Representation < Google::Apis::Core::JsonRepresentation
358
+ collection :learn_more_urls, as: 'learnMoreUrls'
359
+ property :library_name, as: 'libraryName'
360
+ property :version, as: 'version'
361
+ end
362
+ end
363
+
364
+ class ScanConfig
365
+ # @private
366
+ class Representation < Google::Apis::Core::JsonRepresentation
367
+ property :authentication, as: 'authentication', class: Google::Apis::WebsecurityscannerV1::Authentication, decorator: Google::Apis::WebsecurityscannerV1::Authentication::Representation
368
+
369
+ collection :blacklist_patterns, as: 'blacklistPatterns'
370
+ property :display_name, as: 'displayName'
371
+ property :export_to_security_command_center, as: 'exportToSecurityCommandCenter'
372
+ property :managed_scan, as: 'managedScan'
373
+ property :max_qps, as: 'maxQps'
374
+ property :name, as: 'name'
375
+ property :risk_level, as: 'riskLevel'
376
+ property :schedule, as: 'schedule', class: Google::Apis::WebsecurityscannerV1::Schedule, decorator: Google::Apis::WebsecurityscannerV1::Schedule::Representation
377
+
378
+ collection :starting_urls, as: 'startingUrls'
379
+ property :static_ip_scan, as: 'staticIpScan'
380
+ property :user_agent, as: 'userAgent'
381
+ end
382
+ end
383
+
384
+ class ScanConfigError
385
+ # @private
386
+ class Representation < Google::Apis::Core::JsonRepresentation
387
+ property :code, as: 'code'
388
+ property :field_name, as: 'fieldName'
389
+ end
390
+ end
391
+
392
+ class ScanRun
393
+ # @private
394
+ class Representation < Google::Apis::Core::JsonRepresentation
395
+ property :end_time, as: 'endTime'
396
+ property :error_trace, as: 'errorTrace', class: Google::Apis::WebsecurityscannerV1::ScanRunErrorTrace, decorator: Google::Apis::WebsecurityscannerV1::ScanRunErrorTrace::Representation
397
+
398
+ property :execution_state, as: 'executionState'
399
+ property :has_vulnerabilities, as: 'hasVulnerabilities'
400
+ property :name, as: 'name'
401
+ property :progress_percent, as: 'progressPercent'
402
+ property :result_state, as: 'resultState'
403
+ property :start_time, as: 'startTime'
404
+ property :urls_crawled_count, :numeric_string => true, as: 'urlsCrawledCount'
405
+ property :urls_tested_count, :numeric_string => true, as: 'urlsTestedCount'
406
+ collection :warning_traces, as: 'warningTraces', class: Google::Apis::WebsecurityscannerV1::ScanRunWarningTrace, decorator: Google::Apis::WebsecurityscannerV1::ScanRunWarningTrace::Representation
407
+
408
+ end
409
+ end
410
+
411
+ class ScanRunErrorTrace
412
+ # @private
413
+ class Representation < Google::Apis::Core::JsonRepresentation
414
+ property :code, as: 'code'
415
+ property :most_common_http_error_code, as: 'mostCommonHttpErrorCode'
416
+ property :scan_config_error, as: 'scanConfigError', class: Google::Apis::WebsecurityscannerV1::ScanConfigError, decorator: Google::Apis::WebsecurityscannerV1::ScanConfigError::Representation
417
+
418
+ end
419
+ end
420
+
421
+ class ScanRunWarningTrace
422
+ # @private
423
+ class Representation < Google::Apis::Core::JsonRepresentation
424
+ property :code, as: 'code'
425
+ end
426
+ end
427
+
428
+ class Schedule
429
+ # @private
430
+ class Representation < Google::Apis::Core::JsonRepresentation
431
+ property :interval_duration_days, as: 'intervalDurationDays'
432
+ property :schedule_time, as: 'scheduleTime'
433
+ end
434
+ end
435
+
436
+ class StartScanRunRequest
437
+ # @private
438
+ class Representation < Google::Apis::Core::JsonRepresentation
439
+ end
440
+ end
441
+
442
+ class StopScanRunRequest
443
+ # @private
444
+ class Representation < Google::Apis::Core::JsonRepresentation
445
+ end
446
+ end
447
+
448
+ class ViolatingResource
449
+ # @private
450
+ class Representation < Google::Apis::Core::JsonRepresentation
451
+ property :content_type, as: 'contentType'
452
+ property :resource_url, as: 'resourceUrl'
453
+ end
454
+ end
455
+
456
+ class VulnerableHeaders
457
+ # @private
458
+ class Representation < Google::Apis::Core::JsonRepresentation
459
+ collection :headers, as: 'headers', class: Google::Apis::WebsecurityscannerV1::Header, decorator: Google::Apis::WebsecurityscannerV1::Header::Representation
460
+
461
+ collection :missing_headers, as: 'missingHeaders', class: Google::Apis::WebsecurityscannerV1::Header, decorator: Google::Apis::WebsecurityscannerV1::Header::Representation
462
+
463
+ end
464
+ end
465
+
466
+ class VulnerableParameters
467
+ # @private
468
+ class Representation < Google::Apis::Core::JsonRepresentation
469
+ collection :parameter_names, as: 'parameterNames'
470
+ end
471
+ end
472
+
473
+ class Xss
474
+ # @private
475
+ class Representation < Google::Apis::Core::JsonRepresentation
476
+ property :attack_vector, as: 'attackVector'
477
+ property :error_message, as: 'errorMessage'
478
+ collection :stack_traces, as: 'stackTraces'
479
+ property :stored_xss_seeding_url, as: 'storedXssSeedingUrl'
480
+ end
481
+ end
482
+ end
483
+ end
484
+ end