google-apis-websecurityscanner_v1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google-apis-websecurityscanner_v1.rb +15 -0
- data/lib/google/apis/websecurityscanner_v1.rb +36 -0
- data/lib/google/apis/websecurityscanner_v1/classes.rb +997 -0
- data/lib/google/apis/websecurityscanner_v1/gem_version.rb +28 -0
- data/lib/google/apis/websecurityscanner_v1/representations.rb +484 -0
- data/lib/google/apis/websecurityscanner_v1/service.rb +529 -0
- metadata +76 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 461ff2268348ea2d962e7a21c3b24a9a0cf565b99cd379232b2e570bf2812998
|
4
|
+
data.tar.gz: c5021e9fef25df9c6e493d3b41f6332a2bc1bffc1d1790814344d75e01637f49
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 708028ed52c3903088205f9a6407cfb9df8ab022c1d69ba3f9045e9e13453a6af01edd9c6d361eb23d9d102a4b66793cbb00839fc44bccfa960967603f5f02b1
|
7
|
+
data.tar.gz: e4d34a4344cadf8b5d0e1134a265affaf838492359ca1d6fea27722f58a8661aa2661b346898bd48474f67410a53ce1ac850f7514661d34635ecdaca60a68965
|
data/.yardopts
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
--hide-void-return
|
2
|
+
--no-private
|
3
|
+
--verbose
|
4
|
+
--title=google-apis-websecurityscanner_v1
|
5
|
+
--markup-provider=redcarpet
|
6
|
+
--markup=markdown
|
7
|
+
--main OVERVIEW.md
|
8
|
+
lib/google/apis/websecurityscanner_v1/*.rb
|
9
|
+
lib/google/apis/websecurityscanner_v1.rb
|
10
|
+
-
|
11
|
+
OVERVIEW.md
|
12
|
+
CHANGELOG.md
|
13
|
+
LICENSE.md
|
data/CHANGELOG.md
ADDED
data/LICENSE.md
ADDED
@@ -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.
|
data/OVERVIEW.md
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
# Simple REST client for version V1 of the Web Security Scanner API
|
2
|
+
|
3
|
+
This is a simple client library for version V1 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_v1', '~> 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_v1
|
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_v1"
|
49
|
+
|
50
|
+
# Create a client object
|
51
|
+
client = Google::Apis::WebsecurityscannerV1::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::WebsecurityscannerV1::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_v1`, 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_v1"
|
@@ -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_v1/service.rb'
|
16
|
+
require 'google/apis/websecurityscanner_v1/classes.rb'
|
17
|
+
require 'google/apis/websecurityscanner_v1/representations.rb'
|
18
|
+
require 'google/apis/websecurityscanner_v1/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 WebsecurityscannerV1
|
28
|
+
# Version of the Web Security Scanner API this client connects to.
|
29
|
+
# This is NOT the gem version.
|
30
|
+
VERSION = 'V1'
|
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,997 @@
|
|
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
|
+
# 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::WebsecurityscannerV1::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::WebsecurityscannerV1::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::WebsecurityscannerV1::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
|
+
# Output only. 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
|
+
# Output only. The http method of the request that was used to visit the URL, in
|
68
|
+
# uppercase.
|
69
|
+
# Corresponds to the JSON property `httpMethod`
|
70
|
+
# @return [String]
|
71
|
+
attr_accessor :http_method
|
72
|
+
|
73
|
+
# Output only. The URL that was crawled.
|
74
|
+
# Corresponds to the JSON property `url`
|
75
|
+
# @return [String]
|
76
|
+
attr_accessor :url
|
77
|
+
|
78
|
+
def initialize(**args)
|
79
|
+
update!(**args)
|
80
|
+
end
|
81
|
+
|
82
|
+
# Update properties of this object
|
83
|
+
def update!(**args)
|
84
|
+
@body = args[:body] if args.key?(:body)
|
85
|
+
@http_method = args[:http_method] if args.key?(:http_method)
|
86
|
+
@url = args[:url] if args.key?(:url)
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
# Describes authentication configuration that uses a custom account.
|
91
|
+
class CustomAccount
|
92
|
+
include Google::Apis::Core::Hashable
|
93
|
+
|
94
|
+
# Required. The login form URL of the website.
|
95
|
+
# Corresponds to the JSON property `loginUrl`
|
96
|
+
# @return [String]
|
97
|
+
attr_accessor :login_url
|
98
|
+
|
99
|
+
# Required. Input only. The password of the custom account. The credential is
|
100
|
+
# stored encrypted and not returned in any response nor included in audit logs.
|
101
|
+
# Corresponds to the JSON property `password`
|
102
|
+
# @return [String]
|
103
|
+
attr_accessor :password
|
104
|
+
|
105
|
+
# Required. The user name of the custom account.
|
106
|
+
# Corresponds to the JSON property `username`
|
107
|
+
# @return [String]
|
108
|
+
attr_accessor :username
|
109
|
+
|
110
|
+
def initialize(**args)
|
111
|
+
update!(**args)
|
112
|
+
end
|
113
|
+
|
114
|
+
# Update properties of this object
|
115
|
+
def update!(**args)
|
116
|
+
@login_url = args[:login_url] if args.key?(:login_url)
|
117
|
+
@password = args[:password] if args.key?(:password)
|
118
|
+
@username = args[:username] if args.key?(:username)
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
# A generic empty message that you can re-use to avoid defining duplicated empty
|
123
|
+
# messages in your APIs. A typical example is to use it as the request or the
|
124
|
+
# response type of an API method. For instance: service Foo ` rpc Bar(google.
|
125
|
+
# protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
|
126
|
+
# `Empty` is empty JSON object ````.
|
127
|
+
class Empty
|
128
|
+
include Google::Apis::Core::Hashable
|
129
|
+
|
130
|
+
def initialize(**args)
|
131
|
+
update!(**args)
|
132
|
+
end
|
133
|
+
|
134
|
+
# Update properties of this object
|
135
|
+
def update!(**args)
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
# A Finding resource represents a vulnerability instance identified during a
|
140
|
+
# ScanRun.
|
141
|
+
class Finding
|
142
|
+
include Google::Apis::Core::Hashable
|
143
|
+
|
144
|
+
# Output only. The body of the request that triggered the vulnerability.
|
145
|
+
# Corresponds to the JSON property `body`
|
146
|
+
# @return [String]
|
147
|
+
attr_accessor :body
|
148
|
+
|
149
|
+
# Output only. The description of the vulnerability.
|
150
|
+
# Corresponds to the JSON property `description`
|
151
|
+
# @return [String]
|
152
|
+
attr_accessor :description
|
153
|
+
|
154
|
+
# Output only. The URL where the browser lands when the vulnerability is
|
155
|
+
# detected.
|
156
|
+
# Corresponds to the JSON property `finalUrl`
|
157
|
+
# @return [String]
|
158
|
+
attr_accessor :final_url
|
159
|
+
|
160
|
+
# Output only. The type of the Finding. Detailed and up-to-date information on
|
161
|
+
# findings can be found here: https://cloud.google.com/security-command-center/
|
162
|
+
# docs/how-to-remediate-web-security-scanner-findings
|
163
|
+
# Corresponds to the JSON property `findingType`
|
164
|
+
# @return [String]
|
165
|
+
attr_accessor :finding_type
|
166
|
+
|
167
|
+
# ! Information about a vulnerability with an HTML.
|
168
|
+
# Corresponds to the JSON property `form`
|
169
|
+
# @return [Google::Apis::WebsecurityscannerV1::Form]
|
170
|
+
attr_accessor :form
|
171
|
+
|
172
|
+
# Output only. If the vulnerability was originated from nested IFrame, the
|
173
|
+
# immediate parent IFrame is reported.
|
174
|
+
# Corresponds to the JSON property `frameUrl`
|
175
|
+
# @return [String]
|
176
|
+
attr_accessor :frame_url
|
177
|
+
|
178
|
+
# Output only. The URL produced by the server-side fuzzer and used in the
|
179
|
+
# request that triggered the vulnerability.
|
180
|
+
# Corresponds to the JSON property `fuzzedUrl`
|
181
|
+
# @return [String]
|
182
|
+
attr_accessor :fuzzed_url
|
183
|
+
|
184
|
+
# Output only. The http method of the request that triggered the vulnerability,
|
185
|
+
# in uppercase.
|
186
|
+
# Corresponds to the JSON property `httpMethod`
|
187
|
+
# @return [String]
|
188
|
+
attr_accessor :http_method
|
189
|
+
|
190
|
+
# Output only. The resource name of the Finding. The name follows the format of '
|
191
|
+
# projects/`projectId`/scanConfigs/`scanConfigId`/scanruns/`scanRunId`/findings/`
|
192
|
+
# findingId`'. The finding IDs are generated by the system.
|
193
|
+
# Corresponds to the JSON property `name`
|
194
|
+
# @return [String]
|
195
|
+
attr_accessor :name
|
196
|
+
|
197
|
+
# Information reported for an outdated library.
|
198
|
+
# Corresponds to the JSON property `outdatedLibrary`
|
199
|
+
# @return [Google::Apis::WebsecurityscannerV1::OutdatedLibrary]
|
200
|
+
attr_accessor :outdated_library
|
201
|
+
|
202
|
+
# Output only. The URL containing human-readable payload that user can leverage
|
203
|
+
# to reproduce the vulnerability.
|
204
|
+
# Corresponds to the JSON property `reproductionUrl`
|
205
|
+
# @return [String]
|
206
|
+
attr_accessor :reproduction_url
|
207
|
+
|
208
|
+
# Output only. The severity level of the reported vulnerability.
|
209
|
+
# Corresponds to the JSON property `severity`
|
210
|
+
# @return [String]
|
211
|
+
attr_accessor :severity
|
212
|
+
|
213
|
+
# Output only. The tracking ID uniquely identifies a vulnerability instance
|
214
|
+
# across multiple ScanRuns.
|
215
|
+
# Corresponds to the JSON property `trackingId`
|
216
|
+
# @return [String]
|
217
|
+
attr_accessor :tracking_id
|
218
|
+
|
219
|
+
# Information regarding any resource causing the vulnerability such as
|
220
|
+
# JavaScript sources, image, audio files, etc.
|
221
|
+
# Corresponds to the JSON property `violatingResource`
|
222
|
+
# @return [Google::Apis::WebsecurityscannerV1::ViolatingResource]
|
223
|
+
attr_accessor :violating_resource
|
224
|
+
|
225
|
+
# Information about vulnerable or missing HTTP Headers.
|
226
|
+
# Corresponds to the JSON property `vulnerableHeaders`
|
227
|
+
# @return [Google::Apis::WebsecurityscannerV1::VulnerableHeaders]
|
228
|
+
attr_accessor :vulnerable_headers
|
229
|
+
|
230
|
+
# Information about vulnerable request parameters.
|
231
|
+
# Corresponds to the JSON property `vulnerableParameters`
|
232
|
+
# @return [Google::Apis::WebsecurityscannerV1::VulnerableParameters]
|
233
|
+
attr_accessor :vulnerable_parameters
|
234
|
+
|
235
|
+
# Information reported for an XSS.
|
236
|
+
# Corresponds to the JSON property `xss`
|
237
|
+
# @return [Google::Apis::WebsecurityscannerV1::Xss]
|
238
|
+
attr_accessor :xss
|
239
|
+
|
240
|
+
def initialize(**args)
|
241
|
+
update!(**args)
|
242
|
+
end
|
243
|
+
|
244
|
+
# Update properties of this object
|
245
|
+
def update!(**args)
|
246
|
+
@body = args[:body] if args.key?(:body)
|
247
|
+
@description = args[:description] if args.key?(:description)
|
248
|
+
@final_url = args[:final_url] if args.key?(:final_url)
|
249
|
+
@finding_type = args[:finding_type] if args.key?(:finding_type)
|
250
|
+
@form = args[:form] if args.key?(:form)
|
251
|
+
@frame_url = args[:frame_url] if args.key?(:frame_url)
|
252
|
+
@fuzzed_url = args[:fuzzed_url] if args.key?(:fuzzed_url)
|
253
|
+
@http_method = args[:http_method] if args.key?(:http_method)
|
254
|
+
@name = args[:name] if args.key?(:name)
|
255
|
+
@outdated_library = args[:outdated_library] if args.key?(:outdated_library)
|
256
|
+
@reproduction_url = args[:reproduction_url] if args.key?(:reproduction_url)
|
257
|
+
@severity = args[:severity] if args.key?(:severity)
|
258
|
+
@tracking_id = args[:tracking_id] if args.key?(:tracking_id)
|
259
|
+
@violating_resource = args[:violating_resource] if args.key?(:violating_resource)
|
260
|
+
@vulnerable_headers = args[:vulnerable_headers] if args.key?(:vulnerable_headers)
|
261
|
+
@vulnerable_parameters = args[:vulnerable_parameters] if args.key?(:vulnerable_parameters)
|
262
|
+
@xss = args[:xss] if args.key?(:xss)
|
263
|
+
end
|
264
|
+
end
|
265
|
+
|
266
|
+
# A FindingTypeStats resource represents stats regarding a specific FindingType
|
267
|
+
# of Findings under a given ScanRun.
|
268
|
+
class FindingTypeStats
|
269
|
+
include Google::Apis::Core::Hashable
|
270
|
+
|
271
|
+
# Output only. The count of findings belonging to this finding type.
|
272
|
+
# Corresponds to the JSON property `findingCount`
|
273
|
+
# @return [Fixnum]
|
274
|
+
attr_accessor :finding_count
|
275
|
+
|
276
|
+
# Output only. The finding type associated with the stats.
|
277
|
+
# Corresponds to the JSON property `findingType`
|
278
|
+
# @return [String]
|
279
|
+
attr_accessor :finding_type
|
280
|
+
|
281
|
+
def initialize(**args)
|
282
|
+
update!(**args)
|
283
|
+
end
|
284
|
+
|
285
|
+
# Update properties of this object
|
286
|
+
def update!(**args)
|
287
|
+
@finding_count = args[:finding_count] if args.key?(:finding_count)
|
288
|
+
@finding_type = args[:finding_type] if args.key?(:finding_type)
|
289
|
+
end
|
290
|
+
end
|
291
|
+
|
292
|
+
# ! Information about a vulnerability with an HTML.
|
293
|
+
class Form
|
294
|
+
include Google::Apis::Core::Hashable
|
295
|
+
|
296
|
+
# ! The URI where to send the form when it's submitted.
|
297
|
+
# Corresponds to the JSON property `actionUri`
|
298
|
+
# @return [String]
|
299
|
+
attr_accessor :action_uri
|
300
|
+
|
301
|
+
# ! The names of form fields related to the vulnerability.
|
302
|
+
# Corresponds to the JSON property `fields`
|
303
|
+
# @return [Array<String>]
|
304
|
+
attr_accessor :fields
|
305
|
+
|
306
|
+
def initialize(**args)
|
307
|
+
update!(**args)
|
308
|
+
end
|
309
|
+
|
310
|
+
# Update properties of this object
|
311
|
+
def update!(**args)
|
312
|
+
@action_uri = args[:action_uri] if args.key?(:action_uri)
|
313
|
+
@fields = args[:fields] if args.key?(:fields)
|
314
|
+
end
|
315
|
+
end
|
316
|
+
|
317
|
+
# Describes authentication configuration that uses a Google account.
|
318
|
+
class GoogleAccount
|
319
|
+
include Google::Apis::Core::Hashable
|
320
|
+
|
321
|
+
# Required. Input only. The password of the Google account. The credential is
|
322
|
+
# stored encrypted and not returned in any response nor included in audit logs.
|
323
|
+
# Corresponds to the JSON property `password`
|
324
|
+
# @return [String]
|
325
|
+
attr_accessor :password
|
326
|
+
|
327
|
+
# Required. The user name of the Google account.
|
328
|
+
# Corresponds to the JSON property `username`
|
329
|
+
# @return [String]
|
330
|
+
attr_accessor :username
|
331
|
+
|
332
|
+
def initialize(**args)
|
333
|
+
update!(**args)
|
334
|
+
end
|
335
|
+
|
336
|
+
# Update properties of this object
|
337
|
+
def update!(**args)
|
338
|
+
@password = args[:password] if args.key?(:password)
|
339
|
+
@username = args[:username] if args.key?(:username)
|
340
|
+
end
|
341
|
+
end
|
342
|
+
|
343
|
+
# Describes a HTTP Header.
|
344
|
+
class Header
|
345
|
+
include Google::Apis::Core::Hashable
|
346
|
+
|
347
|
+
# Header name.
|
348
|
+
# Corresponds to the JSON property `name`
|
349
|
+
# @return [String]
|
350
|
+
attr_accessor :name
|
351
|
+
|
352
|
+
# Header value.
|
353
|
+
# Corresponds to the JSON property `value`
|
354
|
+
# @return [String]
|
355
|
+
attr_accessor :value
|
356
|
+
|
357
|
+
def initialize(**args)
|
358
|
+
update!(**args)
|
359
|
+
end
|
360
|
+
|
361
|
+
# Update properties of this object
|
362
|
+
def update!(**args)
|
363
|
+
@name = args[:name] if args.key?(:name)
|
364
|
+
@value = args[:value] if args.key?(:value)
|
365
|
+
end
|
366
|
+
end
|
367
|
+
|
368
|
+
# Describes authentication configuration for Identity-Aware-Proxy (IAP).
|
369
|
+
class IapCredential
|
370
|
+
include Google::Apis::Core::Hashable
|
371
|
+
|
372
|
+
# Describes authentication configuration when Web-Security-Scanner service
|
373
|
+
# account is added in Identity-Aware-Proxy (IAP) access policies.
|
374
|
+
# Corresponds to the JSON property `iapTestServiceAccountInfo`
|
375
|
+
# @return [Google::Apis::WebsecurityscannerV1::IapTestServiceAccountInfo]
|
376
|
+
attr_accessor :iap_test_service_account_info
|
377
|
+
|
378
|
+
def initialize(**args)
|
379
|
+
update!(**args)
|
380
|
+
end
|
381
|
+
|
382
|
+
# Update properties of this object
|
383
|
+
def update!(**args)
|
384
|
+
@iap_test_service_account_info = args[:iap_test_service_account_info] if args.key?(:iap_test_service_account_info)
|
385
|
+
end
|
386
|
+
end
|
387
|
+
|
388
|
+
# Describes authentication configuration when Web-Security-Scanner service
|
389
|
+
# account is added in Identity-Aware-Proxy (IAP) access policies.
|
390
|
+
class IapTestServiceAccountInfo
|
391
|
+
include Google::Apis::Core::Hashable
|
392
|
+
|
393
|
+
# Required. Describes OAuth2 client id of resources protected by Identity-Aware-
|
394
|
+
# Proxy (IAP).
|
395
|
+
# Corresponds to the JSON property `targetAudienceClientId`
|
396
|
+
# @return [String]
|
397
|
+
attr_accessor :target_audience_client_id
|
398
|
+
|
399
|
+
def initialize(**args)
|
400
|
+
update!(**args)
|
401
|
+
end
|
402
|
+
|
403
|
+
# Update properties of this object
|
404
|
+
def update!(**args)
|
405
|
+
@target_audience_client_id = args[:target_audience_client_id] if args.key?(:target_audience_client_id)
|
406
|
+
end
|
407
|
+
end
|
408
|
+
|
409
|
+
# Response for the `ListCrawledUrls` method.
|
410
|
+
class ListCrawledUrlsResponse
|
411
|
+
include Google::Apis::Core::Hashable
|
412
|
+
|
413
|
+
# The list of CrawledUrls returned.
|
414
|
+
# Corresponds to the JSON property `crawledUrls`
|
415
|
+
# @return [Array<Google::Apis::WebsecurityscannerV1::CrawledUrl>]
|
416
|
+
attr_accessor :crawled_urls
|
417
|
+
|
418
|
+
# Token to retrieve the next page of results, or empty if there are no more
|
419
|
+
# results in the list.
|
420
|
+
# Corresponds to the JSON property `nextPageToken`
|
421
|
+
# @return [String]
|
422
|
+
attr_accessor :next_page_token
|
423
|
+
|
424
|
+
def initialize(**args)
|
425
|
+
update!(**args)
|
426
|
+
end
|
427
|
+
|
428
|
+
# Update properties of this object
|
429
|
+
def update!(**args)
|
430
|
+
@crawled_urls = args[:crawled_urls] if args.key?(:crawled_urls)
|
431
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
432
|
+
end
|
433
|
+
end
|
434
|
+
|
435
|
+
# Response for the `ListFindingTypeStats` method.
|
436
|
+
class ListFindingTypeStatsResponse
|
437
|
+
include Google::Apis::Core::Hashable
|
438
|
+
|
439
|
+
# The list of FindingTypeStats returned.
|
440
|
+
# Corresponds to the JSON property `findingTypeStats`
|
441
|
+
# @return [Array<Google::Apis::WebsecurityscannerV1::FindingTypeStats>]
|
442
|
+
attr_accessor :finding_type_stats
|
443
|
+
|
444
|
+
def initialize(**args)
|
445
|
+
update!(**args)
|
446
|
+
end
|
447
|
+
|
448
|
+
# Update properties of this object
|
449
|
+
def update!(**args)
|
450
|
+
@finding_type_stats = args[:finding_type_stats] if args.key?(:finding_type_stats)
|
451
|
+
end
|
452
|
+
end
|
453
|
+
|
454
|
+
# Response for the `ListFindings` method.
|
455
|
+
class ListFindingsResponse
|
456
|
+
include Google::Apis::Core::Hashable
|
457
|
+
|
458
|
+
# The list of Findings returned.
|
459
|
+
# Corresponds to the JSON property `findings`
|
460
|
+
# @return [Array<Google::Apis::WebsecurityscannerV1::Finding>]
|
461
|
+
attr_accessor :findings
|
462
|
+
|
463
|
+
# Token to retrieve the next page of results, or empty if there are no more
|
464
|
+
# results in the list.
|
465
|
+
# Corresponds to the JSON property `nextPageToken`
|
466
|
+
# @return [String]
|
467
|
+
attr_accessor :next_page_token
|
468
|
+
|
469
|
+
def initialize(**args)
|
470
|
+
update!(**args)
|
471
|
+
end
|
472
|
+
|
473
|
+
# Update properties of this object
|
474
|
+
def update!(**args)
|
475
|
+
@findings = args[:findings] if args.key?(:findings)
|
476
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
477
|
+
end
|
478
|
+
end
|
479
|
+
|
480
|
+
# Response for the `ListScanConfigs` method.
|
481
|
+
class ListScanConfigsResponse
|
482
|
+
include Google::Apis::Core::Hashable
|
483
|
+
|
484
|
+
# Token to retrieve the next page of results, or empty if there are no more
|
485
|
+
# results in the list.
|
486
|
+
# Corresponds to the JSON property `nextPageToken`
|
487
|
+
# @return [String]
|
488
|
+
attr_accessor :next_page_token
|
489
|
+
|
490
|
+
# The list of ScanConfigs returned.
|
491
|
+
# Corresponds to the JSON property `scanConfigs`
|
492
|
+
# @return [Array<Google::Apis::WebsecurityscannerV1::ScanConfig>]
|
493
|
+
attr_accessor :scan_configs
|
494
|
+
|
495
|
+
def initialize(**args)
|
496
|
+
update!(**args)
|
497
|
+
end
|
498
|
+
|
499
|
+
# Update properties of this object
|
500
|
+
def update!(**args)
|
501
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
502
|
+
@scan_configs = args[:scan_configs] if args.key?(:scan_configs)
|
503
|
+
end
|
504
|
+
end
|
505
|
+
|
506
|
+
# Response for the `ListScanRuns` method.
|
507
|
+
class ListScanRunsResponse
|
508
|
+
include Google::Apis::Core::Hashable
|
509
|
+
|
510
|
+
# Token to retrieve the next page of results, or empty if there are no more
|
511
|
+
# results in the list.
|
512
|
+
# Corresponds to the JSON property `nextPageToken`
|
513
|
+
# @return [String]
|
514
|
+
attr_accessor :next_page_token
|
515
|
+
|
516
|
+
# The list of ScanRuns returned.
|
517
|
+
# Corresponds to the JSON property `scanRuns`
|
518
|
+
# @return [Array<Google::Apis::WebsecurityscannerV1::ScanRun>]
|
519
|
+
attr_accessor :scan_runs
|
520
|
+
|
521
|
+
def initialize(**args)
|
522
|
+
update!(**args)
|
523
|
+
end
|
524
|
+
|
525
|
+
# Update properties of this object
|
526
|
+
def update!(**args)
|
527
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
528
|
+
@scan_runs = args[:scan_runs] if args.key?(:scan_runs)
|
529
|
+
end
|
530
|
+
end
|
531
|
+
|
532
|
+
# Information reported for an outdated library.
|
533
|
+
class OutdatedLibrary
|
534
|
+
include Google::Apis::Core::Hashable
|
535
|
+
|
536
|
+
# URLs to learn more information about the vulnerabilities in the library.
|
537
|
+
# Corresponds to the JSON property `learnMoreUrls`
|
538
|
+
# @return [Array<String>]
|
539
|
+
attr_accessor :learn_more_urls
|
540
|
+
|
541
|
+
# The name of the outdated library.
|
542
|
+
# Corresponds to the JSON property `libraryName`
|
543
|
+
# @return [String]
|
544
|
+
attr_accessor :library_name
|
545
|
+
|
546
|
+
# The version number.
|
547
|
+
# Corresponds to the JSON property `version`
|
548
|
+
# @return [String]
|
549
|
+
attr_accessor :version
|
550
|
+
|
551
|
+
def initialize(**args)
|
552
|
+
update!(**args)
|
553
|
+
end
|
554
|
+
|
555
|
+
# Update properties of this object
|
556
|
+
def update!(**args)
|
557
|
+
@learn_more_urls = args[:learn_more_urls] if args.key?(:learn_more_urls)
|
558
|
+
@library_name = args[:library_name] if args.key?(:library_name)
|
559
|
+
@version = args[:version] if args.key?(:version)
|
560
|
+
end
|
561
|
+
end
|
562
|
+
|
563
|
+
# A ScanConfig resource contains the configurations to launch a scan.
|
564
|
+
class ScanConfig
|
565
|
+
include Google::Apis::Core::Hashable
|
566
|
+
|
567
|
+
# Scan authentication configuration.
|
568
|
+
# Corresponds to the JSON property `authentication`
|
569
|
+
# @return [Google::Apis::WebsecurityscannerV1::Authentication]
|
570
|
+
attr_accessor :authentication
|
571
|
+
|
572
|
+
# The excluded URL patterns as described in https://cloud.google.com/security-
|
573
|
+
# command-center/docs/how-to-use-web-security-scanner#excluding_urls
|
574
|
+
# Corresponds to the JSON property `blacklistPatterns`
|
575
|
+
# @return [Array<String>]
|
576
|
+
attr_accessor :blacklist_patterns
|
577
|
+
|
578
|
+
# Required. The user provided display name of the ScanConfig.
|
579
|
+
# Corresponds to the JSON property `displayName`
|
580
|
+
# @return [String]
|
581
|
+
attr_accessor :display_name
|
582
|
+
|
583
|
+
# Controls export of scan configurations and results to Security Command Center.
|
584
|
+
# Corresponds to the JSON property `exportToSecurityCommandCenter`
|
585
|
+
# @return [String]
|
586
|
+
attr_accessor :export_to_security_command_center
|
587
|
+
|
588
|
+
# Whether the scan config is managed by Web Security Scanner, output only.
|
589
|
+
# Corresponds to the JSON property `managedScan`
|
590
|
+
# @return [Boolean]
|
591
|
+
attr_accessor :managed_scan
|
592
|
+
alias_method :managed_scan?, :managed_scan
|
593
|
+
|
594
|
+
# The maximum QPS during scanning. A valid value ranges from 5 to 20 inclusively.
|
595
|
+
# If the field is unspecified or its value is set 0, server will default to 15.
|
596
|
+
# Other values outside of [5, 20] range will be rejected with INVALID_ARGUMENT
|
597
|
+
# error.
|
598
|
+
# Corresponds to the JSON property `maxQps`
|
599
|
+
# @return [Fixnum]
|
600
|
+
attr_accessor :max_qps
|
601
|
+
|
602
|
+
# The resource name of the ScanConfig. The name follows the format of 'projects/`
|
603
|
+
# projectId`/scanConfigs/`scanConfigId`'. The ScanConfig IDs are generated by
|
604
|
+
# the system.
|
605
|
+
# Corresponds to the JSON property `name`
|
606
|
+
# @return [String]
|
607
|
+
attr_accessor :name
|
608
|
+
|
609
|
+
# The risk level selected for the scan
|
610
|
+
# Corresponds to the JSON property `riskLevel`
|
611
|
+
# @return [String]
|
612
|
+
attr_accessor :risk_level
|
613
|
+
|
614
|
+
# Scan schedule configuration.
|
615
|
+
# Corresponds to the JSON property `schedule`
|
616
|
+
# @return [Google::Apis::WebsecurityscannerV1::Schedule]
|
617
|
+
attr_accessor :schedule
|
618
|
+
|
619
|
+
# Required. The starting URLs from which the scanner finds site pages.
|
620
|
+
# Corresponds to the JSON property `startingUrls`
|
621
|
+
# @return [Array<String>]
|
622
|
+
attr_accessor :starting_urls
|
623
|
+
|
624
|
+
# Whether the scan configuration has enabled static IP address scan feature. If
|
625
|
+
# enabled, the scanner will access applications from static IP addresses.
|
626
|
+
# Corresponds to the JSON property `staticIpScan`
|
627
|
+
# @return [Boolean]
|
628
|
+
attr_accessor :static_ip_scan
|
629
|
+
alias_method :static_ip_scan?, :static_ip_scan
|
630
|
+
|
631
|
+
# The user agent used during scanning.
|
632
|
+
# Corresponds to the JSON property `userAgent`
|
633
|
+
# @return [String]
|
634
|
+
attr_accessor :user_agent
|
635
|
+
|
636
|
+
def initialize(**args)
|
637
|
+
update!(**args)
|
638
|
+
end
|
639
|
+
|
640
|
+
# Update properties of this object
|
641
|
+
def update!(**args)
|
642
|
+
@authentication = args[:authentication] if args.key?(:authentication)
|
643
|
+
@blacklist_patterns = args[:blacklist_patterns] if args.key?(:blacklist_patterns)
|
644
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
645
|
+
@export_to_security_command_center = args[:export_to_security_command_center] if args.key?(:export_to_security_command_center)
|
646
|
+
@managed_scan = args[:managed_scan] if args.key?(:managed_scan)
|
647
|
+
@max_qps = args[:max_qps] if args.key?(:max_qps)
|
648
|
+
@name = args[:name] if args.key?(:name)
|
649
|
+
@risk_level = args[:risk_level] if args.key?(:risk_level)
|
650
|
+
@schedule = args[:schedule] if args.key?(:schedule)
|
651
|
+
@starting_urls = args[:starting_urls] if args.key?(:starting_urls)
|
652
|
+
@static_ip_scan = args[:static_ip_scan] if args.key?(:static_ip_scan)
|
653
|
+
@user_agent = args[:user_agent] if args.key?(:user_agent)
|
654
|
+
end
|
655
|
+
end
|
656
|
+
|
657
|
+
# Defines a custom error message used by CreateScanConfig and UpdateScanConfig
|
658
|
+
# APIs when scan configuration validation fails. It is also reported as part of
|
659
|
+
# a ScanRunErrorTrace message if scan validation fails due to a scan
|
660
|
+
# configuration error.
|
661
|
+
class ScanConfigError
|
662
|
+
include Google::Apis::Core::Hashable
|
663
|
+
|
664
|
+
# Output only. Indicates the reason code for a configuration failure.
|
665
|
+
# Corresponds to the JSON property `code`
|
666
|
+
# @return [String]
|
667
|
+
attr_accessor :code
|
668
|
+
|
669
|
+
# Output only. Indicates the full name of the ScanConfig field that triggers
|
670
|
+
# this error, for example "scan_config.max_qps". This field is provided for
|
671
|
+
# troubleshooting purposes only and its actual value can change in the future.
|
672
|
+
# Corresponds to the JSON property `fieldName`
|
673
|
+
# @return [String]
|
674
|
+
attr_accessor :field_name
|
675
|
+
|
676
|
+
def initialize(**args)
|
677
|
+
update!(**args)
|
678
|
+
end
|
679
|
+
|
680
|
+
# Update properties of this object
|
681
|
+
def update!(**args)
|
682
|
+
@code = args[:code] if args.key?(:code)
|
683
|
+
@field_name = args[:field_name] if args.key?(:field_name)
|
684
|
+
end
|
685
|
+
end
|
686
|
+
|
687
|
+
# A ScanRun is a output-only resource representing an actual run of the scan.
|
688
|
+
# Next id: 12
|
689
|
+
class ScanRun
|
690
|
+
include Google::Apis::Core::Hashable
|
691
|
+
|
692
|
+
# Output only. The time at which the ScanRun reached termination state - that
|
693
|
+
# the ScanRun is either finished or stopped by user.
|
694
|
+
# Corresponds to the JSON property `endTime`
|
695
|
+
# @return [String]
|
696
|
+
attr_accessor :end_time
|
697
|
+
|
698
|
+
# Output only. Defines an error trace message for a ScanRun.
|
699
|
+
# Corresponds to the JSON property `errorTrace`
|
700
|
+
# @return [Google::Apis::WebsecurityscannerV1::ScanRunErrorTrace]
|
701
|
+
attr_accessor :error_trace
|
702
|
+
|
703
|
+
# Output only. The execution state of the ScanRun.
|
704
|
+
# Corresponds to the JSON property `executionState`
|
705
|
+
# @return [String]
|
706
|
+
attr_accessor :execution_state
|
707
|
+
|
708
|
+
# Output only. Whether the scan run has found any vulnerabilities.
|
709
|
+
# Corresponds to the JSON property `hasVulnerabilities`
|
710
|
+
# @return [Boolean]
|
711
|
+
attr_accessor :has_vulnerabilities
|
712
|
+
alias_method :has_vulnerabilities?, :has_vulnerabilities
|
713
|
+
|
714
|
+
# Output only. The resource name of the ScanRun. The name follows the format of '
|
715
|
+
# projects/`projectId`/scanConfigs/`scanConfigId`/scanRuns/`scanRunId`'. The
|
716
|
+
# ScanRun IDs are generated by the system.
|
717
|
+
# Corresponds to the JSON property `name`
|
718
|
+
# @return [String]
|
719
|
+
attr_accessor :name
|
720
|
+
|
721
|
+
# Output only. The percentage of total completion ranging from 0 to 100. If the
|
722
|
+
# scan is in queue, the value is 0. If the scan is running, the value ranges
|
723
|
+
# from 0 to 100. If the scan is finished, the value is 100.
|
724
|
+
# Corresponds to the JSON property `progressPercent`
|
725
|
+
# @return [Fixnum]
|
726
|
+
attr_accessor :progress_percent
|
727
|
+
|
728
|
+
# Output only. The result state of the ScanRun. This field is only available
|
729
|
+
# after the execution state reaches "FINISHED".
|
730
|
+
# Corresponds to the JSON property `resultState`
|
731
|
+
# @return [String]
|
732
|
+
attr_accessor :result_state
|
733
|
+
|
734
|
+
# Output only. The time at which the ScanRun started.
|
735
|
+
# Corresponds to the JSON property `startTime`
|
736
|
+
# @return [String]
|
737
|
+
attr_accessor :start_time
|
738
|
+
|
739
|
+
# Output only. The number of URLs crawled during this ScanRun. If the scan is in
|
740
|
+
# progress, the value represents the number of URLs crawled up to now.
|
741
|
+
# Corresponds to the JSON property `urlsCrawledCount`
|
742
|
+
# @return [Fixnum]
|
743
|
+
attr_accessor :urls_crawled_count
|
744
|
+
|
745
|
+
# Output only. The number of URLs tested during this ScanRun. If the scan is in
|
746
|
+
# progress, the value represents the number of URLs tested up to now. The number
|
747
|
+
# of URLs tested is usually larger than the number URLS crawled because
|
748
|
+
# typically a crawled URL is tested with multiple test payloads.
|
749
|
+
# Corresponds to the JSON property `urlsTestedCount`
|
750
|
+
# @return [Fixnum]
|
751
|
+
attr_accessor :urls_tested_count
|
752
|
+
|
753
|
+
# Output only. A list of warnings, if such are encountered during this scan run.
|
754
|
+
# Corresponds to the JSON property `warningTraces`
|
755
|
+
# @return [Array<Google::Apis::WebsecurityscannerV1::ScanRunWarningTrace>]
|
756
|
+
attr_accessor :warning_traces
|
757
|
+
|
758
|
+
def initialize(**args)
|
759
|
+
update!(**args)
|
760
|
+
end
|
761
|
+
|
762
|
+
# Update properties of this object
|
763
|
+
def update!(**args)
|
764
|
+
@end_time = args[:end_time] if args.key?(:end_time)
|
765
|
+
@error_trace = args[:error_trace] if args.key?(:error_trace)
|
766
|
+
@execution_state = args[:execution_state] if args.key?(:execution_state)
|
767
|
+
@has_vulnerabilities = args[:has_vulnerabilities] if args.key?(:has_vulnerabilities)
|
768
|
+
@name = args[:name] if args.key?(:name)
|
769
|
+
@progress_percent = args[:progress_percent] if args.key?(:progress_percent)
|
770
|
+
@result_state = args[:result_state] if args.key?(:result_state)
|
771
|
+
@start_time = args[:start_time] if args.key?(:start_time)
|
772
|
+
@urls_crawled_count = args[:urls_crawled_count] if args.key?(:urls_crawled_count)
|
773
|
+
@urls_tested_count = args[:urls_tested_count] if args.key?(:urls_tested_count)
|
774
|
+
@warning_traces = args[:warning_traces] if args.key?(:warning_traces)
|
775
|
+
end
|
776
|
+
end
|
777
|
+
|
778
|
+
# Output only. Defines an error trace message for a ScanRun.
|
779
|
+
class ScanRunErrorTrace
|
780
|
+
include Google::Apis::Core::Hashable
|
781
|
+
|
782
|
+
# Output only. Indicates the error reason code.
|
783
|
+
# Corresponds to the JSON property `code`
|
784
|
+
# @return [String]
|
785
|
+
attr_accessor :code
|
786
|
+
|
787
|
+
# Output only. If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates
|
788
|
+
# the most common HTTP error code, if such is available. For example, if this
|
789
|
+
# code is 404, the scan has encountered too many NOT_FOUND responses.
|
790
|
+
# Corresponds to the JSON property `mostCommonHttpErrorCode`
|
791
|
+
# @return [Fixnum]
|
792
|
+
attr_accessor :most_common_http_error_code
|
793
|
+
|
794
|
+
# Defines a custom error message used by CreateScanConfig and UpdateScanConfig
|
795
|
+
# APIs when scan configuration validation fails. It is also reported as part of
|
796
|
+
# a ScanRunErrorTrace message if scan validation fails due to a scan
|
797
|
+
# configuration error.
|
798
|
+
# Corresponds to the JSON property `scanConfigError`
|
799
|
+
# @return [Google::Apis::WebsecurityscannerV1::ScanConfigError]
|
800
|
+
attr_accessor :scan_config_error
|
801
|
+
|
802
|
+
def initialize(**args)
|
803
|
+
update!(**args)
|
804
|
+
end
|
805
|
+
|
806
|
+
# Update properties of this object
|
807
|
+
def update!(**args)
|
808
|
+
@code = args[:code] if args.key?(:code)
|
809
|
+
@most_common_http_error_code = args[:most_common_http_error_code] if args.key?(:most_common_http_error_code)
|
810
|
+
@scan_config_error = args[:scan_config_error] if args.key?(:scan_config_error)
|
811
|
+
end
|
812
|
+
end
|
813
|
+
|
814
|
+
# Output only. Defines a warning trace message for ScanRun. Warning traces
|
815
|
+
# provide customers with useful information that helps make the scanning process
|
816
|
+
# more effective.
|
817
|
+
class ScanRunWarningTrace
|
818
|
+
include Google::Apis::Core::Hashable
|
819
|
+
|
820
|
+
# Output only. Indicates the warning code.
|
821
|
+
# Corresponds to the JSON property `code`
|
822
|
+
# @return [String]
|
823
|
+
attr_accessor :code
|
824
|
+
|
825
|
+
def initialize(**args)
|
826
|
+
update!(**args)
|
827
|
+
end
|
828
|
+
|
829
|
+
# Update properties of this object
|
830
|
+
def update!(**args)
|
831
|
+
@code = args[:code] if args.key?(:code)
|
832
|
+
end
|
833
|
+
end
|
834
|
+
|
835
|
+
# Scan schedule configuration.
|
836
|
+
class Schedule
|
837
|
+
include Google::Apis::Core::Hashable
|
838
|
+
|
839
|
+
# Required. The duration of time between executions in days.
|
840
|
+
# Corresponds to the JSON property `intervalDurationDays`
|
841
|
+
# @return [Fixnum]
|
842
|
+
attr_accessor :interval_duration_days
|
843
|
+
|
844
|
+
# A timestamp indicates when the next run will be scheduled. The value is
|
845
|
+
# refreshed by the server after each run. If unspecified, it will default to
|
846
|
+
# current server time, which means the scan will be scheduled to start
|
847
|
+
# immediately.
|
848
|
+
# Corresponds to the JSON property `scheduleTime`
|
849
|
+
# @return [String]
|
850
|
+
attr_accessor :schedule_time
|
851
|
+
|
852
|
+
def initialize(**args)
|
853
|
+
update!(**args)
|
854
|
+
end
|
855
|
+
|
856
|
+
# Update properties of this object
|
857
|
+
def update!(**args)
|
858
|
+
@interval_duration_days = args[:interval_duration_days] if args.key?(:interval_duration_days)
|
859
|
+
@schedule_time = args[:schedule_time] if args.key?(:schedule_time)
|
860
|
+
end
|
861
|
+
end
|
862
|
+
|
863
|
+
# Request for the `StartScanRun` method.
|
864
|
+
class StartScanRunRequest
|
865
|
+
include Google::Apis::Core::Hashable
|
866
|
+
|
867
|
+
def initialize(**args)
|
868
|
+
update!(**args)
|
869
|
+
end
|
870
|
+
|
871
|
+
# Update properties of this object
|
872
|
+
def update!(**args)
|
873
|
+
end
|
874
|
+
end
|
875
|
+
|
876
|
+
# Request for the `StopScanRun` method.
|
877
|
+
class StopScanRunRequest
|
878
|
+
include Google::Apis::Core::Hashable
|
879
|
+
|
880
|
+
def initialize(**args)
|
881
|
+
update!(**args)
|
882
|
+
end
|
883
|
+
|
884
|
+
# Update properties of this object
|
885
|
+
def update!(**args)
|
886
|
+
end
|
887
|
+
end
|
888
|
+
|
889
|
+
# Information regarding any resource causing the vulnerability such as
|
890
|
+
# JavaScript sources, image, audio files, etc.
|
891
|
+
class ViolatingResource
|
892
|
+
include Google::Apis::Core::Hashable
|
893
|
+
|
894
|
+
# The MIME type of this resource.
|
895
|
+
# Corresponds to the JSON property `contentType`
|
896
|
+
# @return [String]
|
897
|
+
attr_accessor :content_type
|
898
|
+
|
899
|
+
# URL of this violating resource.
|
900
|
+
# Corresponds to the JSON property `resourceUrl`
|
901
|
+
# @return [String]
|
902
|
+
attr_accessor :resource_url
|
903
|
+
|
904
|
+
def initialize(**args)
|
905
|
+
update!(**args)
|
906
|
+
end
|
907
|
+
|
908
|
+
# Update properties of this object
|
909
|
+
def update!(**args)
|
910
|
+
@content_type = args[:content_type] if args.key?(:content_type)
|
911
|
+
@resource_url = args[:resource_url] if args.key?(:resource_url)
|
912
|
+
end
|
913
|
+
end
|
914
|
+
|
915
|
+
# Information about vulnerable or missing HTTP Headers.
|
916
|
+
class VulnerableHeaders
|
917
|
+
include Google::Apis::Core::Hashable
|
918
|
+
|
919
|
+
# List of vulnerable headers.
|
920
|
+
# Corresponds to the JSON property `headers`
|
921
|
+
# @return [Array<Google::Apis::WebsecurityscannerV1::Header>]
|
922
|
+
attr_accessor :headers
|
923
|
+
|
924
|
+
# List of missing headers.
|
925
|
+
# Corresponds to the JSON property `missingHeaders`
|
926
|
+
# @return [Array<Google::Apis::WebsecurityscannerV1::Header>]
|
927
|
+
attr_accessor :missing_headers
|
928
|
+
|
929
|
+
def initialize(**args)
|
930
|
+
update!(**args)
|
931
|
+
end
|
932
|
+
|
933
|
+
# Update properties of this object
|
934
|
+
def update!(**args)
|
935
|
+
@headers = args[:headers] if args.key?(:headers)
|
936
|
+
@missing_headers = args[:missing_headers] if args.key?(:missing_headers)
|
937
|
+
end
|
938
|
+
end
|
939
|
+
|
940
|
+
# Information about vulnerable request parameters.
|
941
|
+
class VulnerableParameters
|
942
|
+
include Google::Apis::Core::Hashable
|
943
|
+
|
944
|
+
# The vulnerable parameter names.
|
945
|
+
# Corresponds to the JSON property `parameterNames`
|
946
|
+
# @return [Array<String>]
|
947
|
+
attr_accessor :parameter_names
|
948
|
+
|
949
|
+
def initialize(**args)
|
950
|
+
update!(**args)
|
951
|
+
end
|
952
|
+
|
953
|
+
# Update properties of this object
|
954
|
+
def update!(**args)
|
955
|
+
@parameter_names = args[:parameter_names] if args.key?(:parameter_names)
|
956
|
+
end
|
957
|
+
end
|
958
|
+
|
959
|
+
# Information reported for an XSS.
|
960
|
+
class Xss
|
961
|
+
include Google::Apis::Core::Hashable
|
962
|
+
|
963
|
+
# The attack vector of the payload triggering this XSS.
|
964
|
+
# Corresponds to the JSON property `attackVector`
|
965
|
+
# @return [String]
|
966
|
+
attr_accessor :attack_vector
|
967
|
+
|
968
|
+
# An error message generated by a javascript breakage.
|
969
|
+
# Corresponds to the JSON property `errorMessage`
|
970
|
+
# @return [String]
|
971
|
+
attr_accessor :error_message
|
972
|
+
|
973
|
+
# Stack traces leading to the point where the XSS occurred.
|
974
|
+
# Corresponds to the JSON property `stackTraces`
|
975
|
+
# @return [Array<String>]
|
976
|
+
attr_accessor :stack_traces
|
977
|
+
|
978
|
+
# The reproduction url for the seeding POST request of a Stored XSS.
|
979
|
+
# Corresponds to the JSON property `storedXssSeedingUrl`
|
980
|
+
# @return [String]
|
981
|
+
attr_accessor :stored_xss_seeding_url
|
982
|
+
|
983
|
+
def initialize(**args)
|
984
|
+
update!(**args)
|
985
|
+
end
|
986
|
+
|
987
|
+
# Update properties of this object
|
988
|
+
def update!(**args)
|
989
|
+
@attack_vector = args[:attack_vector] if args.key?(:attack_vector)
|
990
|
+
@error_message = args[:error_message] if args.key?(:error_message)
|
991
|
+
@stack_traces = args[:stack_traces] if args.key?(:stack_traces)
|
992
|
+
@stored_xss_seeding_url = args[:stored_xss_seeding_url] if args.key?(:stored_xss_seeding_url)
|
993
|
+
end
|
994
|
+
end
|
995
|
+
end
|
996
|
+
end
|
997
|
+
end
|