scan_runs
Creates, updates, deletes, gets or lists a scan_runs
resource.
Overview
Name | scan_runs |
Type | Resource |
Id | google.websecurityscanner.scan_runs |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Output only. 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. |
endTime | string | Output only. The time at which the ScanRun reached termination state - that the ScanRun is either finished or stopped by user. |
errorTrace | object | Output only. Defines an error trace message for a ScanRun. |
executionState | string | Output only. The execution state of the ScanRun. |
hasVulnerabilities | boolean | Output only. Whether the scan run has found any vulnerabilities. |
progressPercent | integer | Output only. 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. |
resultState | string | Output only. The result state of the ScanRun. This field is only available after the execution state reaches "FINISHED". |
startTime | string | Output only. The time at which the ScanRun started. |
urlsCrawledCount | string | Output only. 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. |
urlsTestedCount | string | Output only. 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. |
warningTraces | array | Output only. A list of warnings, if such are encountered during this scan run. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | projectsId, scanConfigsId, scanRunsId | Gets a ScanRun. |
list | SELECT | projectsId, scanConfigsId | Lists ScanRuns under a given ScanConfig, in descending order of ScanRun stop time. |
stop | EXEC | projectsId, scanConfigsId, scanRunsId | Stops a ScanRun. The stopped ScanRun is returned. |
SELECT
examples
Lists ScanRuns under a given ScanConfig, in descending order of ScanRun stop time.
SELECT
name,
endTime,
errorTrace,
executionState,
hasVulnerabilities,
progressPercent,
resultState,
startTime,
urlsCrawledCount,
urlsTestedCount,
warningTraces
FROM google.websecurityscanner.scan_runs
WHERE projectsId = '{{ projectsId }}'
AND scanConfigsId = '{{ scanConfigsId }}';