• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2022 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
15syntax = "proto3";
16
17package google.cloud.websecurityscanner.v1;
18
19option csharp_namespace = "Google.Cloud.WebSecurityScanner.V1";
20option go_package = "cloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb;websecurityscannerpb";
21option java_multiple_files = true;
22option java_outer_classname = "ScanConfigErrorProto";
23option java_package = "com.google.cloud.websecurityscanner.v1";
24option php_namespace = "Google\\Cloud\\WebSecurityScanner\\V1";
25option ruby_package = "Google::Cloud::WebSecurityScanner::V1";
26
27// Defines a custom error message used by CreateScanConfig and UpdateScanConfig
28// APIs when scan configuration validation fails. It is also reported as part of
29// a ScanRunErrorTrace message if scan validation fails due to a scan
30// configuration error.
31message ScanConfigError {
32  // Output only.
33  // Defines an error reason code.
34  // Next id: 44
35  enum Code {
36    option allow_alias = true;
37
38    // There is no error.
39    CODE_UNSPECIFIED = 0;
40
41    // There is no error.
42    OK = 0;
43
44    // Indicates an internal server error.
45    // Please DO NOT USE THIS ERROR CODE unless the root cause is truly unknown.
46    INTERNAL_ERROR = 1;
47
48    // One of the seed URLs is an App Engine URL but we cannot validate the scan
49    // settings due to an App Engine API backend error.
50    APPENGINE_API_BACKEND_ERROR = 2;
51
52    // One of the seed URLs is an App Engine URL but we cannot access the
53    // App Engine API to validate scan settings.
54    APPENGINE_API_NOT_ACCESSIBLE = 3;
55
56    // One of the seed URLs is an App Engine URL but the Default Host of the
57    // App Engine is not set.
58    APPENGINE_DEFAULT_HOST_MISSING = 4;
59
60    // Google corporate accounts can not be used for scanning.
61    CANNOT_USE_GOOGLE_COM_ACCOUNT = 6;
62
63    // The account of the scan creator can not be used for scanning.
64    CANNOT_USE_OWNER_ACCOUNT = 7;
65
66    // This scan targets Compute Engine, but we cannot validate scan settings
67    // due to a Compute Engine API backend error.
68    COMPUTE_API_BACKEND_ERROR = 8;
69
70    // This scan targets Compute Engine, but we cannot access the Compute Engine
71    // API to validate the scan settings.
72    COMPUTE_API_NOT_ACCESSIBLE = 9;
73
74    // The Custom Login URL does not belong to the current project.
75    CUSTOM_LOGIN_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT = 10;
76
77    // The Custom Login URL is malformed (can not be parsed).
78    CUSTOM_LOGIN_URL_MALFORMED = 11;
79
80    // The Custom Login URL is mapped to a non-routable IP address in DNS.
81    CUSTOM_LOGIN_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS = 12;
82
83    // The Custom Login URL is mapped to an IP address which is not reserved for
84    // the current project.
85    CUSTOM_LOGIN_URL_MAPPED_TO_UNRESERVED_ADDRESS = 13;
86
87    // The Custom Login URL has a non-routable IP address.
88    CUSTOM_LOGIN_URL_HAS_NON_ROUTABLE_IP_ADDRESS = 14;
89
90    // The Custom Login URL has an IP address which is not reserved for the
91    // current project.
92    CUSTOM_LOGIN_URL_HAS_UNRESERVED_IP_ADDRESS = 15;
93
94    // Another scan with the same name (case-sensitive) already exists.
95    DUPLICATE_SCAN_NAME = 16;
96
97    // A field is set to an invalid value.
98    INVALID_FIELD_VALUE = 18;
99
100    // There was an error trying to authenticate to the scan target.
101    FAILED_TO_AUTHENTICATE_TO_TARGET = 19;
102
103    // Finding type value is not specified in the list findings request.
104    FINDING_TYPE_UNSPECIFIED = 20;
105
106    // Scan targets Compute Engine, yet current project was not whitelisted for
107    // Google Compute Engine Scanning Alpha access.
108    FORBIDDEN_TO_SCAN_COMPUTE = 21;
109
110    // User tries to update managed scan
111    FORBIDDEN_UPDATE_TO_MANAGED_SCAN = 43;
112
113    // The supplied filter is malformed. For example, it can not be parsed, does
114    // not have a filter type in expression, or the same filter type appears
115    // more than once.
116    MALFORMED_FILTER = 22;
117
118    // The supplied resource name is malformed (can not be parsed).
119    MALFORMED_RESOURCE_NAME = 23;
120
121    // The current project is not in an active state.
122    PROJECT_INACTIVE = 24;
123
124    // A required field is not set.
125    REQUIRED_FIELD = 25;
126
127    // Project id, scanconfig id, scanrun id, or finding id are not consistent
128    // with each other in resource name.
129    RESOURCE_NAME_INCONSISTENT = 26;
130
131    // The scan being requested to start is already running.
132    SCAN_ALREADY_RUNNING = 27;
133
134    // The scan that was requested to be stopped is not running.
135    SCAN_NOT_RUNNING = 28;
136
137    // One of the seed URLs does not belong to the current project.
138    SEED_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT = 29;
139
140    // One of the seed URLs is malformed (can not be parsed).
141    SEED_URL_MALFORMED = 30;
142
143    // One of the seed URLs is mapped to a non-routable IP address in DNS.
144    SEED_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS = 31;
145
146    // One of the seed URLs is mapped to an IP address which is not reserved
147    // for the current project.
148    SEED_URL_MAPPED_TO_UNRESERVED_ADDRESS = 32;
149
150    // One of the seed URLs has on-routable IP address.
151    SEED_URL_HAS_NON_ROUTABLE_IP_ADDRESS = 33;
152
153    // One of the seed URLs has an IP address that is not reserved
154    // for the current project.
155    SEED_URL_HAS_UNRESERVED_IP_ADDRESS = 35;
156
157    // The Web Security Scanner service account is not configured under the
158    // project.
159    SERVICE_ACCOUNT_NOT_CONFIGURED = 36;
160
161    // A project has reached the maximum number of scans.
162    TOO_MANY_SCANS = 37;
163
164    // Resolving the details of the current project fails.
165    UNABLE_TO_RESOLVE_PROJECT_INFO = 38;
166
167    // One or more blacklist patterns were in the wrong format.
168    UNSUPPORTED_BLACKLIST_PATTERN_FORMAT = 39;
169
170    // The supplied filter is not supported.
171    UNSUPPORTED_FILTER = 40;
172
173    // The supplied finding type is not supported. For example, we do not
174    // provide findings of the given finding type.
175    UNSUPPORTED_FINDING_TYPE = 41;
176
177    // The URL scheme of one or more of the supplied URLs is not supported.
178    UNSUPPORTED_URL_SCHEME = 42;
179  }
180
181  // Output only. Indicates the reason code for a configuration failure.
182  Code code = 1;
183
184  // Output only. Indicates the full name of the ScanConfig field that triggers this error,
185  // for example "scan_config.max_qps". This field is provided for
186  // troubleshooting purposes only and its actual value can change in the
187  // future.
188  string field_name = 2;
189}
190