scan_run.proto 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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. import "google/cloud/websecurityscanner/v1/scan_run_error_trace.proto";
  17. import "google/cloud/websecurityscanner/v1/scan_run_warning_trace.proto";
  18. import "google/protobuf/timestamp.proto";
  19. option csharp_namespace = "Google.Cloud.WebSecurityScanner.V1";
  20. option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1;websecurityscanner";
  21. option java_multiple_files = true;
  22. option java_outer_classname = "ScanRunProto";
  23. option java_package = "com.google.cloud.websecurityscanner.v1";
  24. option php_namespace = "Google\\Cloud\\WebSecurityScanner\\V1";
  25. option ruby_package = "Google::Cloud::WebSecurityScanner::V1";
  26. // A ScanRun is a output-only resource representing an actual run of the scan.
  27. // Next id: 12
  28. message ScanRun {
  29. // Types of ScanRun execution state.
  30. enum ExecutionState {
  31. // Represents an invalid state caused by internal server error. This value
  32. // should never be returned.
  33. EXECUTION_STATE_UNSPECIFIED = 0;
  34. // The scan is waiting in the queue.
  35. QUEUED = 1;
  36. // The scan is in progress.
  37. SCANNING = 2;
  38. // The scan is either finished or stopped by user.
  39. FINISHED = 3;
  40. }
  41. // Types of ScanRun result state.
  42. enum ResultState {
  43. // Default value. This value is returned when the ScanRun is not yet
  44. // finished.
  45. RESULT_STATE_UNSPECIFIED = 0;
  46. // The scan finished without errors.
  47. SUCCESS = 1;
  48. // The scan finished with errors.
  49. ERROR = 2;
  50. // The scan was terminated by user.
  51. KILLED = 3;
  52. }
  53. // Output only. The resource name of the ScanRun. The name follows the format of
  54. // 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
  55. // The ScanRun IDs are generated by the system.
  56. string name = 1;
  57. // Output only. The execution state of the ScanRun.
  58. ExecutionState execution_state = 2;
  59. // Output only. The result state of the ScanRun. This field is only available after the
  60. // execution state reaches "FINISHED".
  61. ResultState result_state = 3;
  62. // Output only. The time at which the ScanRun started.
  63. google.protobuf.Timestamp start_time = 4;
  64. // Output only. The time at which the ScanRun reached termination state - that the ScanRun
  65. // is either finished or stopped by user.
  66. google.protobuf.Timestamp end_time = 5;
  67. // Output only. The number of URLs crawled during this ScanRun. If the scan is in progress,
  68. // the value represents the number of URLs crawled up to now.
  69. int64 urls_crawled_count = 6;
  70. // Output only. The number of URLs tested during this ScanRun. If the scan is in progress,
  71. // the value represents the number of URLs tested up to now. The number of
  72. // URLs tested is usually larger than the number URLS crawled because
  73. // typically a crawled URL is tested with multiple test payloads.
  74. int64 urls_tested_count = 7;
  75. // Output only. Whether the scan run has found any vulnerabilities.
  76. bool has_vulnerabilities = 8;
  77. // Output only. The percentage of total completion ranging from 0 to 100.
  78. // If the scan is in queue, the value is 0.
  79. // If the scan is running, the value ranges from 0 to 100.
  80. // If the scan is finished, the value is 100.
  81. int32 progress_percent = 9;
  82. // Output only. If result_state is an ERROR, this field provides the primary reason for
  83. // scan's termination and more details, if such are available.
  84. ScanRunErrorTrace error_trace = 10;
  85. // Output only. A list of warnings, if such are encountered during this scan run.
  86. repeated ScanRunWarningTrace warning_traces = 11;
  87. }