scan_config_error.proto 6.7 KB

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