google-cloud-web_security_scanner-v1 0.5.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/google/cloud/web_security_scanner/v1/rest.rb +37 -0
- data/lib/google/cloud/web_security_scanner/v1/version.rb +1 -1
- data/lib/google/cloud/web_security_scanner/v1/web_security_scanner/client.rb +18 -26
- data/lib/google/cloud/web_security_scanner/v1/web_security_scanner/rest/client.rb +1293 -0
- data/lib/google/cloud/web_security_scanner/v1/web_security_scanner/rest/service_stub.rb +819 -0
- data/lib/google/cloud/web_security_scanner/v1/web_security_scanner/rest.rb +53 -0
- data/lib/google/cloud/web_security_scanner/v1/web_security_scanner.rb +7 -1
- data/lib/google/cloud/web_security_scanner/v1.rb +7 -2
- data/lib/google/cloud/websecurityscanner/v1/crawled_url_pb.rb +24 -6
- data/lib/google/cloud/websecurityscanner/v1/finding_addon_pb.rb +24 -57
- data/lib/google/cloud/websecurityscanner/v1/finding_pb.rb +25 -28
- data/lib/google/cloud/websecurityscanner/v1/finding_type_stats_pb.rb +24 -5
- data/lib/google/cloud/websecurityscanner/v1/scan_config_error_pb.rb +24 -49
- data/lib/google/cloud/websecurityscanner/v1/scan_config_pb.rb +25 -60
- data/lib/google/cloud/websecurityscanner/v1/scan_run_error_trace_pb.rb +25 -15
- data/lib/google/cloud/websecurityscanner/v1/scan_run_log_pb.rb +25 -11
- data/lib/google/cloud/websecurityscanner/v1/scan_run_pb.rb +27 -26
- data/lib/google/cloud/websecurityscanner/v1/scan_run_warning_trace_pb.rb +24 -12
- data/lib/google/cloud/websecurityscanner/v1/web_security_scanner_pb.rb +30 -70
- data/proto_docs/google/api/client.rb +381 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/timestamp.rb +1 -3
- metadata +15 -8
@@ -0,0 +1,53 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "gapic/rest"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/web_security_scanner/v1/version"
|
24
|
+
|
25
|
+
require "google/cloud/web_security_scanner/v1/web_security_scanner/credentials"
|
26
|
+
require "google/cloud/web_security_scanner/v1/web_security_scanner/rest/client"
|
27
|
+
|
28
|
+
module Google
|
29
|
+
module Cloud
|
30
|
+
module WebSecurityScanner
|
31
|
+
module V1
|
32
|
+
##
|
33
|
+
# Web Security Scanner Service identifies security vulnerabilities in web
|
34
|
+
# applications hosted on Google Cloud. It crawls your application, and
|
35
|
+
# attempts to exercise as many user inputs and event handlers as possible.
|
36
|
+
#
|
37
|
+
# To load this service and instantiate a REST client:
|
38
|
+
#
|
39
|
+
# require "google/cloud/web_security_scanner/v1/web_security_scanner/rest"
|
40
|
+
# client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new
|
41
|
+
#
|
42
|
+
module WebSecurityScanner
|
43
|
+
# Client for the REST transport
|
44
|
+
module Rest
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
helper_path = ::File.join __dir__, "rest", "helpers.rb"
|
53
|
+
require "google/cloud/web_security_scanner/v1/web_security_scanner/rest/helpers" if ::File.file? helper_path
|
@@ -24,6 +24,7 @@ require "google/cloud/web_security_scanner/v1/version"
|
|
24
24
|
|
25
25
|
require "google/cloud/web_security_scanner/v1/web_security_scanner/credentials"
|
26
26
|
require "google/cloud/web_security_scanner/v1/web_security_scanner/client"
|
27
|
+
require "google/cloud/web_security_scanner/v1/web_security_scanner/rest"
|
27
28
|
|
28
29
|
module Google
|
29
30
|
module Cloud
|
@@ -34,11 +35,16 @@ module Google
|
|
34
35
|
# applications hosted on Google Cloud. It crawls your application, and
|
35
36
|
# attempts to exercise as many user inputs and event handlers as possible.
|
36
37
|
#
|
37
|
-
#
|
38
|
+
# @example Load this service and instantiate a gRPC client
|
38
39
|
#
|
39
40
|
# require "google/cloud/web_security_scanner/v1/web_security_scanner"
|
40
41
|
# client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new
|
41
42
|
#
|
43
|
+
# @example Load this service and instantiate a REST client
|
44
|
+
#
|
45
|
+
# require "google/cloud/web_security_scanner/v1/web_security_scanner/rest"
|
46
|
+
# client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new
|
47
|
+
#
|
42
48
|
module WebSecurityScanner
|
43
49
|
end
|
44
50
|
end
|
@@ -23,13 +23,18 @@ module Google
|
|
23
23
|
module Cloud
|
24
24
|
module WebSecurityScanner
|
25
25
|
##
|
26
|
-
#
|
26
|
+
# API client module.
|
27
27
|
#
|
28
|
-
# @example
|
28
|
+
# @example Load this package, including all its services, and instantiate a gRPC client
|
29
29
|
#
|
30
30
|
# require "google/cloud/web_security_scanner/v1"
|
31
31
|
# client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new
|
32
32
|
#
|
33
|
+
# @example Load this package, including all its services, and instantiate a REST client
|
34
|
+
#
|
35
|
+
# require "google/cloud/web_security_scanner/v1"
|
36
|
+
# client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new
|
37
|
+
#
|
33
38
|
module V1
|
34
39
|
end
|
35
40
|
end
|
@@ -1,16 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/cloud/websecurityscanner/v1/crawled_url.proto
|
3
4
|
|
4
5
|
require 'google/protobuf'
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
7
|
+
|
8
|
+
descriptor_data = "\n4google/cloud/websecurityscanner/v1/crawled_url.proto\x12\"google.cloud.websecurityscanner.v1\"<\n\nCrawledUrl\x12\x13\n\x0bhttp_method\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\x12\x0c\n\x04\x62ody\x18\x03 \x01(\tB\x85\x02\n&com.google.cloud.websecurityscanner.v1B\x0f\x43rawledUrlProtoP\x01ZVcloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb;websecurityscannerpb\xaa\x02\"Google.Cloud.WebSecurityScanner.V1\xca\x02\"Google\\Cloud\\WebSecurityScanner\\V1\xea\x02%Google::Cloud::WebSecurityScanner::V1b\x06proto3"
|
9
|
+
|
10
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
11
|
+
|
12
|
+
begin
|
13
|
+
pool.add_serialized_file(descriptor_data)
|
14
|
+
rescue TypeError => e
|
15
|
+
# Compatibility code: will be removed in the next major version.
|
16
|
+
require 'google/protobuf/descriptor_pb'
|
17
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
18
|
+
parsed.clear_dependency
|
19
|
+
serialized = parsed.class.encode(parsed)
|
20
|
+
file = pool.add_serialized_file(serialized)
|
21
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
22
|
+
imports = [
|
23
|
+
]
|
24
|
+
imports.each do |type_name, expected_filename|
|
25
|
+
import_file = pool.lookup(type_name).file_descriptor
|
26
|
+
if import_file.name != expected_filename
|
27
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
12
28
|
end
|
13
29
|
end
|
30
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
31
|
+
warn "This will become an error in the next major version."
|
14
32
|
end
|
15
33
|
|
16
34
|
module Google
|
@@ -1,67 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/cloud/websecurityscanner/v1/finding_addon.proto
|
3
4
|
|
4
5
|
require 'google/protobuf'
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
end
|
28
|
-
add_message "google.cloud.websecurityscanner.v1.VulnerableHeaders.Header" do
|
29
|
-
optional :name, :string, 1
|
30
|
-
optional :value, :string, 2
|
31
|
-
end
|
32
|
-
add_message "google.cloud.websecurityscanner.v1.Xss" do
|
33
|
-
repeated :stack_traces, :string, 1
|
34
|
-
optional :error_message, :string, 2
|
35
|
-
optional :attack_vector, :enum, 3, "google.cloud.websecurityscanner.v1.Xss.AttackVector"
|
36
|
-
optional :stored_xss_seeding_url, :string, 4
|
37
|
-
end
|
38
|
-
add_enum "google.cloud.websecurityscanner.v1.Xss.AttackVector" do
|
39
|
-
value :ATTACK_VECTOR_UNSPECIFIED, 0
|
40
|
-
value :LOCAL_STORAGE, 1
|
41
|
-
value :SESSION_STORAGE, 2
|
42
|
-
value :WINDOW_NAME, 3
|
43
|
-
value :REFERRER, 4
|
44
|
-
value :FORM_INPUT, 5
|
45
|
-
value :COOKIE, 6
|
46
|
-
value :POST_MESSAGE, 7
|
47
|
-
value :GET_PARAMETERS, 8
|
48
|
-
value :URL_FRAGMENT, 9
|
49
|
-
value :HTML_COMMENT, 10
|
50
|
-
value :POST_PARAMETERS, 11
|
51
|
-
value :PROTOCOL, 12
|
52
|
-
value :STORED_XSS, 13
|
53
|
-
value :SAME_ORIGIN, 14
|
54
|
-
value :USER_CONTROLLABLE_URL, 15
|
55
|
-
end
|
56
|
-
add_message "google.cloud.websecurityscanner.v1.Xxe" do
|
57
|
-
optional :payload_value, :string, 1
|
58
|
-
optional :payload_location, :enum, 2, "google.cloud.websecurityscanner.v1.Xxe.Location"
|
59
|
-
end
|
60
|
-
add_enum "google.cloud.websecurityscanner.v1.Xxe.Location" do
|
61
|
-
value :LOCATION_UNSPECIFIED, 0
|
62
|
-
value :COMPLETE_REQUEST_BODY, 1
|
7
|
+
|
8
|
+
descriptor_data = "\n6google/cloud/websecurityscanner/v1/finding_addon.proto\x12\"google.cloud.websecurityscanner.v1\"*\n\x04\x46orm\x12\x12\n\naction_uri\x18\x01 \x01(\t\x12\x0e\n\x06\x66ields\x18\x02 \x03(\t\"Q\n\x0fOutdatedLibrary\x12\x14\n\x0clibrary_name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x17\n\x0flearn_more_urls\x18\x03 \x03(\t\"?\n\x11ViolatingResource\x12\x14\n\x0c\x63ontent_type\x18\x01 \x01(\t\x12\x14\n\x0cresource_url\x18\x02 \x01(\t\"/\n\x14VulnerableParameters\x12\x17\n\x0fparameter_names\x18\x01 \x03(\t\"\xe0\x01\n\x11VulnerableHeaders\x12M\n\x07headers\x18\x01 \x03(\x0b\x32<.google.cloud.websecurityscanner.v1.VulnerableHeaders.Header\x12U\n\x0fmissing_headers\x18\x02 \x03(\x0b\x32<.google.cloud.websecurityscanner.v1.VulnerableHeaders.Header\x1a%\n\x06Header\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"\xdb\x03\n\x03Xss\x12\x14\n\x0cstack_traces\x18\x01 \x03(\t\x12\x15\n\rerror_message\x18\x02 \x01(\t\x12K\n\rattack_vector\x18\x03 \x01(\x0e\x32\x34.google.cloud.websecurityscanner.v1.Xss.AttackVector\x12\x1e\n\x16stored_xss_seeding_url\x18\x04 \x01(\t\"\xb9\x02\n\x0c\x41ttackVector\x12\x1d\n\x19\x41TTACK_VECTOR_UNSPECIFIED\x10\x00\x12\x11\n\rLOCAL_STORAGE\x10\x01\x12\x13\n\x0fSESSION_STORAGE\x10\x02\x12\x0f\n\x0bWINDOW_NAME\x10\x03\x12\x0c\n\x08REFERRER\x10\x04\x12\x0e\n\nFORM_INPUT\x10\x05\x12\n\n\x06\x43OOKIE\x10\x06\x12\x10\n\x0cPOST_MESSAGE\x10\x07\x12\x12\n\x0eGET_PARAMETERS\x10\x08\x12\x10\n\x0cURL_FRAGMENT\x10\t\x12\x10\n\x0cHTML_COMMENT\x10\n\x12\x13\n\x0fPOST_PARAMETERS\x10\x0b\x12\x0c\n\x08PROTOCOL\x10\x0c\x12\x0e\n\nSTORED_XSS\x10\r\x12\x0f\n\x0bSAME_ORIGIN\x10\x0e\x12\x19\n\x15USER_CONTROLLABLE_URL\x10\x0f\"\xa9\x01\n\x03Xxe\x12\x15\n\rpayload_value\x18\x01 \x01(\t\x12J\n\x10payload_location\x18\x02 \x01(\x0e\x32\x30.google.cloud.websecurityscanner.v1.Xxe.Location\"?\n\x08Location\x12\x18\n\x14LOCATION_UNSPECIFIED\x10\x00\x12\x19\n\x15\x43OMPLETE_REQUEST_BODY\x10\x01\x42\x87\x02\n&com.google.cloud.websecurityscanner.v1B\x11\x46indingAddonProtoP\x01ZVcloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb;websecurityscannerpb\xaa\x02\"Google.Cloud.WebSecurityScanner.V1\xca\x02\"Google\\Cloud\\WebSecurityScanner\\V1\xea\x02%Google::Cloud::WebSecurityScanner::V1b\x06proto3"
|
9
|
+
|
10
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
11
|
+
|
12
|
+
begin
|
13
|
+
pool.add_serialized_file(descriptor_data)
|
14
|
+
rescue TypeError => e
|
15
|
+
# Compatibility code: will be removed in the next major version.
|
16
|
+
require 'google/protobuf/descriptor_pb'
|
17
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
18
|
+
parsed.clear_dependency
|
19
|
+
serialized = parsed.class.encode(parsed)
|
20
|
+
file = pool.add_serialized_file(serialized)
|
21
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
22
|
+
imports = [
|
23
|
+
]
|
24
|
+
imports.each do |type_name, expected_filename|
|
25
|
+
import_file = pool.lookup(type_name).file_descriptor
|
26
|
+
if import_file.name != expected_filename
|
27
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
63
28
|
end
|
64
29
|
end
|
30
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
31
|
+
warn "This will become an error in the next major version."
|
65
32
|
end
|
66
33
|
|
67
34
|
module Google
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/cloud/websecurityscanner/v1/finding.proto
|
3
4
|
|
@@ -7,36 +8,32 @@ require 'google/api/field_behavior_pb'
|
|
7
8
|
require 'google/api/resource_pb'
|
8
9
|
require 'google/cloud/websecurityscanner/v1/finding_addon_pb'
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
add_enum "google.cloud.websecurityscanner.v1.Finding.Severity" do
|
33
|
-
value :SEVERITY_UNSPECIFIED, 0
|
34
|
-
value :CRITICAL, 1
|
35
|
-
value :HIGH, 2
|
36
|
-
value :MEDIUM, 3
|
37
|
-
value :LOW, 4
|
11
|
+
|
12
|
+
descriptor_data = "\n0google/cloud/websecurityscanner/v1/finding.proto\x12\"google.cloud.websecurityscanner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x36google/cloud/websecurityscanner/v1/finding_addon.proto\"\xec\x07\n\x07\x46inding\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x66inding_type\x18\x02 \x01(\t\x12K\n\x08severity\x18\x11 \x01(\x0e\x32\x34.google.cloud.websecurityscanner.v1.Finding.SeverityB\x03\xe0\x41\x03\x12\x13\n\x0bhttp_method\x18\x03 \x01(\t\x12\x12\n\nfuzzed_url\x18\x04 \x01(\t\x12\x0c\n\x04\x62ody\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x18\n\x10reproduction_url\x18\x07 \x01(\t\x12\x11\n\tframe_url\x18\x08 \x01(\t\x12\x11\n\tfinal_url\x18\t \x01(\t\x12\x13\n\x0btracking_id\x18\n \x01(\t\x12\x36\n\x04\x66orm\x18\x10 \x01(\x0b\x32(.google.cloud.websecurityscanner.v1.Form\x12M\n\x10outdated_library\x18\x0b \x01(\x0b\x32\x33.google.cloud.websecurityscanner.v1.OutdatedLibrary\x12Q\n\x12violating_resource\x18\x0c \x01(\x0b\x32\x35.google.cloud.websecurityscanner.v1.ViolatingResource\x12Q\n\x12vulnerable_headers\x18\x0f \x01(\x0b\x32\x35.google.cloud.websecurityscanner.v1.VulnerableHeaders\x12W\n\x15vulnerable_parameters\x18\r \x01(\x0b\x32\x38.google.cloud.websecurityscanner.v1.VulnerableParameters\x12\x34\n\x03xss\x18\x0e \x01(\x0b\x32\'.google.cloud.websecurityscanner.v1.Xss\x12\x39\n\x03xxe\x18\x12 \x01(\x0b\x32\'.google.cloud.websecurityscanner.v1.XxeB\x03\xe0\x41\x03\"Q\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x07\n\x03LOW\x10\x04:\x84\x01\xea\x41\x80\x01\n)websecurityscanner.googleapis.com/Finding\x12Sprojects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}/findings/{finding}B\x82\x02\n&com.google.cloud.websecurityscanner.v1B\x0c\x46indingProtoP\x01ZVcloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb;websecurityscannerpb\xaa\x02\"Google.Cloud.WebSecurityScanner.V1\xca\x02\"Google\\Cloud\\WebSecurityScanner\\V1\xea\x02%Google::Cloud::WebSecurityScanner::V1b\x06proto3"
|
13
|
+
|
14
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
15
|
+
|
16
|
+
begin
|
17
|
+
pool.add_serialized_file(descriptor_data)
|
18
|
+
rescue TypeError => e
|
19
|
+
# Compatibility code: will be removed in the next major version.
|
20
|
+
require 'google/protobuf/descriptor_pb'
|
21
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
22
|
+
parsed.clear_dependency
|
23
|
+
serialized = parsed.class.encode(parsed)
|
24
|
+
file = pool.add_serialized_file(serialized)
|
25
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
26
|
+
imports = [
|
27
|
+
["google.cloud.websecurityscanner.v1.Form", "google/cloud/websecurityscanner/v1/finding_addon.proto"],
|
28
|
+
]
|
29
|
+
imports.each do |type_name, expected_filename|
|
30
|
+
import_file = pool.lookup(type_name).file_descriptor
|
31
|
+
if import_file.name != expected_filename
|
32
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
38
33
|
end
|
39
34
|
end
|
35
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
36
|
+
warn "This will become an error in the next major version."
|
40
37
|
end
|
41
38
|
|
42
39
|
module Google
|
@@ -1,15 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/cloud/websecurityscanner/v1/finding_type_stats.proto
|
3
4
|
|
4
5
|
require 'google/protobuf'
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
|
8
|
+
descriptor_data = "\n;google/cloud/websecurityscanner/v1/finding_type_stats.proto\x12\"google.cloud.websecurityscanner.v1\"?\n\x10\x46indingTypeStats\x12\x14\n\x0c\x66inding_type\x18\x01 \x01(\t\x12\x15\n\rfinding_count\x18\x02 \x01(\x05\x42\x8b\x02\n&com.google.cloud.websecurityscanner.v1B\x15\x46indingTypeStatsProtoP\x01ZVcloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb;websecurityscannerpb\xaa\x02\"Google.Cloud.WebSecurityScanner.V1\xca\x02\"Google\\Cloud\\WebSecurityScanner\\V1\xea\x02%Google::Cloud::WebSecurityScanner::V1b\x06proto3"
|
9
|
+
|
10
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
11
|
+
|
12
|
+
begin
|
13
|
+
pool.add_serialized_file(descriptor_data)
|
14
|
+
rescue TypeError => e
|
15
|
+
# Compatibility code: will be removed in the next major version.
|
16
|
+
require 'google/protobuf/descriptor_pb'
|
17
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
18
|
+
parsed.clear_dependency
|
19
|
+
serialized = parsed.class.encode(parsed)
|
20
|
+
file = pool.add_serialized_file(serialized)
|
21
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
22
|
+
imports = [
|
23
|
+
]
|
24
|
+
imports.each do |type_name, expected_filename|
|
25
|
+
import_file = pool.lookup(type_name).file_descriptor
|
26
|
+
if import_file.name != expected_filename
|
27
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
11
28
|
end
|
12
29
|
end
|
30
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
31
|
+
warn "This will become an error in the next major version."
|
13
32
|
end
|
14
33
|
|
15
34
|
module Google
|
@@ -1,59 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/cloud/websecurityscanner/v1/scan_config_error.proto
|
3
4
|
|
4
5
|
require 'google/protobuf'
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
value :CUSTOM_LOGIN_URL_HAS_NON_ROUTABLE_IP_ADDRESS, 14
|
28
|
-
value :CUSTOM_LOGIN_URL_HAS_UNRESERVED_IP_ADDRESS, 15
|
29
|
-
value :DUPLICATE_SCAN_NAME, 16
|
30
|
-
value :INVALID_FIELD_VALUE, 18
|
31
|
-
value :FAILED_TO_AUTHENTICATE_TO_TARGET, 19
|
32
|
-
value :FINDING_TYPE_UNSPECIFIED, 20
|
33
|
-
value :FORBIDDEN_TO_SCAN_COMPUTE, 21
|
34
|
-
value :FORBIDDEN_UPDATE_TO_MANAGED_SCAN, 43
|
35
|
-
value :MALFORMED_FILTER, 22
|
36
|
-
value :MALFORMED_RESOURCE_NAME, 23
|
37
|
-
value :PROJECT_INACTIVE, 24
|
38
|
-
value :REQUIRED_FIELD, 25
|
39
|
-
value :RESOURCE_NAME_INCONSISTENT, 26
|
40
|
-
value :SCAN_ALREADY_RUNNING, 27
|
41
|
-
value :SCAN_NOT_RUNNING, 28
|
42
|
-
value :SEED_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT, 29
|
43
|
-
value :SEED_URL_MALFORMED, 30
|
44
|
-
value :SEED_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS, 31
|
45
|
-
value :SEED_URL_MAPPED_TO_UNRESERVED_ADDRESS, 32
|
46
|
-
value :SEED_URL_HAS_NON_ROUTABLE_IP_ADDRESS, 33
|
47
|
-
value :SEED_URL_HAS_UNRESERVED_IP_ADDRESS, 35
|
48
|
-
value :SERVICE_ACCOUNT_NOT_CONFIGURED, 36
|
49
|
-
value :TOO_MANY_SCANS, 37
|
50
|
-
value :UNABLE_TO_RESOLVE_PROJECT_INFO, 38
|
51
|
-
value :UNSUPPORTED_BLACKLIST_PATTERN_FORMAT, 39
|
52
|
-
value :UNSUPPORTED_FILTER, 40
|
53
|
-
value :UNSUPPORTED_FINDING_TYPE, 41
|
54
|
-
value :UNSUPPORTED_URL_SCHEME, 42
|
7
|
+
|
8
|
+
descriptor_data = "\n:google/cloud/websecurityscanner/v1/scan_config_error.proto\x12\"google.cloud.websecurityscanner.v1\"\xe9\x0b\n\x0fScanConfigError\x12\x46\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x38.google.cloud.websecurityscanner.v1.ScanConfigError.Code\x12\x12\n\nfield_name\x18\x02 \x01(\t\"\xf9\n\n\x04\x43ode\x12\x14\n\x10\x43ODE_UNSPECIFIED\x10\x00\x12\x06\n\x02OK\x10\x00\x12\x12\n\x0eINTERNAL_ERROR\x10\x01\x12\x1f\n\x1b\x41PPENGINE_API_BACKEND_ERROR\x10\x02\x12 \n\x1c\x41PPENGINE_API_NOT_ACCESSIBLE\x10\x03\x12\"\n\x1e\x41PPENGINE_DEFAULT_HOST_MISSING\x10\x04\x12!\n\x1d\x43\x41NNOT_USE_GOOGLE_COM_ACCOUNT\x10\x06\x12\x1c\n\x18\x43\x41NNOT_USE_OWNER_ACCOUNT\x10\x07\x12\x1d\n\x19\x43OMPUTE_API_BACKEND_ERROR\x10\x08\x12\x1e\n\x1a\x43OMPUTE_API_NOT_ACCESSIBLE\x10\t\x12\x37\n3CUSTOM_LOGIN_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT\x10\n\x12\x1e\n\x1a\x43USTOM_LOGIN_URL_MALFORMED\x10\x0b\x12\x33\n/CUSTOM_LOGIN_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS\x10\x0c\x12\x31\n-CUSTOM_LOGIN_URL_MAPPED_TO_UNRESERVED_ADDRESS\x10\r\x12\x30\n,CUSTOM_LOGIN_URL_HAS_NON_ROUTABLE_IP_ADDRESS\x10\x0e\x12.\n*CUSTOM_LOGIN_URL_HAS_UNRESERVED_IP_ADDRESS\x10\x0f\x12\x17\n\x13\x44UPLICATE_SCAN_NAME\x10\x10\x12\x17\n\x13INVALID_FIELD_VALUE\x10\x12\x12$\n FAILED_TO_AUTHENTICATE_TO_TARGET\x10\x13\x12\x1c\n\x18\x46INDING_TYPE_UNSPECIFIED\x10\x14\x12\x1d\n\x19\x46ORBIDDEN_TO_SCAN_COMPUTE\x10\x15\x12$\n FORBIDDEN_UPDATE_TO_MANAGED_SCAN\x10+\x12\x14\n\x10MALFORMED_FILTER\x10\x16\x12\x1b\n\x17MALFORMED_RESOURCE_NAME\x10\x17\x12\x14\n\x10PROJECT_INACTIVE\x10\x18\x12\x12\n\x0eREQUIRED_FIELD\x10\x19\x12\x1e\n\x1aRESOURCE_NAME_INCONSISTENT\x10\x1a\x12\x18\n\x14SCAN_ALREADY_RUNNING\x10\x1b\x12\x14\n\x10SCAN_NOT_RUNNING\x10\x1c\x12/\n+SEED_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT\x10\x1d\x12\x16\n\x12SEED_URL_MALFORMED\x10\x1e\x12+\n\'SEED_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS\x10\x1f\x12)\n%SEED_URL_MAPPED_TO_UNRESERVED_ADDRESS\x10 \x12(\n$SEED_URL_HAS_NON_ROUTABLE_IP_ADDRESS\x10!\x12&\n\"SEED_URL_HAS_UNRESERVED_IP_ADDRESS\x10#\x12\"\n\x1eSERVICE_ACCOUNT_NOT_CONFIGURED\x10$\x12\x12\n\x0eTOO_MANY_SCANS\x10%\x12\"\n\x1eUNABLE_TO_RESOLVE_PROJECT_INFO\x10&\x12(\n$UNSUPPORTED_BLACKLIST_PATTERN_FORMAT\x10\'\x12\x16\n\x12UNSUPPORTED_FILTER\x10(\x12\x1c\n\x18UNSUPPORTED_FINDING_TYPE\x10)\x12\x1a\n\x16UNSUPPORTED_URL_SCHEME\x10*\x1a\x02\x10\x01\x42\x8a\x02\n&com.google.cloud.websecurityscanner.v1B\x14ScanConfigErrorProtoP\x01ZVcloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb;websecurityscannerpb\xaa\x02\"Google.Cloud.WebSecurityScanner.V1\xca\x02\"Google\\Cloud\\WebSecurityScanner\\V1\xea\x02%Google::Cloud::WebSecurityScanner::V1b\x06proto3"
|
9
|
+
|
10
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
11
|
+
|
12
|
+
begin
|
13
|
+
pool.add_serialized_file(descriptor_data)
|
14
|
+
rescue TypeError => e
|
15
|
+
# Compatibility code: will be removed in the next major version.
|
16
|
+
require 'google/protobuf/descriptor_pb'
|
17
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
18
|
+
parsed.clear_dependency
|
19
|
+
serialized = parsed.class.encode(parsed)
|
20
|
+
file = pool.add_serialized_file(serialized)
|
21
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
22
|
+
imports = [
|
23
|
+
]
|
24
|
+
imports.each do |type_name, expected_filename|
|
25
|
+
import_file = pool.lookup(type_name).file_descriptor
|
26
|
+
if import_file.name != expected_filename
|
27
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
55
28
|
end
|
56
29
|
end
|
30
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
31
|
+
warn "This will become an error in the next major version."
|
57
32
|
end
|
58
33
|
|
59
34
|
module Google
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/cloud/websecurityscanner/v1/scan_config.proto
|
3
4
|
|
@@ -6,68 +7,32 @@ require 'google/protobuf'
|
|
6
7
|
require 'google/api/field_behavior_pb'
|
7
8
|
require 'google/protobuf/timestamp_pb'
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
end
|
32
|
-
end
|
33
|
-
add_message "google.cloud.websecurityscanner.v1.ScanConfig.Authentication.GoogleAccount" do
|
34
|
-
optional :username, :string, 1
|
35
|
-
optional :password, :string, 2
|
36
|
-
end
|
37
|
-
add_message "google.cloud.websecurityscanner.v1.ScanConfig.Authentication.CustomAccount" do
|
38
|
-
optional :username, :string, 1
|
39
|
-
optional :password, :string, 2
|
40
|
-
optional :login_url, :string, 3
|
41
|
-
end
|
42
|
-
add_message "google.cloud.websecurityscanner.v1.ScanConfig.Authentication.IapCredential" do
|
43
|
-
oneof :iap_credentials do
|
44
|
-
optional :iap_test_service_account_info, :message, 1, "google.cloud.websecurityscanner.v1.ScanConfig.Authentication.IapCredential.IapTestServiceAccountInfo"
|
45
|
-
end
|
46
|
-
end
|
47
|
-
add_message "google.cloud.websecurityscanner.v1.ScanConfig.Authentication.IapCredential.IapTestServiceAccountInfo" do
|
48
|
-
optional :target_audience_client_id, :string, 1
|
49
|
-
end
|
50
|
-
add_message "google.cloud.websecurityscanner.v1.ScanConfig.Schedule" do
|
51
|
-
optional :schedule_time, :message, 1, "google.protobuf.Timestamp"
|
52
|
-
optional :interval_duration_days, :int32, 2
|
53
|
-
end
|
54
|
-
add_enum "google.cloud.websecurityscanner.v1.ScanConfig.UserAgent" do
|
55
|
-
value :USER_AGENT_UNSPECIFIED, 0
|
56
|
-
value :CHROME_LINUX, 1
|
57
|
-
value :CHROME_ANDROID, 2
|
58
|
-
value :SAFARI_IPHONE, 3
|
59
|
-
end
|
60
|
-
add_enum "google.cloud.websecurityscanner.v1.ScanConfig.RiskLevel" do
|
61
|
-
value :RISK_LEVEL_UNSPECIFIED, 0
|
62
|
-
value :NORMAL, 1
|
63
|
-
value :LOW, 2
|
64
|
-
end
|
65
|
-
add_enum "google.cloud.websecurityscanner.v1.ScanConfig.ExportToSecurityCommandCenter" do
|
66
|
-
value :EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED, 0
|
67
|
-
value :ENABLED, 1
|
68
|
-
value :DISABLED, 2
|
10
|
+
|
11
|
+
descriptor_data = "\n4google/cloud/websecurityscanner/v1/scan_config.proto\x12\"google.cloud.websecurityscanner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc4\r\n\nScanConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x0f\n\x07max_qps\x18\x03 \x01(\x05\x12\x15\n\rstarting_urls\x18\x04 \x03(\t\x12U\n\x0e\x61uthentication\x18\x05 \x01(\x0b\x32=.google.cloud.websecurityscanner.v1.ScanConfig.Authentication\x12L\n\nuser_agent\x18\x06 \x01(\x0e\x32\x38.google.cloud.websecurityscanner.v1.ScanConfig.UserAgent\x12\x1a\n\x12\x62lacklist_patterns\x18\x07 \x03(\t\x12I\n\x08schedule\x18\x08 \x01(\x0b\x32\x37.google.cloud.websecurityscanner.v1.ScanConfig.Schedule\x12w\n!export_to_security_command_center\x18\n \x01(\x0e\x32L.google.cloud.websecurityscanner.v1.ScanConfig.ExportToSecurityCommandCenter\x12L\n\nrisk_level\x18\x0c \x01(\x0e\x32\x38.google.cloud.websecurityscanner.v1.ScanConfig.RiskLevel\x12\x14\n\x0cmanaged_scan\x18\r \x01(\x08\x12\x16\n\x0estatic_ip_scan\x18\x0e \x01(\x08\x12!\n\x19ignore_http_status_errors\x18\x0f \x01(\x08\x1a\xd7\x05\n\x0e\x41uthentication\x12i\n\x0egoogle_account\x18\x01 \x01(\x0b\x32K.google.cloud.websecurityscanner.v1.ScanConfig.Authentication.GoogleAccountB\x02\x18\x01H\x00\x12\x65\n\x0e\x63ustom_account\x18\x02 \x01(\x0b\x32K.google.cloud.websecurityscanner.v1.ScanConfig.Authentication.CustomAccountH\x00\x12\x65\n\x0eiap_credential\x18\x04 \x01(\x0b\x32K.google.cloud.websecurityscanner.v1.ScanConfig.Authentication.IapCredentialH\x00\x1a\x37\n\rGoogleAccount\x12\x10\n\x08username\x18\x01 \x01(\t\x12\x10\n\x08password\x18\x02 \x01(\t:\x02\x18\x01\x1a\x46\n\rCustomAccount\x12\x10\n\x08username\x18\x01 \x01(\t\x12\x10\n\x08password\x18\x02 \x01(\t\x12\x11\n\tlogin_url\x18\x03 \x01(\t\x1a\xf8\x01\n\rIapCredential\x12\x8e\x01\n\x1diap_test_service_account_info\x18\x01 \x01(\x0b\x32\x65.google.cloud.websecurityscanner.v1.ScanConfig.Authentication.IapCredential.IapTestServiceAccountInfoH\x00\x1a\x43\n\x19IapTestServiceAccountInfo\x12&\n\x19target_audience_client_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\x11\n\x0fiap_credentialsB\x10\n\x0e\x61uthentication\x1a]\n\x08Schedule\x12\x31\n\rschedule_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1e\n\x16interval_duration_days\x18\x02 \x01(\x05\"`\n\tUserAgent\x12\x1a\n\x16USER_AGENT_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x43HROME_LINUX\x10\x01\x12\x12\n\x0e\x43HROME_ANDROID\x10\x02\x12\x11\n\rSAFARI_IPHONE\x10\x03\"<\n\tRiskLevel\x12\x1a\n\x16RISK_LEVEL_UNSPECIFIED\x10\x00\x12\n\n\x06NORMAL\x10\x01\x12\x07\n\x03LOW\x10\x02\"m\n\x1d\x45xportToSecurityCommandCenter\x12\x31\n-EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x42\x85\x02\n&com.google.cloud.websecurityscanner.v1B\x0fScanConfigProtoP\x01ZVcloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb;websecurityscannerpb\xaa\x02\"Google.Cloud.WebSecurityScanner.V1\xca\x02\"Google\\Cloud\\WebSecurityScanner\\V1\xea\x02%Google::Cloud::WebSecurityScanner::V1b\x06proto3"
|
12
|
+
|
13
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
14
|
+
|
15
|
+
begin
|
16
|
+
pool.add_serialized_file(descriptor_data)
|
17
|
+
rescue TypeError => e
|
18
|
+
# Compatibility code: will be removed in the next major version.
|
19
|
+
require 'google/protobuf/descriptor_pb'
|
20
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
21
|
+
parsed.clear_dependency
|
22
|
+
serialized = parsed.class.encode(parsed)
|
23
|
+
file = pool.add_serialized_file(serialized)
|
24
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
25
|
+
imports = [
|
26
|
+
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
27
|
+
]
|
28
|
+
imports.each do |type_name, expected_filename|
|
29
|
+
import_file = pool.lookup(type_name).file_descriptor
|
30
|
+
if import_file.name != expected_filename
|
31
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
69
32
|
end
|
70
33
|
end
|
34
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
35
|
+
warn "This will become an error in the next major version."
|
71
36
|
end
|
72
37
|
|
73
38
|
module Google
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/cloud/websecurityscanner/v1/scan_run_error_trace.proto
|
3
4
|
|
@@ -5,23 +6,32 @@ require 'google/protobuf'
|
|
5
6
|
|
6
7
|
require 'google/cloud/websecurityscanner/v1/scan_config_error_pb'
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
9
|
+
|
10
|
+
descriptor_data = "\n=google/cloud/websecurityscanner/v1/scan_run_error_trace.proto\x12\"google.cloud.websecurityscanner.v1\x1a:google/cloud/websecurityscanner/v1/scan_config_error.proto\"\x8d\x03\n\x11ScanRunErrorTrace\x12H\n\x04\x63ode\x18\x01 \x01(\x0e\x32:.google.cloud.websecurityscanner.v1.ScanRunErrorTrace.Code\x12N\n\x11scan_config_error\x18\x02 \x01(\x0b\x32\x33.google.cloud.websecurityscanner.v1.ScanConfigError\x12#\n\x1bmost_common_http_error_code\x18\x03 \x01(\x05\"\xb8\x01\n\x04\x43ode\x12\x14\n\x10\x43ODE_UNSPECIFIED\x10\x00\x12\x12\n\x0eINTERNAL_ERROR\x10\x01\x12\x15\n\x11SCAN_CONFIG_ISSUE\x10\x02\x12\x1f\n\x1b\x41UTHENTICATION_CONFIG_ISSUE\x10\x03\x12\x1c\n\x18TIMED_OUT_WHILE_SCANNING\x10\x04\x12\x16\n\x12TOO_MANY_REDIRECTS\x10\x05\x12\x18\n\x14TOO_MANY_HTTP_ERRORS\x10\x06\x42\x8c\x02\n&com.google.cloud.websecurityscanner.v1B\x16ScanRunErrorTraceProtoP\x01ZVcloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb;websecurityscannerpb\xaa\x02\"Google.Cloud.WebSecurityScanner.V1\xca\x02\"Google\\Cloud\\WebSecurityScanner\\V1\xea\x02%Google::Cloud::WebSecurityScanner::V1b\x06proto3"
|
11
|
+
|
12
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
13
|
+
|
14
|
+
begin
|
15
|
+
pool.add_serialized_file(descriptor_data)
|
16
|
+
rescue TypeError => e
|
17
|
+
# Compatibility code: will be removed in the next major version.
|
18
|
+
require 'google/protobuf/descriptor_pb'
|
19
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
20
|
+
parsed.clear_dependency
|
21
|
+
serialized = parsed.class.encode(parsed)
|
22
|
+
file = pool.add_serialized_file(serialized)
|
23
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
24
|
+
imports = [
|
25
|
+
["google.cloud.websecurityscanner.v1.ScanConfigError", "google/cloud/websecurityscanner/v1/scan_config_error.proto"],
|
26
|
+
]
|
27
|
+
imports.each do |type_name, expected_filename|
|
28
|
+
import_file = pool.lookup(type_name).file_descriptor
|
29
|
+
if import_file.name != expected_filename
|
30
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
23
31
|
end
|
24
32
|
end
|
33
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
34
|
+
warn "This will become an error in the next major version."
|
25
35
|
end
|
26
36
|
|
27
37
|
module Google
|