google-cloud-web_security_scanner-v1beta 0.9.1 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +31 -21
- data/lib/google/cloud/web_security_scanner/v1beta/version.rb +1 -1
- data/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/client.rb +38 -14
- data/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/client.rb +38 -14
- data/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/service_stub.rb +118 -80
- data/proto_docs/google/api/client.rb +39 -0
- data/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config.rb +4 -0
- metadata +6 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c57c922a521dbce32817010ac3e9e6d7cf89b6cee7cb193606ecc441caa9cff1
|
4
|
+
data.tar.gz: 3c190da2c397a748176f48aa5f8fa5b0b5c5391cb61865d6531ffd28f15f9c89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4bfe46e857525f79e1b7172b45656e146451649873136584da50528b29800a90b094341f5eb64a75ffc03646016b6f1cb59395b7fded281758bafc3fb1ed0400
|
7
|
+
data.tar.gz: 7508e2d45f0a98c20722937afd2f165333590c1073af78b2f09ac2f01e07586cb6520eab53a9d0e96f1574c299adb02df0f54fdc067327e8c0dbdf94ee0ccb00
|
data/README.md
CHANGED
@@ -43,40 +43,50 @@ for class and method documentation.
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-overview/)
|
44
44
|
for general usage information.
|
45
45
|
|
46
|
-
##
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
46
|
+
## Debug Logging
|
47
|
+
|
48
|
+
This library comes with opt-in Debug Logging that can help you troubleshoot
|
49
|
+
your application's integration with the API. When logging is activated, key
|
50
|
+
events such as requests and responses, along with data payloads and metadata
|
51
|
+
such as headers and client configuration, are logged to the standard error
|
52
|
+
stream.
|
53
|
+
|
54
|
+
**WARNING:** Client Library Debug Logging includes your data payloads in
|
55
|
+
plaintext, which could include sensitive data such as PII for yourself or your
|
56
|
+
customers, private keys, or other security data that could be compromising if
|
57
|
+
leaked. Always practice good data hygiene with your application logs, and follow
|
58
|
+
the principle of least access. Google also recommends that Client Library Debug
|
59
|
+
Logging be enabled only temporarily during active debugging, and not used
|
60
|
+
permanently in production.
|
61
|
+
|
62
|
+
To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
|
63
|
+
to the value `all`. Alternatively, you can set the value to a comma-delimited
|
64
|
+
list of client library gem names. This will select the default logging behavior,
|
65
|
+
which writes logs to the standard error stream. On a local workstation, this may
|
66
|
+
result in logs appearing on the console. When running on a Google Cloud hosting
|
67
|
+
service such as [Google Cloud Run](https://cloud.google.com/run), this generally
|
68
|
+
results in logs appearing alongside your application logs in the
|
69
|
+
[Google Cloud Logging](https://cloud.google.com/logging/) service.
|
70
|
+
|
71
|
+
You can customize logging by modifying the `logger` configuration when
|
72
|
+
constructing a client object. For example:
|
55
73
|
|
56
74
|
```ruby
|
75
|
+
require "google/cloud/web_security_scanner/v1beta"
|
57
76
|
require "logger"
|
58
77
|
|
59
|
-
|
60
|
-
|
61
|
-
def logger
|
62
|
-
LOGGER
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
67
|
-
module GRPC
|
68
|
-
extend MyLogger
|
78
|
+
client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config|
|
79
|
+
config.logger = Logger.new "my-app.log"
|
69
80
|
end
|
70
81
|
```
|
71
82
|
|
72
|
-
|
73
83
|
## Google Cloud Samples
|
74
84
|
|
75
85
|
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
76
86
|
|
77
87
|
## Supported Ruby Versions
|
78
88
|
|
79
|
-
This library is supported on Ruby
|
89
|
+
This library is supported on Ruby 3.0+.
|
80
90
|
|
81
91
|
Google provides official support for Ruby versions that are actively supported
|
82
92
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
@@ -212,8 +212,28 @@ module Google
|
|
212
212
|
universe_domain: @config.universe_domain,
|
213
213
|
channel_args: @config.channel_args,
|
214
214
|
interceptors: @config.interceptors,
|
215
|
-
channel_pool_config: @config.channel_pool
|
215
|
+
channel_pool_config: @config.channel_pool,
|
216
|
+
logger: @config.logger
|
216
217
|
)
|
218
|
+
|
219
|
+
@web_security_scanner_stub.stub_logger&.info do |entry|
|
220
|
+
entry.set_system_name
|
221
|
+
entry.set_service
|
222
|
+
entry.message = "Created client for #{entry.service}"
|
223
|
+
entry.set_credentials_fields credentials
|
224
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
225
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
226
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
230
|
+
##
|
231
|
+
# The logger used for request/response debug logging.
|
232
|
+
#
|
233
|
+
# @return [Logger]
|
234
|
+
#
|
235
|
+
def logger
|
236
|
+
@web_security_scanner_stub.logger
|
217
237
|
end
|
218
238
|
|
219
239
|
# Service calls
|
@@ -301,7 +321,6 @@ module Google
|
|
301
321
|
|
302
322
|
@web_security_scanner_stub.call_rpc :create_scan_config, request, options: options do |response, operation|
|
303
323
|
yield response, operation if block_given?
|
304
|
-
return response
|
305
324
|
end
|
306
325
|
rescue ::GRPC::BadStatus => e
|
307
326
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -388,7 +407,6 @@ module Google
|
|
388
407
|
|
389
408
|
@web_security_scanner_stub.call_rpc :delete_scan_config, request, options: options do |response, operation|
|
390
409
|
yield response, operation if block_given?
|
391
|
-
return response
|
392
410
|
end
|
393
411
|
rescue ::GRPC::BadStatus => e
|
394
412
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -475,7 +493,6 @@ module Google
|
|
475
493
|
|
476
494
|
@web_security_scanner_stub.call_rpc :get_scan_config, request, options: options do |response, operation|
|
477
495
|
yield response, operation if block_given?
|
478
|
-
return response
|
479
496
|
end
|
480
497
|
rescue ::GRPC::BadStatus => e
|
481
498
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -575,7 +592,7 @@ module Google
|
|
575
592
|
@web_security_scanner_stub.call_rpc :list_scan_configs, request, options: options do |response, operation|
|
576
593
|
response = ::Gapic::PagedEnumerable.new @web_security_scanner_stub, :list_scan_configs, request, response, operation, options
|
577
594
|
yield response, operation if block_given?
|
578
|
-
|
595
|
+
throw :response, response
|
579
596
|
end
|
580
597
|
rescue ::GRPC::BadStatus => e
|
581
598
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -667,7 +684,6 @@ module Google
|
|
667
684
|
|
668
685
|
@web_security_scanner_stub.call_rpc :update_scan_config, request, options: options do |response, operation|
|
669
686
|
yield response, operation if block_given?
|
670
|
-
return response
|
671
687
|
end
|
672
688
|
rescue ::GRPC::BadStatus => e
|
673
689
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -754,7 +770,6 @@ module Google
|
|
754
770
|
|
755
771
|
@web_security_scanner_stub.call_rpc :start_scan_run, request, options: options do |response, operation|
|
756
772
|
yield response, operation if block_given?
|
757
|
-
return response
|
758
773
|
end
|
759
774
|
rescue ::GRPC::BadStatus => e
|
760
775
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -842,7 +857,6 @@ module Google
|
|
842
857
|
|
843
858
|
@web_security_scanner_stub.call_rpc :get_scan_run, request, options: options do |response, operation|
|
844
859
|
yield response, operation if block_given?
|
845
|
-
return response
|
846
860
|
end
|
847
861
|
rescue ::GRPC::BadStatus => e
|
848
862
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -943,7 +957,7 @@ module Google
|
|
943
957
|
@web_security_scanner_stub.call_rpc :list_scan_runs, request, options: options do |response, operation|
|
944
958
|
response = ::Gapic::PagedEnumerable.new @web_security_scanner_stub, :list_scan_runs, request, response, operation, options
|
945
959
|
yield response, operation if block_given?
|
946
|
-
|
960
|
+
throw :response, response
|
947
961
|
end
|
948
962
|
rescue ::GRPC::BadStatus => e
|
949
963
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1031,7 +1045,6 @@ module Google
|
|
1031
1045
|
|
1032
1046
|
@web_security_scanner_stub.call_rpc :stop_scan_run, request, options: options do |response, operation|
|
1033
1047
|
yield response, operation if block_given?
|
1034
|
-
return response
|
1035
1048
|
end
|
1036
1049
|
rescue ::GRPC::BadStatus => e
|
1037
1050
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1132,7 +1145,7 @@ module Google
|
|
1132
1145
|
@web_security_scanner_stub.call_rpc :list_crawled_urls, request, options: options do |response, operation|
|
1133
1146
|
response = ::Gapic::PagedEnumerable.new @web_security_scanner_stub, :list_crawled_urls, request, response, operation, options
|
1134
1147
|
yield response, operation if block_given?
|
1135
|
-
|
1148
|
+
throw :response, response
|
1136
1149
|
end
|
1137
1150
|
rescue ::GRPC::BadStatus => e
|
1138
1151
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1220,7 +1233,6 @@ module Google
|
|
1220
1233
|
|
1221
1234
|
@web_security_scanner_stub.call_rpc :get_finding, request, options: options do |response, operation|
|
1222
1235
|
yield response, operation if block_given?
|
1223
|
-
return response
|
1224
1236
|
end
|
1225
1237
|
rescue ::GRPC::BadStatus => e
|
1226
1238
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1326,7 +1338,7 @@ module Google
|
|
1326
1338
|
@web_security_scanner_stub.call_rpc :list_findings, request, options: options do |response, operation|
|
1327
1339
|
response = ::Gapic::PagedEnumerable.new @web_security_scanner_stub, :list_findings, request, response, operation, options
|
1328
1340
|
yield response, operation if block_given?
|
1329
|
-
|
1341
|
+
throw :response, response
|
1330
1342
|
end
|
1331
1343
|
rescue ::GRPC::BadStatus => e
|
1332
1344
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1414,7 +1426,6 @@ module Google
|
|
1414
1426
|
|
1415
1427
|
@web_security_scanner_stub.call_rpc :list_finding_type_stats, request, options: options do |response, operation|
|
1416
1428
|
yield response, operation if block_given?
|
1417
|
-
return response
|
1418
1429
|
end
|
1419
1430
|
rescue ::GRPC::BadStatus => e
|
1420
1431
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1464,6 +1475,13 @@ module Google
|
|
1464
1475
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
1465
1476
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
1466
1477
|
# * (`nil`) indicating no credentials
|
1478
|
+
#
|
1479
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
1480
|
+
# external source for authentication to Google Cloud, you must validate it before
|
1481
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
1482
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
1483
|
+
# For more information, refer to [Validate credential configurations from external
|
1484
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
1467
1485
|
# @return [::Object]
|
1468
1486
|
# @!attribute [rw] scope
|
1469
1487
|
# The OAuth scopes
|
@@ -1503,6 +1521,11 @@ module Google
|
|
1503
1521
|
# default endpoint URL. The default value of nil uses the environment
|
1504
1522
|
# universe (usually the default "googleapis.com" universe).
|
1505
1523
|
# @return [::String,nil]
|
1524
|
+
# @!attribute [rw] logger
|
1525
|
+
# A custom logger to use for request/response debug logging, or the value
|
1526
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1527
|
+
# explicitly disable logging.
|
1528
|
+
# @return [::Logger,:default,nil]
|
1506
1529
|
#
|
1507
1530
|
class Configuration
|
1508
1531
|
extend ::Gapic::Config
|
@@ -1527,6 +1550,7 @@ module Google
|
|
1527
1550
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1528
1551
|
config_attr :quota_project, nil, ::String, nil
|
1529
1552
|
config_attr :universe_domain, nil, ::String, nil
|
1553
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1530
1554
|
|
1531
1555
|
# @private
|
1532
1556
|
def initialize parent_config = nil
|
@@ -205,8 +205,28 @@ module Google
|
|
205
205
|
endpoint: @config.endpoint,
|
206
206
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
207
207
|
universe_domain: @config.universe_domain,
|
208
|
-
credentials: credentials
|
208
|
+
credentials: credentials,
|
209
|
+
logger: @config.logger
|
209
210
|
)
|
211
|
+
|
212
|
+
@web_security_scanner_stub.logger(stub: true)&.info do |entry|
|
213
|
+
entry.set_system_name
|
214
|
+
entry.set_service
|
215
|
+
entry.message = "Created client for #{entry.service}"
|
216
|
+
entry.set_credentials_fields credentials
|
217
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
218
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
219
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
223
|
+
##
|
224
|
+
# The logger used for request/response debug logging.
|
225
|
+
#
|
226
|
+
# @return [Logger]
|
227
|
+
#
|
228
|
+
def logger
|
229
|
+
@web_security_scanner_stub.logger
|
210
230
|
end
|
211
231
|
|
212
232
|
# Service calls
|
@@ -287,7 +307,6 @@ module Google
|
|
287
307
|
|
288
308
|
@web_security_scanner_stub.create_scan_config request, options do |result, operation|
|
289
309
|
yield result, operation if block_given?
|
290
|
-
return result
|
291
310
|
end
|
292
311
|
rescue ::Gapic::Rest::Error => e
|
293
312
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -367,7 +386,6 @@ module Google
|
|
367
386
|
|
368
387
|
@web_security_scanner_stub.delete_scan_config request, options do |result, operation|
|
369
388
|
yield result, operation if block_given?
|
370
|
-
return result
|
371
389
|
end
|
372
390
|
rescue ::Gapic::Rest::Error => e
|
373
391
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -447,7 +465,6 @@ module Google
|
|
447
465
|
|
448
466
|
@web_security_scanner_stub.get_scan_config request, options do |result, operation|
|
449
467
|
yield result, operation if block_given?
|
450
|
-
return result
|
451
468
|
end
|
452
469
|
rescue ::Gapic::Rest::Error => e
|
453
470
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -540,7 +557,7 @@ module Google
|
|
540
557
|
@web_security_scanner_stub.list_scan_configs request, options do |result, operation|
|
541
558
|
result = ::Gapic::Rest::PagedEnumerable.new @web_security_scanner_stub, :list_scan_configs, "scan_configs", request, result, options
|
542
559
|
yield result, operation if block_given?
|
543
|
-
|
560
|
+
throw :response, result
|
544
561
|
end
|
545
562
|
rescue ::Gapic::Rest::Error => e
|
546
563
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -625,7 +642,6 @@ module Google
|
|
625
642
|
|
626
643
|
@web_security_scanner_stub.update_scan_config request, options do |result, operation|
|
627
644
|
yield result, operation if block_given?
|
628
|
-
return result
|
629
645
|
end
|
630
646
|
rescue ::Gapic::Rest::Error => e
|
631
647
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -705,7 +721,6 @@ module Google
|
|
705
721
|
|
706
722
|
@web_security_scanner_stub.start_scan_run request, options do |result, operation|
|
707
723
|
yield result, operation if block_given?
|
708
|
-
return result
|
709
724
|
end
|
710
725
|
rescue ::Gapic::Rest::Error => e
|
711
726
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -786,7 +801,6 @@ module Google
|
|
786
801
|
|
787
802
|
@web_security_scanner_stub.get_scan_run request, options do |result, operation|
|
788
803
|
yield result, operation if block_given?
|
789
|
-
return result
|
790
804
|
end
|
791
805
|
rescue ::Gapic::Rest::Error => e
|
792
806
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -880,7 +894,7 @@ module Google
|
|
880
894
|
@web_security_scanner_stub.list_scan_runs request, options do |result, operation|
|
881
895
|
result = ::Gapic::Rest::PagedEnumerable.new @web_security_scanner_stub, :list_scan_runs, "scan_runs", request, result, options
|
882
896
|
yield result, operation if block_given?
|
883
|
-
|
897
|
+
throw :response, result
|
884
898
|
end
|
885
899
|
rescue ::Gapic::Rest::Error => e
|
886
900
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -961,7 +975,6 @@ module Google
|
|
961
975
|
|
962
976
|
@web_security_scanner_stub.stop_scan_run request, options do |result, operation|
|
963
977
|
yield result, operation if block_given?
|
964
|
-
return result
|
965
978
|
end
|
966
979
|
rescue ::Gapic::Rest::Error => e
|
967
980
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1055,7 +1068,7 @@ module Google
|
|
1055
1068
|
@web_security_scanner_stub.list_crawled_urls request, options do |result, operation|
|
1056
1069
|
result = ::Gapic::Rest::PagedEnumerable.new @web_security_scanner_stub, :list_crawled_urls, "crawled_urls", request, result, options
|
1057
1070
|
yield result, operation if block_given?
|
1058
|
-
|
1071
|
+
throw :response, result
|
1059
1072
|
end
|
1060
1073
|
rescue ::Gapic::Rest::Error => e
|
1061
1074
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1136,7 +1149,6 @@ module Google
|
|
1136
1149
|
|
1137
1150
|
@web_security_scanner_stub.get_finding request, options do |result, operation|
|
1138
1151
|
yield result, operation if block_given?
|
1139
|
-
return result
|
1140
1152
|
end
|
1141
1153
|
rescue ::Gapic::Rest::Error => e
|
1142
1154
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1235,7 +1247,7 @@ module Google
|
|
1235
1247
|
@web_security_scanner_stub.list_findings request, options do |result, operation|
|
1236
1248
|
result = ::Gapic::Rest::PagedEnumerable.new @web_security_scanner_stub, :list_findings, "findings", request, result, options
|
1237
1249
|
yield result, operation if block_given?
|
1238
|
-
|
1250
|
+
throw :response, result
|
1239
1251
|
end
|
1240
1252
|
rescue ::Gapic::Rest::Error => e
|
1241
1253
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1316,7 +1328,6 @@ module Google
|
|
1316
1328
|
|
1317
1329
|
@web_security_scanner_stub.list_finding_type_stats request, options do |result, operation|
|
1318
1330
|
yield result, operation if block_given?
|
1319
|
-
return result
|
1320
1331
|
end
|
1321
1332
|
rescue ::Gapic::Rest::Error => e
|
1322
1333
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1364,6 +1375,13 @@ module Google
|
|
1364
1375
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1365
1376
|
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
1366
1377
|
# * (`nil`) indicating no credentials
|
1378
|
+
#
|
1379
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
1380
|
+
# external source for authentication to Google Cloud, you must validate it before
|
1381
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
1382
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
1383
|
+
# For more information, refer to [Validate credential configurations from external
|
1384
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
1367
1385
|
# @return [::Object]
|
1368
1386
|
# @!attribute [rw] scope
|
1369
1387
|
# The OAuth scopes
|
@@ -1396,6 +1414,11 @@ module Google
|
|
1396
1414
|
# default endpoint URL. The default value of nil uses the environment
|
1397
1415
|
# universe (usually the default "googleapis.com" universe).
|
1398
1416
|
# @return [::String,nil]
|
1417
|
+
# @!attribute [rw] logger
|
1418
|
+
# A custom logger to use for request/response debug logging, or the value
|
1419
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1420
|
+
# explicitly disable logging.
|
1421
|
+
# @return [::Logger,:default,nil]
|
1399
1422
|
#
|
1400
1423
|
class Configuration
|
1401
1424
|
extend ::Gapic::Config
|
@@ -1417,6 +1440,7 @@ module Google
|
|
1417
1440
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1418
1441
|
config_attr :quota_project, nil, ::String, nil
|
1419
1442
|
config_attr :universe_domain, nil, ::String, nil
|
1443
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1420
1444
|
|
1421
1445
|
# @private
|
1422
1446
|
def initialize parent_config = nil
|
@@ -30,7 +30,8 @@ module Google
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
|
-
|
33
|
+
# @private
|
34
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
34
35
|
# These require statements are intentionally placed here to initialize
|
35
36
|
# the REST modules only when it's required.
|
36
37
|
require "gapic/rest"
|
@@ -40,7 +41,9 @@ module Google
|
|
40
41
|
universe_domain: universe_domain,
|
41
42
|
credentials: credentials,
|
42
43
|
numeric_enums: true,
|
43
|
-
|
44
|
+
service_name: self.class,
|
45
|
+
raise_faraday_errors: false,
|
46
|
+
logger: logger
|
44
47
|
end
|
45
48
|
|
46
49
|
##
|
@@ -61,6 +64,15 @@ module Google
|
|
61
64
|
@client_stub.endpoint
|
62
65
|
end
|
63
66
|
|
67
|
+
##
|
68
|
+
# The logger used for request/response debug logging.
|
69
|
+
#
|
70
|
+
# @return [Logger]
|
71
|
+
#
|
72
|
+
def logger stub: false
|
73
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
74
|
+
end
|
75
|
+
|
64
76
|
##
|
65
77
|
# Baseline implementation for the create_scan_config REST call
|
66
78
|
#
|
@@ -87,16 +99,18 @@ module Google
|
|
87
99
|
|
88
100
|
response = @client_stub.make_http_request(
|
89
101
|
verb,
|
90
|
-
uri:
|
91
|
-
body:
|
92
|
-
params:
|
102
|
+
uri: uri,
|
103
|
+
body: body || "",
|
104
|
+
params: query_string_params,
|
105
|
+
method_name: "create_scan_config",
|
93
106
|
options: options
|
94
107
|
)
|
95
108
|
operation = ::Gapic::Rest::TransportOperation.new response
|
96
109
|
result = ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig.decode_json response.body, ignore_unknown_fields: true
|
97
|
-
|
98
|
-
|
99
|
-
|
110
|
+
catch :response do
|
111
|
+
yield result, operation if block_given?
|
112
|
+
result
|
113
|
+
end
|
100
114
|
end
|
101
115
|
|
102
116
|
##
|
@@ -125,16 +139,18 @@ module Google
|
|
125
139
|
|
126
140
|
response = @client_stub.make_http_request(
|
127
141
|
verb,
|
128
|
-
uri:
|
129
|
-
body:
|
130
|
-
params:
|
142
|
+
uri: uri,
|
143
|
+
body: body || "",
|
144
|
+
params: query_string_params,
|
145
|
+
method_name: "delete_scan_config",
|
131
146
|
options: options
|
132
147
|
)
|
133
148
|
operation = ::Gapic::Rest::TransportOperation.new response
|
134
149
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
135
|
-
|
136
|
-
|
137
|
-
|
150
|
+
catch :response do
|
151
|
+
yield result, operation if block_given?
|
152
|
+
result
|
153
|
+
end
|
138
154
|
end
|
139
155
|
|
140
156
|
##
|
@@ -163,16 +179,18 @@ module Google
|
|
163
179
|
|
164
180
|
response = @client_stub.make_http_request(
|
165
181
|
verb,
|
166
|
-
uri:
|
167
|
-
body:
|
168
|
-
params:
|
182
|
+
uri: uri,
|
183
|
+
body: body || "",
|
184
|
+
params: query_string_params,
|
185
|
+
method_name: "get_scan_config",
|
169
186
|
options: options
|
170
187
|
)
|
171
188
|
operation = ::Gapic::Rest::TransportOperation.new response
|
172
189
|
result = ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig.decode_json response.body, ignore_unknown_fields: true
|
173
|
-
|
174
|
-
|
175
|
-
|
190
|
+
catch :response do
|
191
|
+
yield result, operation if block_given?
|
192
|
+
result
|
193
|
+
end
|
176
194
|
end
|
177
195
|
|
178
196
|
##
|
@@ -201,16 +219,18 @@ module Google
|
|
201
219
|
|
202
220
|
response = @client_stub.make_http_request(
|
203
221
|
verb,
|
204
|
-
uri:
|
205
|
-
body:
|
206
|
-
params:
|
222
|
+
uri: uri,
|
223
|
+
body: body || "",
|
224
|
+
params: query_string_params,
|
225
|
+
method_name: "list_scan_configs",
|
207
226
|
options: options
|
208
227
|
)
|
209
228
|
operation = ::Gapic::Rest::TransportOperation.new response
|
210
229
|
result = ::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsResponse.decode_json response.body, ignore_unknown_fields: true
|
211
|
-
|
212
|
-
|
213
|
-
|
230
|
+
catch :response do
|
231
|
+
yield result, operation if block_given?
|
232
|
+
result
|
233
|
+
end
|
214
234
|
end
|
215
235
|
|
216
236
|
##
|
@@ -239,16 +259,18 @@ module Google
|
|
239
259
|
|
240
260
|
response = @client_stub.make_http_request(
|
241
261
|
verb,
|
242
|
-
uri:
|
243
|
-
body:
|
244
|
-
params:
|
262
|
+
uri: uri,
|
263
|
+
body: body || "",
|
264
|
+
params: query_string_params,
|
265
|
+
method_name: "update_scan_config",
|
245
266
|
options: options
|
246
267
|
)
|
247
268
|
operation = ::Gapic::Rest::TransportOperation.new response
|
248
269
|
result = ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig.decode_json response.body, ignore_unknown_fields: true
|
249
|
-
|
250
|
-
|
251
|
-
|
270
|
+
catch :response do
|
271
|
+
yield result, operation if block_given?
|
272
|
+
result
|
273
|
+
end
|
252
274
|
end
|
253
275
|
|
254
276
|
##
|
@@ -277,16 +299,18 @@ module Google
|
|
277
299
|
|
278
300
|
response = @client_stub.make_http_request(
|
279
301
|
verb,
|
280
|
-
uri:
|
281
|
-
body:
|
282
|
-
params:
|
302
|
+
uri: uri,
|
303
|
+
body: body || "",
|
304
|
+
params: query_string_params,
|
305
|
+
method_name: "start_scan_run",
|
283
306
|
options: options
|
284
307
|
)
|
285
308
|
operation = ::Gapic::Rest::TransportOperation.new response
|
286
309
|
result = ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun.decode_json response.body, ignore_unknown_fields: true
|
287
|
-
|
288
|
-
|
289
|
-
|
310
|
+
catch :response do
|
311
|
+
yield result, operation if block_given?
|
312
|
+
result
|
313
|
+
end
|
290
314
|
end
|
291
315
|
|
292
316
|
##
|
@@ -315,16 +339,18 @@ module Google
|
|
315
339
|
|
316
340
|
response = @client_stub.make_http_request(
|
317
341
|
verb,
|
318
|
-
uri:
|
319
|
-
body:
|
320
|
-
params:
|
342
|
+
uri: uri,
|
343
|
+
body: body || "",
|
344
|
+
params: query_string_params,
|
345
|
+
method_name: "get_scan_run",
|
321
346
|
options: options
|
322
347
|
)
|
323
348
|
operation = ::Gapic::Rest::TransportOperation.new response
|
324
349
|
result = ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun.decode_json response.body, ignore_unknown_fields: true
|
325
|
-
|
326
|
-
|
327
|
-
|
350
|
+
catch :response do
|
351
|
+
yield result, operation if block_given?
|
352
|
+
result
|
353
|
+
end
|
328
354
|
end
|
329
355
|
|
330
356
|
##
|
@@ -353,16 +379,18 @@ module Google
|
|
353
379
|
|
354
380
|
response = @client_stub.make_http_request(
|
355
381
|
verb,
|
356
|
-
uri:
|
357
|
-
body:
|
358
|
-
params:
|
382
|
+
uri: uri,
|
383
|
+
body: body || "",
|
384
|
+
params: query_string_params,
|
385
|
+
method_name: "list_scan_runs",
|
359
386
|
options: options
|
360
387
|
)
|
361
388
|
operation = ::Gapic::Rest::TransportOperation.new response
|
362
389
|
result = ::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsResponse.decode_json response.body, ignore_unknown_fields: true
|
363
|
-
|
364
|
-
|
365
|
-
|
390
|
+
catch :response do
|
391
|
+
yield result, operation if block_given?
|
392
|
+
result
|
393
|
+
end
|
366
394
|
end
|
367
395
|
|
368
396
|
##
|
@@ -391,16 +419,18 @@ module Google
|
|
391
419
|
|
392
420
|
response = @client_stub.make_http_request(
|
393
421
|
verb,
|
394
|
-
uri:
|
395
|
-
body:
|
396
|
-
params:
|
422
|
+
uri: uri,
|
423
|
+
body: body || "",
|
424
|
+
params: query_string_params,
|
425
|
+
method_name: "stop_scan_run",
|
397
426
|
options: options
|
398
427
|
)
|
399
428
|
operation = ::Gapic::Rest::TransportOperation.new response
|
400
429
|
result = ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun.decode_json response.body, ignore_unknown_fields: true
|
401
|
-
|
402
|
-
|
403
|
-
|
430
|
+
catch :response do
|
431
|
+
yield result, operation if block_given?
|
432
|
+
result
|
433
|
+
end
|
404
434
|
end
|
405
435
|
|
406
436
|
##
|
@@ -429,16 +459,18 @@ module Google
|
|
429
459
|
|
430
460
|
response = @client_stub.make_http_request(
|
431
461
|
verb,
|
432
|
-
uri:
|
433
|
-
body:
|
434
|
-
params:
|
462
|
+
uri: uri,
|
463
|
+
body: body || "",
|
464
|
+
params: query_string_params,
|
465
|
+
method_name: "list_crawled_urls",
|
435
466
|
options: options
|
436
467
|
)
|
437
468
|
operation = ::Gapic::Rest::TransportOperation.new response
|
438
469
|
result = ::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsResponse.decode_json response.body, ignore_unknown_fields: true
|
439
|
-
|
440
|
-
|
441
|
-
|
470
|
+
catch :response do
|
471
|
+
yield result, operation if block_given?
|
472
|
+
result
|
473
|
+
end
|
442
474
|
end
|
443
475
|
|
444
476
|
##
|
@@ -467,16 +499,18 @@ module Google
|
|
467
499
|
|
468
500
|
response = @client_stub.make_http_request(
|
469
501
|
verb,
|
470
|
-
uri:
|
471
|
-
body:
|
472
|
-
params:
|
502
|
+
uri: uri,
|
503
|
+
body: body || "",
|
504
|
+
params: query_string_params,
|
505
|
+
method_name: "get_finding",
|
473
506
|
options: options
|
474
507
|
)
|
475
508
|
operation = ::Gapic::Rest::TransportOperation.new response
|
476
509
|
result = ::Google::Cloud::WebSecurityScanner::V1beta::Finding.decode_json response.body, ignore_unknown_fields: true
|
477
|
-
|
478
|
-
|
479
|
-
|
510
|
+
catch :response do
|
511
|
+
yield result, operation if block_given?
|
512
|
+
result
|
513
|
+
end
|
480
514
|
end
|
481
515
|
|
482
516
|
##
|
@@ -505,16 +539,18 @@ module Google
|
|
505
539
|
|
506
540
|
response = @client_stub.make_http_request(
|
507
541
|
verb,
|
508
|
-
uri:
|
509
|
-
body:
|
510
|
-
params:
|
542
|
+
uri: uri,
|
543
|
+
body: body || "",
|
544
|
+
params: query_string_params,
|
545
|
+
method_name: "list_findings",
|
511
546
|
options: options
|
512
547
|
)
|
513
548
|
operation = ::Gapic::Rest::TransportOperation.new response
|
514
549
|
result = ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsResponse.decode_json response.body, ignore_unknown_fields: true
|
515
|
-
|
516
|
-
|
517
|
-
|
550
|
+
catch :response do
|
551
|
+
yield result, operation if block_given?
|
552
|
+
result
|
553
|
+
end
|
518
554
|
end
|
519
555
|
|
520
556
|
##
|
@@ -543,16 +579,18 @@ module Google
|
|
543
579
|
|
544
580
|
response = @client_stub.make_http_request(
|
545
581
|
verb,
|
546
|
-
uri:
|
547
|
-
body:
|
548
|
-
params:
|
582
|
+
uri: uri,
|
583
|
+
body: body || "",
|
584
|
+
params: query_string_params,
|
585
|
+
method_name: "list_finding_type_stats",
|
549
586
|
options: options
|
550
587
|
)
|
551
588
|
operation = ::Gapic::Rest::TransportOperation.new response
|
552
589
|
result = ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse.decode_json response.body, ignore_unknown_fields: true
|
553
|
-
|
554
|
-
|
555
|
-
|
590
|
+
catch :response do
|
591
|
+
yield result, operation if block_given?
|
592
|
+
result
|
593
|
+
end
|
556
594
|
end
|
557
595
|
|
558
596
|
##
|
@@ -28,6 +28,9 @@ module Google
|
|
28
28
|
# @!attribute [rw] destinations
|
29
29
|
# @return [::Array<::Google::Api::ClientLibraryDestination>]
|
30
30
|
# The destination where API teams want this client library to be published.
|
31
|
+
# @!attribute [rw] selective_gapic_generation
|
32
|
+
# @return [::Google::Api::SelectiveGapicGeneration]
|
33
|
+
# Configuration for which RPCs should be generated in the GAPIC client.
|
31
34
|
class CommonLanguageSettings
|
32
35
|
include ::Google::Protobuf::MessageExts
|
33
36
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -212,6 +215,12 @@ module Google
|
|
212
215
|
# enabled. By default, asynchronous REST clients will not be generated.
|
213
216
|
# This feature will be enabled by default 1 month after launching the
|
214
217
|
# feature in preview packages.
|
218
|
+
# @!attribute [rw] protobuf_pythonic_types_enabled
|
219
|
+
# @return [::Boolean]
|
220
|
+
# Enables generation of protobuf code using new types that are more
|
221
|
+
# Pythonic which are included in `protobuf>=5.29.x`. This feature will be
|
222
|
+
# enabled by default 1 month after launching the feature in preview
|
223
|
+
# packages.
|
215
224
|
class ExperimentalFeatures
|
216
225
|
include ::Google::Protobuf::MessageExts
|
217
226
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -297,9 +306,28 @@ module Google
|
|
297
306
|
# @!attribute [rw] common
|
298
307
|
# @return [::Google::Api::CommonLanguageSettings]
|
299
308
|
# Some settings.
|
309
|
+
# @!attribute [rw] renamed_services
|
310
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
311
|
+
# Map of service names to renamed services. Keys are the package relative
|
312
|
+
# service names and values are the name to be used for the service client
|
313
|
+
# and call options.
|
314
|
+
#
|
315
|
+
# publishing:
|
316
|
+
# go_settings:
|
317
|
+
# renamed_services:
|
318
|
+
# Publisher: TopicAdmin
|
300
319
|
class GoSettings
|
301
320
|
include ::Google::Protobuf::MessageExts
|
302
321
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
322
|
+
|
323
|
+
# @!attribute [rw] key
|
324
|
+
# @return [::String]
|
325
|
+
# @!attribute [rw] value
|
326
|
+
# @return [::String]
|
327
|
+
class RenamedServicesEntry
|
328
|
+
include ::Google::Protobuf::MessageExts
|
329
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
330
|
+
end
|
303
331
|
end
|
304
332
|
|
305
333
|
# Describes the generator configuration for a method.
|
@@ -375,6 +403,17 @@ module Google
|
|
375
403
|
end
|
376
404
|
end
|
377
405
|
|
406
|
+
# This message is used to configure the generation of a subset of the RPCs in
|
407
|
+
# a service for client libraries.
|
408
|
+
# @!attribute [rw] methods
|
409
|
+
# @return [::Array<::String>]
|
410
|
+
# An allowlist of the fully qualified names of RPCs that should be included
|
411
|
+
# on public client surfaces.
|
412
|
+
class SelectiveGapicGeneration
|
413
|
+
include ::Google::Protobuf::MessageExts
|
414
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
415
|
+
end
|
416
|
+
|
378
417
|
# The organization for which the client libraries are being published.
|
379
418
|
# Affects the url where generated docs are published, etc.
|
380
419
|
module ClientLibraryOrganization
|
@@ -75,9 +75,13 @@ module Google
|
|
75
75
|
# @!attribute [rw] google_account
|
76
76
|
# @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig::Authentication::GoogleAccount]
|
77
77
|
# Authentication using a Google account.
|
78
|
+
#
|
79
|
+
# Note: The following fields are mutually exclusive: `google_account`, `custom_account`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
78
80
|
# @!attribute [rw] custom_account
|
79
81
|
# @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig::Authentication::CustomAccount]
|
80
82
|
# Authentication using a custom account.
|
83
|
+
#
|
84
|
+
# Note: The following fields are mutually exclusive: `custom_account`, `google_account`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
81
85
|
class Authentication
|
82
86
|
include ::Google::Protobuf::MessageExts
|
83
87
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-web_security_scanner-v1beta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-29 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: gapic-common
|
@@ -16,7 +15,7 @@ dependencies:
|
|
16
15
|
requirements:
|
17
16
|
- - ">="
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
18
|
+
version: 0.25.0
|
20
19
|
- - "<"
|
21
20
|
- !ruby/object:Gem::Version
|
22
21
|
version: 2.a
|
@@ -26,7 +25,7 @@ dependencies:
|
|
26
25
|
requirements:
|
27
26
|
- - ">="
|
28
27
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
28
|
+
version: 0.25.0
|
30
29
|
- - "<"
|
31
30
|
- !ruby/object:Gem::Version
|
32
31
|
version: 2.a
|
@@ -102,7 +101,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
|
|
102
101
|
licenses:
|
103
102
|
- Apache-2.0
|
104
103
|
metadata: {}
|
105
|
-
post_install_message:
|
106
104
|
rdoc_options: []
|
107
105
|
require_paths:
|
108
106
|
- lib
|
@@ -110,15 +108,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
110
108
|
requirements:
|
111
109
|
- - ">="
|
112
110
|
- !ruby/object:Gem::Version
|
113
|
-
version: '
|
111
|
+
version: '3.0'
|
114
112
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
113
|
requirements:
|
116
114
|
- - ">="
|
117
115
|
- !ruby/object:Gem::Version
|
118
116
|
version: '0'
|
119
117
|
requirements: []
|
120
|
-
rubygems_version: 3.
|
121
|
-
signing_key:
|
118
|
+
rubygems_version: 3.6.2
|
122
119
|
specification_version: 4
|
123
120
|
summary: Scans your Compute and App Engine apps for common web vulnerabilities.
|
124
121
|
test_files: []
|