Class: Google::Apis::WebsecurityscannerV1beta::ScanRun

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/websecurityscanner_v1beta/classes.rb,
lib/google/apis/websecurityscanner_v1beta/representations.rb,
lib/google/apis/websecurityscanner_v1beta/representations.rb

Overview

A ScanRun is a output-only resource representing an actual run of the scan. Next id: 12

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ScanRun

Returns a new instance of ScanRun.



781
782
783
# File 'lib/google/apis/websecurityscanner_v1beta/classes.rb', line 781

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#end_timeString

The time at which the ScanRun reached termination state - that the ScanRun is either finished or stopped by user. Corresponds to the JSON property endTime

Returns:

  • (String)


719
720
721
# File 'lib/google/apis/websecurityscanner_v1beta/classes.rb', line 719

def end_time
  @end_time
end

#error_traceGoogle::Apis::WebsecurityscannerV1beta::ScanRunErrorTrace

Output only. Defines an error trace message for a ScanRun. Corresponds to the JSON property errorTrace



724
725
726
# File 'lib/google/apis/websecurityscanner_v1beta/classes.rb', line 724

def error_trace
  @error_trace
end

#execution_stateString

The execution state of the ScanRun. Corresponds to the JSON property executionState

Returns:

  • (String)


729
730
731
# File 'lib/google/apis/websecurityscanner_v1beta/classes.rb', line 729

def execution_state
  @execution_state
end

#has_vulnerabilitiesBoolean Also known as: has_vulnerabilities?

Whether the scan run has found any vulnerabilities. Corresponds to the JSON property hasVulnerabilities

Returns:

  • (Boolean)


734
735
736
# File 'lib/google/apis/websecurityscanner_v1beta/classes.rb', line 734

def has_vulnerabilities
  @has_vulnerabilities
end

#nameString

The resource name of the ScanRun. The name follows the format of 'projects/ projectId/scanConfigs/scanConfigId/scanRuns/scanRunId'. The ScanRun IDs are generated by the system. Corresponds to the JSON property name

Returns:

  • (String)


742
743
744
# File 'lib/google/apis/websecurityscanner_v1beta/classes.rb', line 742

def name
  @name
end

#progress_percentFixnum

The percentage of total completion ranging from 0 to 100. If the scan is in queue, the value is 0. If the scan is running, the value ranges from 0 to 100. If the scan is finished, the value is 100. Corresponds to the JSON property progressPercent

Returns:

  • (Fixnum)


749
750
751
# File 'lib/google/apis/websecurityscanner_v1beta/classes.rb', line 749

def progress_percent
  @progress_percent
end

#result_stateString

The result state of the ScanRun. This field is only available after the execution state reaches "FINISHED". Corresponds to the JSON property resultState

Returns:

  • (String)


755
756
757
# File 'lib/google/apis/websecurityscanner_v1beta/classes.rb', line 755

def result_state
  @result_state
end

#start_timeString

The time at which the ScanRun started. Corresponds to the JSON property startTime

Returns:

  • (String)


760
761
762
# File 'lib/google/apis/websecurityscanner_v1beta/classes.rb', line 760

def start_time
  @start_time
end

#urls_crawled_countFixnum

The number of URLs crawled during this ScanRun. If the scan is in progress, the value represents the number of URLs crawled up to now. Corresponds to the JSON property urlsCrawledCount

Returns:

  • (Fixnum)


766
767
768
# File 'lib/google/apis/websecurityscanner_v1beta/classes.rb', line 766

def urls_crawled_count
  @urls_crawled_count
end

#urls_tested_countFixnum

The number of URLs tested during this ScanRun. If the scan is in progress, the value represents the number of URLs tested up to now. The number of URLs tested is usually larger than the number URLS crawled because typically a crawled URL is tested with multiple test payloads. Corresponds to the JSON property urlsTestedCount

Returns:

  • (Fixnum)


774
775
776
# File 'lib/google/apis/websecurityscanner_v1beta/classes.rb', line 774

def urls_tested_count
  @urls_tested_count
end

#warning_tracesArray<Google::Apis::WebsecurityscannerV1beta::ScanRunWarningTrace>

A list of warnings, if such are encountered during this scan run. Corresponds to the JSON property warningTraces



779
780
781
# File 'lib/google/apis/websecurityscanner_v1beta/classes.rb', line 779

def warning_traces
  @warning_traces
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



786
787
788
789
790
791
792
793
794
795
796
797
798
# File 'lib/google/apis/websecurityscanner_v1beta/classes.rb', line 786

def update!(**args)
  @end_time = args[:end_time] if args.key?(:end_time)
  @error_trace = args[:error_trace] if args.key?(:error_trace)
  @execution_state = args[:execution_state] if args.key?(:execution_state)
  @has_vulnerabilities = args[:has_vulnerabilities] if args.key?(:has_vulnerabilities)
  @name = args[:name] if args.key?(:name)
  @progress_percent = args[:progress_percent] if args.key?(:progress_percent)
  @result_state = args[:result_state] if args.key?(:result_state)
  @start_time = args[:start_time] if args.key?(:start_time)
  @urls_crawled_count = args[:urls_crawled_count] if args.key?(:urls_crawled_count)
  @urls_tested_count = args[:urls_tested_count] if args.key?(:urls_tested_count)
  @warning_traces = args[:warning_traces] if args.key?(:warning_traces)
end