google-apis-websecurityscanner_v1beta 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: fdc1600955729a501fd57deed17bf2b36ee35fa11a0b8c6a5845fb7cbf328852
4
+ data.tar.gz: ad49e8cb951b4dcae80bcfba04aa7073226489c485c80dbf194e8c1692e6a600
5
+ SHA512:
6
+ metadata.gz: 0a5e7173576af5fb271d27f8b31a65ae2008617955122e404dbd89526e26134b44da01b826b894b61b63b8696250f414ee4816288b04494316a264844a7fa9c4
7
+ data.tar.gz: 6dc7323f2081bc709789056dd06e93fbcd1cff77043c7865a98dec7fbe52582432b1a569628f9627c729f7f19f4b0cde3fc99d4724af001ac455add8479feb3c
@@ -0,0 +1,13 @@
1
+ --hide-void-return
2
+ --no-private
3
+ --verbose
4
+ --title=google-apis-websecurityscanner_v1beta
5
+ --markup-provider=redcarpet
6
+ --markup=markdown
7
+ --main OVERVIEW.md
8
+ lib/google/apis/websecurityscanner_v1beta/*.rb
9
+ lib/google/apis/websecurityscanner_v1beta.rb
10
+ -
11
+ OVERVIEW.md
12
+ CHANGELOG.md
13
+ LICENSE.md
@@ -0,0 +1,7 @@
1
+ # Release history for google-apis-websecurityscanner_v1beta
2
+
3
+ ### v0.1.0 (2021-01-07)
4
+
5
+ * Regenerated using generator version 0.1.1
6
+ * Regenerated from discovery document revision 20200919
7
+
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,96 @@
1
+ # Simple REST client for version V1beta of the Web Security Scanner API
2
+
3
+ This is a simple client library for version V1beta of the Web Security Scanner API. It provides:
4
+
5
+ * A client object that connects to the HTTP/JSON REST endpoint for the service.
6
+ * Ruby objects for data structures related to the service.
7
+ * Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts.
8
+ * Control of retry, pagination, and timeouts.
9
+
10
+ Note that although this client library is supported and will continue to be updated to track changes to the service, it is otherwise considered complete and not under active development. Many Google services, especially Google Cloud Platform services, may provide a more modern client that is under more active development and improvement. See the section below titled *Which client should I use?* for more information.
11
+
12
+ ## Getting started
13
+
14
+ ### Before you begin
15
+
16
+ There are a few setup steps you need to complete before you can use this library:
17
+
18
+ 1. If you don't already have a Google account, [sign up](https://www.google.com/accounts).
19
+ 2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/).
20
+ 3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/websecurityscanner.googleapis.com) in the console.
21
+
22
+ ### Installation
23
+
24
+ Add this line to your application's Gemfile:
25
+
26
+ ```ruby
27
+ gem 'google-apis-websecurityscanner_v1beta', '~> 0.1'
28
+ ```
29
+
30
+ And then execute:
31
+
32
+ ```
33
+ $ bundle
34
+ ```
35
+
36
+ Or install it yourself as:
37
+
38
+ ```
39
+ $ gem install google-apis-websecurityscanner_v1beta
40
+ ```
41
+
42
+ ### Creating a client object
43
+
44
+ Once the gem is installed, you can load the client code and instantiate a client.
45
+
46
+ ```ruby
47
+ # Load the client
48
+ require "google/apis/websecurityscanner_v1beta"
49
+
50
+ # Create a client object
51
+ client = Google::Apis::WebsecurityscannerV1beta::WebSecurityScannerService.new
52
+
53
+ # Authenticate calls
54
+ client.authentication = # ... use the googleauth gem to create credentials
55
+ ```
56
+
57
+ See the class reference docs for information on the methods you can call from a client.
58
+
59
+ ## Documentation
60
+
61
+ More detailed descriptions of the Google simple REST clients are available in two documents.
62
+
63
+ * The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
64
+ * The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
65
+
66
+ (Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Websecurityscanner service in particular.)
67
+
68
+ For reference information on specific calls in the Web Security Scanner API, see the {Google::Apis::WebsecurityscannerV1beta::WebSecurityScannerService class reference docs}.
69
+
70
+ ## Which client should I use?
71
+
72
+ Google provides two types of Ruby API client libraries: **simple REST clients** and **modern clients**.
73
+
74
+ This library, `google-apis-websecurityscanner_v1beta`, is a simple REST client. You can identify these clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The simple REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
75
+
76
+ Modern clients are produced by a modern code generator, sometimes combined with hand-crafted functionality. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Google Cloud Platform services, but do not yet support all the services covered by the simple clients.
77
+
78
+ Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
79
+
80
+ **For most users, we recommend the modern client, if one is available.** Compared with simple clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a simple client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
81
+
82
+ The [product documentation](https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-overview/) may provide guidance regarding the preferred client library to use.
83
+
84
+ ## Supported Ruby versions
85
+
86
+ This library is supported on Ruby 2.5+.
87
+
88
+ Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
89
+
90
+ ## License
91
+
92
+ This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}.
93
+
94
+ ## Support
95
+
96
+ Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).
@@ -0,0 +1,15 @@
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 "google/apis/websecurityscanner_v1beta"
@@ -0,0 +1,36 @@
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 'google/apis/websecurityscanner_v1beta/service.rb'
16
+ require 'google/apis/websecurityscanner_v1beta/classes.rb'
17
+ require 'google/apis/websecurityscanner_v1beta/representations.rb'
18
+ require 'google/apis/websecurityscanner_v1beta/gem_version.rb'
19
+
20
+ module Google
21
+ module Apis
22
+ # Web Security Scanner API
23
+ #
24
+ # Scans your Compute and App Engine apps for common web vulnerabilities.
25
+ #
26
+ # @see https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-overview/
27
+ module WebsecurityscannerV1beta
28
+ # Version of the Web Security Scanner API this client connects to.
29
+ # This is NOT the gem version.
30
+ VERSION = 'V1beta'
31
+
32
+ # View and manage your data across Google Cloud Platform services
33
+ AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,996 @@
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 WebsecurityscannerV1beta
24
+
25
+ # Scan authentication configuration.
26
+ class Authentication
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # Describes authentication configuration that uses a custom account.
30
+ # Corresponds to the JSON property `customAccount`
31
+ # @return [Google::Apis::WebsecurityscannerV1beta::CustomAccount]
32
+ attr_accessor :custom_account
33
+
34
+ # Describes authentication configuration that uses a Google account.
35
+ # Corresponds to the JSON property `googleAccount`
36
+ # @return [Google::Apis::WebsecurityscannerV1beta::GoogleAccount]
37
+ attr_accessor :google_account
38
+
39
+ # Describes authentication configuration for Identity-Aware-Proxy (IAP).
40
+ # Corresponds to the JSON property `iapCredential`
41
+ # @return [Google::Apis::WebsecurityscannerV1beta::IapCredential]
42
+ attr_accessor :iap_credential
43
+
44
+ def initialize(**args)
45
+ update!(**args)
46
+ end
47
+
48
+ # Update properties of this object
49
+ def update!(**args)
50
+ @custom_account = args[:custom_account] if args.key?(:custom_account)
51
+ @google_account = args[:google_account] if args.key?(:google_account)
52
+ @iap_credential = args[:iap_credential] if args.key?(:iap_credential)
53
+ end
54
+ end
55
+
56
+ # A CrawledUrl resource represents a URL that was crawled during a ScanRun. Web
57
+ # Security Scanner Service crawls the web applications, following all links
58
+ # within the scope of sites, to find the URLs to test against.
59
+ class CrawledUrl
60
+ include Google::Apis::Core::Hashable
61
+
62
+ # The body of the request that was used to visit the URL.
63
+ # Corresponds to the JSON property `body`
64
+ # @return [String]
65
+ attr_accessor :body
66
+
67
+ # The http method of the request that was used to visit the URL, in uppercase.
68
+ # Corresponds to the JSON property `httpMethod`
69
+ # @return [String]
70
+ attr_accessor :http_method
71
+
72
+ # The URL that was crawled.
73
+ # Corresponds to the JSON property `url`
74
+ # @return [String]
75
+ attr_accessor :url
76
+
77
+ def initialize(**args)
78
+ update!(**args)
79
+ end
80
+
81
+ # Update properties of this object
82
+ def update!(**args)
83
+ @body = args[:body] if args.key?(:body)
84
+ @http_method = args[:http_method] if args.key?(:http_method)
85
+ @url = args[:url] if args.key?(:url)
86
+ end
87
+ end
88
+
89
+ # Describes authentication configuration that uses a custom account.
90
+ class CustomAccount
91
+ include Google::Apis::Core::Hashable
92
+
93
+ # Required. The login form URL of the website.
94
+ # Corresponds to the JSON property `loginUrl`
95
+ # @return [String]
96
+ attr_accessor :login_url
97
+
98
+ # Required. Input only. The password of the custom account. The credential is
99
+ # stored encrypted and not returned in any response nor included in audit logs.
100
+ # Corresponds to the JSON property `password`
101
+ # @return [String]
102
+ attr_accessor :password
103
+
104
+ # Required. The user name of the custom account.
105
+ # Corresponds to the JSON property `username`
106
+ # @return [String]
107
+ attr_accessor :username
108
+
109
+ def initialize(**args)
110
+ update!(**args)
111
+ end
112
+
113
+ # Update properties of this object
114
+ def update!(**args)
115
+ @login_url = args[:login_url] if args.key?(:login_url)
116
+ @password = args[:password] if args.key?(:password)
117
+ @username = args[:username] if args.key?(:username)
118
+ end
119
+ end
120
+
121
+ # A generic empty message that you can re-use to avoid defining duplicated empty
122
+ # messages in your APIs. A typical example is to use it as the request or the
123
+ # response type of an API method. For instance: service Foo ` rpc Bar(google.
124
+ # protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
125
+ # `Empty` is empty JSON object ````.
126
+ class Empty
127
+ include Google::Apis::Core::Hashable
128
+
129
+ def initialize(**args)
130
+ update!(**args)
131
+ end
132
+
133
+ # Update properties of this object
134
+ def update!(**args)
135
+ end
136
+ end
137
+
138
+ # A Finding resource represents a vulnerability instance identified during a
139
+ # ScanRun.
140
+ class Finding
141
+ include Google::Apis::Core::Hashable
142
+
143
+ # The body of the request that triggered the vulnerability.
144
+ # Corresponds to the JSON property `body`
145
+ # @return [String]
146
+ attr_accessor :body
147
+
148
+ # The description of the vulnerability.
149
+ # Corresponds to the JSON property `description`
150
+ # @return [String]
151
+ attr_accessor :description
152
+
153
+ # The URL where the browser lands when the vulnerability is detected.
154
+ # Corresponds to the JSON property `finalUrl`
155
+ # @return [String]
156
+ attr_accessor :final_url
157
+
158
+ # The type of the Finding. Detailed and up-to-date information on findings can
159
+ # be found here: https://cloud.google.com/security-command-center/docs/how-to-
160
+ # remediate-web-security-scanner
161
+ # Corresponds to the JSON property `findingType`
162
+ # @return [String]
163
+ attr_accessor :finding_type
164
+
165
+ # ! Information about a vulnerability with an HTML.
166
+ # Corresponds to the JSON property `form`
167
+ # @return [Google::Apis::WebsecurityscannerV1beta::Form]
168
+ attr_accessor :form
169
+
170
+ # If the vulnerability was originated from nested IFrame, the immediate parent
171
+ # IFrame is reported.
172
+ # Corresponds to the JSON property `frameUrl`
173
+ # @return [String]
174
+ attr_accessor :frame_url
175
+
176
+ # The URL produced by the server-side fuzzer and used in the request that
177
+ # triggered the vulnerability.
178
+ # Corresponds to the JSON property `fuzzedUrl`
179
+ # @return [String]
180
+ attr_accessor :fuzzed_url
181
+
182
+ # The http method of the request that triggered the vulnerability, in uppercase.
183
+ # Corresponds to the JSON property `httpMethod`
184
+ # @return [String]
185
+ attr_accessor :http_method
186
+
187
+ # The resource name of the Finding. The name follows the format of 'projects/`
188
+ # projectId`/scanConfigs/`scanConfigId`/scanruns/`scanRunId`/findings/`findingId`
189
+ # '. The finding IDs are generated by the system.
190
+ # Corresponds to the JSON property `name`
191
+ # @return [String]
192
+ attr_accessor :name
193
+
194
+ # Information reported for an outdated library.
195
+ # Corresponds to the JSON property `outdatedLibrary`
196
+ # @return [Google::Apis::WebsecurityscannerV1beta::OutdatedLibrary]
197
+ attr_accessor :outdated_library
198
+
199
+ # The URL containing human-readable payload that user can leverage to reproduce
200
+ # the vulnerability.
201
+ # Corresponds to the JSON property `reproductionUrl`
202
+ # @return [String]
203
+ attr_accessor :reproduction_url
204
+
205
+ # The severity level of the reported vulnerability.
206
+ # Corresponds to the JSON property `severity`
207
+ # @return [String]
208
+ attr_accessor :severity
209
+
210
+ # The tracking ID uniquely identifies a vulnerability instance across multiple
211
+ # ScanRuns.
212
+ # Corresponds to the JSON property `trackingId`
213
+ # @return [String]
214
+ attr_accessor :tracking_id
215
+
216
+ # Information regarding any resource causing the vulnerability such as
217
+ # JavaScript sources, image, audio files, etc.
218
+ # Corresponds to the JSON property `violatingResource`
219
+ # @return [Google::Apis::WebsecurityscannerV1beta::ViolatingResource]
220
+ attr_accessor :violating_resource
221
+
222
+ # Information about vulnerable or missing HTTP Headers.
223
+ # Corresponds to the JSON property `vulnerableHeaders`
224
+ # @return [Google::Apis::WebsecurityscannerV1beta::VulnerableHeaders]
225
+ attr_accessor :vulnerable_headers
226
+
227
+ # Information about vulnerable request parameters.
228
+ # Corresponds to the JSON property `vulnerableParameters`
229
+ # @return [Google::Apis::WebsecurityscannerV1beta::VulnerableParameters]
230
+ attr_accessor :vulnerable_parameters
231
+
232
+ # Information reported for an XSS.
233
+ # Corresponds to the JSON property `xss`
234
+ # @return [Google::Apis::WebsecurityscannerV1beta::Xss]
235
+ attr_accessor :xss
236
+
237
+ def initialize(**args)
238
+ update!(**args)
239
+ end
240
+
241
+ # Update properties of this object
242
+ def update!(**args)
243
+ @body = args[:body] if args.key?(:body)
244
+ @description = args[:description] if args.key?(:description)
245
+ @final_url = args[:final_url] if args.key?(:final_url)
246
+ @finding_type = args[:finding_type] if args.key?(:finding_type)
247
+ @form = args[:form] if args.key?(:form)
248
+ @frame_url = args[:frame_url] if args.key?(:frame_url)
249
+ @fuzzed_url = args[:fuzzed_url] if args.key?(:fuzzed_url)
250
+ @http_method = args[:http_method] if args.key?(:http_method)
251
+ @name = args[:name] if args.key?(:name)
252
+ @outdated_library = args[:outdated_library] if args.key?(:outdated_library)
253
+ @reproduction_url = args[:reproduction_url] if args.key?(:reproduction_url)
254
+ @severity = args[:severity] if args.key?(:severity)
255
+ @tracking_id = args[:tracking_id] if args.key?(:tracking_id)
256
+ @violating_resource = args[:violating_resource] if args.key?(:violating_resource)
257
+ @vulnerable_headers = args[:vulnerable_headers] if args.key?(:vulnerable_headers)
258
+ @vulnerable_parameters = args[:vulnerable_parameters] if args.key?(:vulnerable_parameters)
259
+ @xss = args[:xss] if args.key?(:xss)
260
+ end
261
+ end
262
+
263
+ # A FindingTypeStats resource represents stats regarding a specific FindingType
264
+ # of Findings under a given ScanRun.
265
+ class FindingTypeStats
266
+ include Google::Apis::Core::Hashable
267
+
268
+ # The count of findings belonging to this finding type.
269
+ # Corresponds to the JSON property `findingCount`
270
+ # @return [Fixnum]
271
+ attr_accessor :finding_count
272
+
273
+ # The finding type associated with the stats.
274
+ # Corresponds to the JSON property `findingType`
275
+ # @return [String]
276
+ attr_accessor :finding_type
277
+
278
+ def initialize(**args)
279
+ update!(**args)
280
+ end
281
+
282
+ # Update properties of this object
283
+ def update!(**args)
284
+ @finding_count = args[:finding_count] if args.key?(:finding_count)
285
+ @finding_type = args[:finding_type] if args.key?(:finding_type)
286
+ end
287
+ end
288
+
289
+ # ! Information about a vulnerability with an HTML.
290
+ class Form
291
+ include Google::Apis::Core::Hashable
292
+
293
+ # ! The URI where to send the form when it's submitted.
294
+ # Corresponds to the JSON property `actionUri`
295
+ # @return [String]
296
+ attr_accessor :action_uri
297
+
298
+ # ! The names of form fields related to the vulnerability.
299
+ # Corresponds to the JSON property `fields`
300
+ # @return [Array<String>]
301
+ attr_accessor :fields
302
+
303
+ def initialize(**args)
304
+ update!(**args)
305
+ end
306
+
307
+ # Update properties of this object
308
+ def update!(**args)
309
+ @action_uri = args[:action_uri] if args.key?(:action_uri)
310
+ @fields = args[:fields] if args.key?(:fields)
311
+ end
312
+ end
313
+
314
+ # Describes authentication configuration that uses a Google account.
315
+ class GoogleAccount
316
+ include Google::Apis::Core::Hashable
317
+
318
+ # Required. Input only. The password of the Google account. The credential is
319
+ # stored encrypted and not returned in any response nor included in audit logs.
320
+ # Corresponds to the JSON property `password`
321
+ # @return [String]
322
+ attr_accessor :password
323
+
324
+ # Required. The user name of the Google account.
325
+ # Corresponds to the JSON property `username`
326
+ # @return [String]
327
+ attr_accessor :username
328
+
329
+ def initialize(**args)
330
+ update!(**args)
331
+ end
332
+
333
+ # Update properties of this object
334
+ def update!(**args)
335
+ @password = args[:password] if args.key?(:password)
336
+ @username = args[:username] if args.key?(:username)
337
+ end
338
+ end
339
+
340
+ # Describes a HTTP Header.
341
+ class Header
342
+ include Google::Apis::Core::Hashable
343
+
344
+ # Header name.
345
+ # Corresponds to the JSON property `name`
346
+ # @return [String]
347
+ attr_accessor :name
348
+
349
+ # Header value.
350
+ # Corresponds to the JSON property `value`
351
+ # @return [String]
352
+ attr_accessor :value
353
+
354
+ def initialize(**args)
355
+ update!(**args)
356
+ end
357
+
358
+ # Update properties of this object
359
+ def update!(**args)
360
+ @name = args[:name] if args.key?(:name)
361
+ @value = args[:value] if args.key?(:value)
362
+ end
363
+ end
364
+
365
+ # Describes authentication configuration for Identity-Aware-Proxy (IAP).
366
+ class IapCredential
367
+ include Google::Apis::Core::Hashable
368
+
369
+ # Describes authentication configuration when Web-Security-Scanner service
370
+ # account is added in Identity-Aware-Proxy (IAP) access policies.
371
+ # Corresponds to the JSON property `iapTestServiceAccountInfo`
372
+ # @return [Google::Apis::WebsecurityscannerV1beta::IapTestServiceAccountInfo]
373
+ attr_accessor :iap_test_service_account_info
374
+
375
+ def initialize(**args)
376
+ update!(**args)
377
+ end
378
+
379
+ # Update properties of this object
380
+ def update!(**args)
381
+ @iap_test_service_account_info = args[:iap_test_service_account_info] if args.key?(:iap_test_service_account_info)
382
+ end
383
+ end
384
+
385
+ # Describes authentication configuration when Web-Security-Scanner service
386
+ # account is added in Identity-Aware-Proxy (IAP) access policies.
387
+ class IapTestServiceAccountInfo
388
+ include Google::Apis::Core::Hashable
389
+
390
+ # Required. Describes OAuth2 Client ID of resources protected by Identity-Aware-
391
+ # Proxy(IAP).
392
+ # Corresponds to the JSON property `targetAudienceClientId`
393
+ # @return [String]
394
+ attr_accessor :target_audience_client_id
395
+
396
+ def initialize(**args)
397
+ update!(**args)
398
+ end
399
+
400
+ # Update properties of this object
401
+ def update!(**args)
402
+ @target_audience_client_id = args[:target_audience_client_id] if args.key?(:target_audience_client_id)
403
+ end
404
+ end
405
+
406
+ # Response for the `ListCrawledUrls` method.
407
+ class ListCrawledUrlsResponse
408
+ include Google::Apis::Core::Hashable
409
+
410
+ # The list of CrawledUrls returned.
411
+ # Corresponds to the JSON property `crawledUrls`
412
+ # @return [Array<Google::Apis::WebsecurityscannerV1beta::CrawledUrl>]
413
+ attr_accessor :crawled_urls
414
+
415
+ # Token to retrieve the next page of results, or empty if there are no more
416
+ # results in the list.
417
+ # Corresponds to the JSON property `nextPageToken`
418
+ # @return [String]
419
+ attr_accessor :next_page_token
420
+
421
+ def initialize(**args)
422
+ update!(**args)
423
+ end
424
+
425
+ # Update properties of this object
426
+ def update!(**args)
427
+ @crawled_urls = args[:crawled_urls] if args.key?(:crawled_urls)
428
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
429
+ end
430
+ end
431
+
432
+ # Response for the `ListFindingTypeStats` method.
433
+ class ListFindingTypeStatsResponse
434
+ include Google::Apis::Core::Hashable
435
+
436
+ # The list of FindingTypeStats returned.
437
+ # Corresponds to the JSON property `findingTypeStats`
438
+ # @return [Array<Google::Apis::WebsecurityscannerV1beta::FindingTypeStats>]
439
+ attr_accessor :finding_type_stats
440
+
441
+ def initialize(**args)
442
+ update!(**args)
443
+ end
444
+
445
+ # Update properties of this object
446
+ def update!(**args)
447
+ @finding_type_stats = args[:finding_type_stats] if args.key?(:finding_type_stats)
448
+ end
449
+ end
450
+
451
+ # Response for the `ListFindings` method.
452
+ class ListFindingsResponse
453
+ include Google::Apis::Core::Hashable
454
+
455
+ # The list of Findings returned.
456
+ # Corresponds to the JSON property `findings`
457
+ # @return [Array<Google::Apis::WebsecurityscannerV1beta::Finding>]
458
+ attr_accessor :findings
459
+
460
+ # Token to retrieve the next page of results, or empty if there are no more
461
+ # results in the list.
462
+ # Corresponds to the JSON property `nextPageToken`
463
+ # @return [String]
464
+ attr_accessor :next_page_token
465
+
466
+ def initialize(**args)
467
+ update!(**args)
468
+ end
469
+
470
+ # Update properties of this object
471
+ def update!(**args)
472
+ @findings = args[:findings] if args.key?(:findings)
473
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
474
+ end
475
+ end
476
+
477
+ # Response for the `ListScanConfigs` method.
478
+ class ListScanConfigsResponse
479
+ include Google::Apis::Core::Hashable
480
+
481
+ # Token to retrieve the next page of results, or empty if there are no more
482
+ # results in the list.
483
+ # Corresponds to the JSON property `nextPageToken`
484
+ # @return [String]
485
+ attr_accessor :next_page_token
486
+
487
+ # The list of ScanConfigs returned.
488
+ # Corresponds to the JSON property `scanConfigs`
489
+ # @return [Array<Google::Apis::WebsecurityscannerV1beta::ScanConfig>]
490
+ attr_accessor :scan_configs
491
+
492
+ def initialize(**args)
493
+ update!(**args)
494
+ end
495
+
496
+ # Update properties of this object
497
+ def update!(**args)
498
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
499
+ @scan_configs = args[:scan_configs] if args.key?(:scan_configs)
500
+ end
501
+ end
502
+
503
+ # Response for the `ListScanRuns` method.
504
+ class ListScanRunsResponse
505
+ include Google::Apis::Core::Hashable
506
+
507
+ # Token to retrieve the next page of results, or empty if there are no more
508
+ # results in the list.
509
+ # Corresponds to the JSON property `nextPageToken`
510
+ # @return [String]
511
+ attr_accessor :next_page_token
512
+
513
+ # The list of ScanRuns returned.
514
+ # Corresponds to the JSON property `scanRuns`
515
+ # @return [Array<Google::Apis::WebsecurityscannerV1beta::ScanRun>]
516
+ attr_accessor :scan_runs
517
+
518
+ def initialize(**args)
519
+ update!(**args)
520
+ end
521
+
522
+ # Update properties of this object
523
+ def update!(**args)
524
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
525
+ @scan_runs = args[:scan_runs] if args.key?(:scan_runs)
526
+ end
527
+ end
528
+
529
+ # Information reported for an outdated library.
530
+ class OutdatedLibrary
531
+ include Google::Apis::Core::Hashable
532
+
533
+ # URLs to learn more information about the vulnerabilities in the library.
534
+ # Corresponds to the JSON property `learnMoreUrls`
535
+ # @return [Array<String>]
536
+ attr_accessor :learn_more_urls
537
+
538
+ # The name of the outdated library.
539
+ # Corresponds to the JSON property `libraryName`
540
+ # @return [String]
541
+ attr_accessor :library_name
542
+
543
+ # The version number.
544
+ # Corresponds to the JSON property `version`
545
+ # @return [String]
546
+ attr_accessor :version
547
+
548
+ def initialize(**args)
549
+ update!(**args)
550
+ end
551
+
552
+ # Update properties of this object
553
+ def update!(**args)
554
+ @learn_more_urls = args[:learn_more_urls] if args.key?(:learn_more_urls)
555
+ @library_name = args[:library_name] if args.key?(:library_name)
556
+ @version = args[:version] if args.key?(:version)
557
+ end
558
+ end
559
+
560
+ # A ScanConfig resource contains the configurations to launch a scan.
561
+ class ScanConfig
562
+ include Google::Apis::Core::Hashable
563
+
564
+ # Scan authentication configuration.
565
+ # Corresponds to the JSON property `authentication`
566
+ # @return [Google::Apis::WebsecurityscannerV1beta::Authentication]
567
+ attr_accessor :authentication
568
+
569
+ # The excluded URL patterns as described in https://cloud.google.com/security-
570
+ # command-center/docs/how-to-use-web-security-scanner#excluding_urls
571
+ # Corresponds to the JSON property `blacklistPatterns`
572
+ # @return [Array<String>]
573
+ attr_accessor :blacklist_patterns
574
+
575
+ # Required. The user provided display name of the ScanConfig.
576
+ # Corresponds to the JSON property `displayName`
577
+ # @return [String]
578
+ attr_accessor :display_name
579
+
580
+ # Controls export of scan configurations and results to Security Command Center.
581
+ # Corresponds to the JSON property `exportToSecurityCommandCenter`
582
+ # @return [String]
583
+ attr_accessor :export_to_security_command_center
584
+
585
+ # A ScanRun is a output-only resource representing an actual run of the scan.
586
+ # Next id: 12
587
+ # Corresponds to the JSON property `latestRun`
588
+ # @return [Google::Apis::WebsecurityscannerV1beta::ScanRun]
589
+ attr_accessor :latest_run
590
+
591
+ # Whether the scan config is managed by Web Security Scanner, output only.
592
+ # Corresponds to the JSON property `managedScan`
593
+ # @return [Boolean]
594
+ attr_accessor :managed_scan
595
+ alias_method :managed_scan?, :managed_scan
596
+
597
+ # The maximum QPS during scanning. A valid value ranges from 5 to 20 inclusively.
598
+ # If the field is unspecified or its value is set 0, server will default to 15.
599
+ # Other values outside of [5, 20] range will be rejected with INVALID_ARGUMENT
600
+ # error.
601
+ # Corresponds to the JSON property `maxQps`
602
+ # @return [Fixnum]
603
+ attr_accessor :max_qps
604
+
605
+ # The resource name of the ScanConfig. The name follows the format of 'projects/`
606
+ # projectId`/scanConfigs/`scanConfigId`'. The ScanConfig IDs are generated by
607
+ # the system.
608
+ # Corresponds to the JSON property `name`
609
+ # @return [String]
610
+ attr_accessor :name
611
+
612
+ # The risk level selected for the scan
613
+ # Corresponds to the JSON property `riskLevel`
614
+ # @return [String]
615
+ attr_accessor :risk_level
616
+
617
+ # Scan schedule configuration.
618
+ # Corresponds to the JSON property `schedule`
619
+ # @return [Google::Apis::WebsecurityscannerV1beta::Schedule]
620
+ attr_accessor :schedule
621
+
622
+ # Required. The starting URLs from which the scanner finds site pages.
623
+ # Corresponds to the JSON property `startingUrls`
624
+ # @return [Array<String>]
625
+ attr_accessor :starting_urls
626
+
627
+ # Whether the scan configuration has enabled static IP address scan feature. If
628
+ # enabled, the scanner will access applications from static IP addresses.
629
+ # Corresponds to the JSON property `staticIpScan`
630
+ # @return [Boolean]
631
+ attr_accessor :static_ip_scan
632
+ alias_method :static_ip_scan?, :static_ip_scan
633
+
634
+ # Set of Google Cloud platforms targeted by the scan. If empty, APP_ENGINE will
635
+ # be used as a default.
636
+ # Corresponds to the JSON property `targetPlatforms`
637
+ # @return [Array<String>]
638
+ attr_accessor :target_platforms
639
+
640
+ # The user agent used during scanning.
641
+ # Corresponds to the JSON property `userAgent`
642
+ # @return [String]
643
+ attr_accessor :user_agent
644
+
645
+ def initialize(**args)
646
+ update!(**args)
647
+ end
648
+
649
+ # Update properties of this object
650
+ def update!(**args)
651
+ @authentication = args[:authentication] if args.key?(:authentication)
652
+ @blacklist_patterns = args[:blacklist_patterns] if args.key?(:blacklist_patterns)
653
+ @display_name = args[:display_name] if args.key?(:display_name)
654
+ @export_to_security_command_center = args[:export_to_security_command_center] if args.key?(:export_to_security_command_center)
655
+ @latest_run = args[:latest_run] if args.key?(:latest_run)
656
+ @managed_scan = args[:managed_scan] if args.key?(:managed_scan)
657
+ @max_qps = args[:max_qps] if args.key?(:max_qps)
658
+ @name = args[:name] if args.key?(:name)
659
+ @risk_level = args[:risk_level] if args.key?(:risk_level)
660
+ @schedule = args[:schedule] if args.key?(:schedule)
661
+ @starting_urls = args[:starting_urls] if args.key?(:starting_urls)
662
+ @static_ip_scan = args[:static_ip_scan] if args.key?(:static_ip_scan)
663
+ @target_platforms = args[:target_platforms] if args.key?(:target_platforms)
664
+ @user_agent = args[:user_agent] if args.key?(:user_agent)
665
+ end
666
+ end
667
+
668
+ # Defines a custom error message used by CreateScanConfig and UpdateScanConfig
669
+ # APIs when scan configuration validation fails. It is also reported as part of
670
+ # a ScanRunErrorTrace message if scan validation fails due to a scan
671
+ # configuration error.
672
+ class ScanConfigError
673
+ include Google::Apis::Core::Hashable
674
+
675
+ # Indicates the reason code for a configuration failure.
676
+ # Corresponds to the JSON property `code`
677
+ # @return [String]
678
+ attr_accessor :code
679
+
680
+ # Indicates the full name of the ScanConfig field that triggers this error, for
681
+ # example "scan_config.max_qps". This field is provided for troubleshooting
682
+ # purposes only and its actual value can change in the future.
683
+ # Corresponds to the JSON property `fieldName`
684
+ # @return [String]
685
+ attr_accessor :field_name
686
+
687
+ def initialize(**args)
688
+ update!(**args)
689
+ end
690
+
691
+ # Update properties of this object
692
+ def update!(**args)
693
+ @code = args[:code] if args.key?(:code)
694
+ @field_name = args[:field_name] if args.key?(:field_name)
695
+ end
696
+ end
697
+
698
+ # A ScanRun is a output-only resource representing an actual run of the scan.
699
+ # Next id: 12
700
+ class ScanRun
701
+ include Google::Apis::Core::Hashable
702
+
703
+ # The time at which the ScanRun reached termination state - that the ScanRun is
704
+ # either finished or stopped by user.
705
+ # Corresponds to the JSON property `endTime`
706
+ # @return [String]
707
+ attr_accessor :end_time
708
+
709
+ # Output only. Defines an error trace message for a ScanRun.
710
+ # Corresponds to the JSON property `errorTrace`
711
+ # @return [Google::Apis::WebsecurityscannerV1beta::ScanRunErrorTrace]
712
+ attr_accessor :error_trace
713
+
714
+ # The execution state of the ScanRun.
715
+ # Corresponds to the JSON property `executionState`
716
+ # @return [String]
717
+ attr_accessor :execution_state
718
+
719
+ # Whether the scan run has found any vulnerabilities.
720
+ # Corresponds to the JSON property `hasVulnerabilities`
721
+ # @return [Boolean]
722
+ attr_accessor :has_vulnerabilities
723
+ alias_method :has_vulnerabilities?, :has_vulnerabilities
724
+
725
+ # The resource name of the ScanRun. The name follows the format of 'projects/`
726
+ # projectId`/scanConfigs/`scanConfigId`/scanRuns/`scanRunId`'. The ScanRun IDs
727
+ # are generated by the system.
728
+ # Corresponds to the JSON property `name`
729
+ # @return [String]
730
+ attr_accessor :name
731
+
732
+ # The percentage of total completion ranging from 0 to 100. If the scan is in
733
+ # queue, the value is 0. If the scan is running, the value ranges from 0 to 100.
734
+ # If the scan is finished, the value is 100.
735
+ # Corresponds to the JSON property `progressPercent`
736
+ # @return [Fixnum]
737
+ attr_accessor :progress_percent
738
+
739
+ # The result state of the ScanRun. This field is only available after the
740
+ # execution state reaches "FINISHED".
741
+ # Corresponds to the JSON property `resultState`
742
+ # @return [String]
743
+ attr_accessor :result_state
744
+
745
+ # The time at which the ScanRun started.
746
+ # Corresponds to the JSON property `startTime`
747
+ # @return [String]
748
+ attr_accessor :start_time
749
+
750
+ # The number of URLs crawled during this ScanRun. If the scan is in progress,
751
+ # the value represents the number of URLs crawled up to now.
752
+ # Corresponds to the JSON property `urlsCrawledCount`
753
+ # @return [Fixnum]
754
+ attr_accessor :urls_crawled_count
755
+
756
+ # The number of URLs tested during this ScanRun. If the scan is in progress, the
757
+ # value represents the number of URLs tested up to now. The number of URLs
758
+ # tested is usually larger than the number URLS crawled because typically a
759
+ # crawled URL is tested with multiple test payloads.
760
+ # Corresponds to the JSON property `urlsTestedCount`
761
+ # @return [Fixnum]
762
+ attr_accessor :urls_tested_count
763
+
764
+ # A list of warnings, if such are encountered during this scan run.
765
+ # Corresponds to the JSON property `warningTraces`
766
+ # @return [Array<Google::Apis::WebsecurityscannerV1beta::ScanRunWarningTrace>]
767
+ attr_accessor :warning_traces
768
+
769
+ def initialize(**args)
770
+ update!(**args)
771
+ end
772
+
773
+ # Update properties of this object
774
+ def update!(**args)
775
+ @end_time = args[:end_time] if args.key?(:end_time)
776
+ @error_trace = args[:error_trace] if args.key?(:error_trace)
777
+ @execution_state = args[:execution_state] if args.key?(:execution_state)
778
+ @has_vulnerabilities = args[:has_vulnerabilities] if args.key?(:has_vulnerabilities)
779
+ @name = args[:name] if args.key?(:name)
780
+ @progress_percent = args[:progress_percent] if args.key?(:progress_percent)
781
+ @result_state = args[:result_state] if args.key?(:result_state)
782
+ @start_time = args[:start_time] if args.key?(:start_time)
783
+ @urls_crawled_count = args[:urls_crawled_count] if args.key?(:urls_crawled_count)
784
+ @urls_tested_count = args[:urls_tested_count] if args.key?(:urls_tested_count)
785
+ @warning_traces = args[:warning_traces] if args.key?(:warning_traces)
786
+ end
787
+ end
788
+
789
+ # Output only. Defines an error trace message for a ScanRun.
790
+ class ScanRunErrorTrace
791
+ include Google::Apis::Core::Hashable
792
+
793
+ # Indicates the error reason code.
794
+ # Corresponds to the JSON property `code`
795
+ # @return [String]
796
+ attr_accessor :code
797
+
798
+ # If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most
799
+ # common HTTP error code, if such is available. For example, if this code is 404,
800
+ # the scan has encountered too many NOT_FOUND responses.
801
+ # Corresponds to the JSON property `mostCommonHttpErrorCode`
802
+ # @return [Fixnum]
803
+ attr_accessor :most_common_http_error_code
804
+
805
+ # Defines a custom error message used by CreateScanConfig and UpdateScanConfig
806
+ # APIs when scan configuration validation fails. It is also reported as part of
807
+ # a ScanRunErrorTrace message if scan validation fails due to a scan
808
+ # configuration error.
809
+ # Corresponds to the JSON property `scanConfigError`
810
+ # @return [Google::Apis::WebsecurityscannerV1beta::ScanConfigError]
811
+ attr_accessor :scan_config_error
812
+
813
+ def initialize(**args)
814
+ update!(**args)
815
+ end
816
+
817
+ # Update properties of this object
818
+ def update!(**args)
819
+ @code = args[:code] if args.key?(:code)
820
+ @most_common_http_error_code = args[:most_common_http_error_code] if args.key?(:most_common_http_error_code)
821
+ @scan_config_error = args[:scan_config_error] if args.key?(:scan_config_error)
822
+ end
823
+ end
824
+
825
+ # Output only. Defines a warning trace message for ScanRun. Warning traces
826
+ # provide customers with useful information that helps make the scanning process
827
+ # more effective.
828
+ class ScanRunWarningTrace
829
+ include Google::Apis::Core::Hashable
830
+
831
+ # Indicates the warning code.
832
+ # Corresponds to the JSON property `code`
833
+ # @return [String]
834
+ attr_accessor :code
835
+
836
+ def initialize(**args)
837
+ update!(**args)
838
+ end
839
+
840
+ # Update properties of this object
841
+ def update!(**args)
842
+ @code = args[:code] if args.key?(:code)
843
+ end
844
+ end
845
+
846
+ # Scan schedule configuration.
847
+ class Schedule
848
+ include Google::Apis::Core::Hashable
849
+
850
+ # Required. The duration of time between executions in days.
851
+ # Corresponds to the JSON property `intervalDurationDays`
852
+ # @return [Fixnum]
853
+ attr_accessor :interval_duration_days
854
+
855
+ # A timestamp indicates when the next run will be scheduled. The value is
856
+ # refreshed by the server after each run. If unspecified, it will default to
857
+ # current server time, which means the scan will be scheduled to start
858
+ # immediately.
859
+ # Corresponds to the JSON property `scheduleTime`
860
+ # @return [String]
861
+ attr_accessor :schedule_time
862
+
863
+ def initialize(**args)
864
+ update!(**args)
865
+ end
866
+
867
+ # Update properties of this object
868
+ def update!(**args)
869
+ @interval_duration_days = args[:interval_duration_days] if args.key?(:interval_duration_days)
870
+ @schedule_time = args[:schedule_time] if args.key?(:schedule_time)
871
+ end
872
+ end
873
+
874
+ # Request for the `StartScanRun` method.
875
+ class StartScanRunRequest
876
+ include Google::Apis::Core::Hashable
877
+
878
+ def initialize(**args)
879
+ update!(**args)
880
+ end
881
+
882
+ # Update properties of this object
883
+ def update!(**args)
884
+ end
885
+ end
886
+
887
+ # Request for the `StopScanRun` method.
888
+ class StopScanRunRequest
889
+ include Google::Apis::Core::Hashable
890
+
891
+ def initialize(**args)
892
+ update!(**args)
893
+ end
894
+
895
+ # Update properties of this object
896
+ def update!(**args)
897
+ end
898
+ end
899
+
900
+ # Information regarding any resource causing the vulnerability such as
901
+ # JavaScript sources, image, audio files, etc.
902
+ class ViolatingResource
903
+ include Google::Apis::Core::Hashable
904
+
905
+ # The MIME type of this resource.
906
+ # Corresponds to the JSON property `contentType`
907
+ # @return [String]
908
+ attr_accessor :content_type
909
+
910
+ # URL of this violating resource.
911
+ # Corresponds to the JSON property `resourceUrl`
912
+ # @return [String]
913
+ attr_accessor :resource_url
914
+
915
+ def initialize(**args)
916
+ update!(**args)
917
+ end
918
+
919
+ # Update properties of this object
920
+ def update!(**args)
921
+ @content_type = args[:content_type] if args.key?(:content_type)
922
+ @resource_url = args[:resource_url] if args.key?(:resource_url)
923
+ end
924
+ end
925
+
926
+ # Information about vulnerable or missing HTTP Headers.
927
+ class VulnerableHeaders
928
+ include Google::Apis::Core::Hashable
929
+
930
+ # List of vulnerable headers.
931
+ # Corresponds to the JSON property `headers`
932
+ # @return [Array<Google::Apis::WebsecurityscannerV1beta::Header>]
933
+ attr_accessor :headers
934
+
935
+ # List of missing headers.
936
+ # Corresponds to the JSON property `missingHeaders`
937
+ # @return [Array<Google::Apis::WebsecurityscannerV1beta::Header>]
938
+ attr_accessor :missing_headers
939
+
940
+ def initialize(**args)
941
+ update!(**args)
942
+ end
943
+
944
+ # Update properties of this object
945
+ def update!(**args)
946
+ @headers = args[:headers] if args.key?(:headers)
947
+ @missing_headers = args[:missing_headers] if args.key?(:missing_headers)
948
+ end
949
+ end
950
+
951
+ # Information about vulnerable request parameters.
952
+ class VulnerableParameters
953
+ include Google::Apis::Core::Hashable
954
+
955
+ # The vulnerable parameter names.
956
+ # Corresponds to the JSON property `parameterNames`
957
+ # @return [Array<String>]
958
+ attr_accessor :parameter_names
959
+
960
+ def initialize(**args)
961
+ update!(**args)
962
+ end
963
+
964
+ # Update properties of this object
965
+ def update!(**args)
966
+ @parameter_names = args[:parameter_names] if args.key?(:parameter_names)
967
+ end
968
+ end
969
+
970
+ # Information reported for an XSS.
971
+ class Xss
972
+ include Google::Apis::Core::Hashable
973
+
974
+ # An error message generated by a javascript breakage.
975
+ # Corresponds to the JSON property `errorMessage`
976
+ # @return [String]
977
+ attr_accessor :error_message
978
+
979
+ # Stack traces leading to the point where the XSS occurred.
980
+ # Corresponds to the JSON property `stackTraces`
981
+ # @return [Array<String>]
982
+ attr_accessor :stack_traces
983
+
984
+ def initialize(**args)
985
+ update!(**args)
986
+ end
987
+
988
+ # Update properties of this object
989
+ def update!(**args)
990
+ @error_message = args[:error_message] if args.key?(:error_message)
991
+ @stack_traces = args[:stack_traces] if args.key?(:stack_traces)
992
+ end
993
+ end
994
+ end
995
+ end
996
+ end