Types for Web Security Scanner API Client#

class google.cloud.websecurityscanner_v1alpha.types.CrawledUrl#

A CrawledUrl resource represents a URL that was crawled during a ScanRun. Web Security Scanner Service crawls the web applications, following all links within the scope of sites, to find the URLs to test against.

http_method#

Output only. The http method of the request that was used to visit the URL, in uppercase.

url#

Output only. The URL that was crawled.

body#

Output only. The body of the request that was used to visit the URL.

body

Field google.cloud.websecurityscanner.v1alpha.CrawledUrl.body

http_method

Field google.cloud.websecurityscanner.v1alpha.CrawledUrl.http_method

url

Field google.cloud.websecurityscanner.v1alpha.CrawledUrl.url

class google.cloud.websecurityscanner_v1alpha.types.CreateScanConfigRequest#

Request for the CreateScanConfig method.

parent#

Required. The parent resource name where the scan is created, which should be a project resource name in the format ‘projects/{projectId}’.

scan_config#

Required. The ScanConfig to be created.

parent

Field google.cloud.websecurityscanner.v1alpha.CreateScanConfigRequest.parent

scan_config

Field google.cloud.websecurityscanner.v1alpha.CreateScanConfigRequest.scan_config

class google.cloud.websecurityscanner_v1alpha.types.DeleteScanConfigRequest#

Request for the DeleteScanConfig method.

name#

Required. The resource name of the ScanConfig to be deleted. The name follows the format of ‘projects/{projectId}/scanConfigs/{scanConfigId}’.

name

Field google.cloud.websecurityscanner.v1alpha.DeleteScanConfigRequest.name

class google.cloud.websecurityscanner_v1alpha.types.Empty#
class google.cloud.websecurityscanner_v1alpha.types.FieldMask#
paths#

Field google.protobuf.FieldMask.paths

class google.cloud.websecurityscanner_v1alpha.types.Finding#

A Finding resource represents a vulnerability instance identified during a ScanRun.

name#

Output only. The resource name of the Finding. The name follows the format of ‘projects/{projectId}/scanConfigs/{scanC onfigId}/scanruns/{scanRunId}/findings/{findingId}’. The finding IDs are generated by the system.

finding_type#

Output only. The type of the Finding.

http_method#

Output only. The http method of the request that triggered the vulnerability, in uppercase.

fuzzed_url#

Output only. The URL produced by the server-side fuzzer and used in the request that triggered the vulnerability.

body#

Output only. The body of the request that triggered the vulnerability.

description#

Output only. The description of the vulnerability.

reproduction_url#

Output only. The URL containing human-readable payload that user can leverage to reproduce the vulnerability.

frame_url#

Output only. If the vulnerability was originated from nested IFrame, the immediate parent IFrame is reported.

final_url#

Output only. The URL where the browser lands when the vulnerability is detected.

tracking_id#

Output only. The tracking ID uniquely identifies a vulnerability instance across multiple ScanRuns.

outdated_library#

Output only. An addon containing information about outdated libraries.

violating_resource#

Output only. An addon containing detailed information regarding any resource causing the vulnerability such as JavaScript sources, image, audio files, etc.

vulnerable_parameters#

Output only. An addon containing information about request parameters which were found to be vulnerable.

xss#

Output only. An addon containing information reported for an XSS, if any.

body

Field google.cloud.websecurityscanner.v1alpha.Finding.body

description

Field google.cloud.websecurityscanner.v1alpha.Finding.description

final_url

Field google.cloud.websecurityscanner.v1alpha.Finding.final_url

finding_type

Field google.cloud.websecurityscanner.v1alpha.Finding.finding_type

frame_url

Field google.cloud.websecurityscanner.v1alpha.Finding.frame_url

fuzzed_url

Field google.cloud.websecurityscanner.v1alpha.Finding.fuzzed_url

http_method

Field google.cloud.websecurityscanner.v1alpha.Finding.http_method

name

Field google.cloud.websecurityscanner.v1alpha.Finding.name

outdated_library

Field google.cloud.websecurityscanner.v1alpha.Finding.outdated_library

reproduction_url

Field google.cloud.websecurityscanner.v1alpha.Finding.reproduction_url

tracking_id

Field google.cloud.websecurityscanner.v1alpha.Finding.tracking_id

violating_resource

Field google.cloud.websecurityscanner.v1alpha.Finding.violating_resource

vulnerable_parameters

Field google.cloud.websecurityscanner.v1alpha.Finding.vulnerable_parameters

xss

Field google.cloud.websecurityscanner.v1alpha.Finding.xss

class google.cloud.websecurityscanner_v1alpha.types.FindingTypeStats#

A FindingTypeStats resource represents stats regarding a specific FindingType of Findings under a given ScanRun.

finding_type#

Output only. The finding type associated with the stats.

finding_count#

Output only. The count of findings belonging to this finding type.

finding_count

Field google.cloud.websecurityscanner.v1alpha.FindingTypeStats.finding_count

finding_type

Field google.cloud.websecurityscanner.v1alpha.FindingTypeStats.finding_type

class google.cloud.websecurityscanner_v1alpha.types.GetFindingRequest#

Request for the GetFinding method.

name#

Required. The resource name of the Finding to be returned. The name follows the format of ‘projects/{projectId}/scanConfigs/{ scanConfigId}/scanRuns/{scanRunId}/findings/{findingId}’.

name

Field google.cloud.websecurityscanner.v1alpha.GetFindingRequest.name

class google.cloud.websecurityscanner_v1alpha.types.GetScanConfigRequest#

Request for the GetScanConfig method.

name#

Required. The resource name of the ScanConfig to be returned. The name follows the format of ‘projects/{projectId}/scanConfigs/{scanConfigId}’.

name

Field google.cloud.websecurityscanner.v1alpha.GetScanConfigRequest.name

class google.cloud.websecurityscanner_v1alpha.types.GetScanRunRequest#

Request for the GetScanRun method.

name#

Required. The resource name of the ScanRun to be returned. The name follows the format of ‘projects/{projectId}/scanConfigs/{ scanConfigId}/scanRuns/{scanRunId}’.

name

Field google.cloud.websecurityscanner.v1alpha.GetScanRunRequest.name

class google.cloud.websecurityscanner_v1alpha.types.ListCrawledUrlsRequest#

Request for the ListCrawledUrls method.

parent#

Required. The parent resource name, which should be a scan run resource name in the format ‘projects/{projectId}/scanConfigs/ {scanConfigId}/scanRuns/{scanRunId}’.

page_token#

A token identifying a page of results to be returned. This should be a next_page_token value returned from a previous List request. If unspecified, the first page of results is returned.

page_size#

The maximum number of CrawledUrls to return, can be limited by server. If not specified or not positive, the implementation will select a reasonable value.

page_size

Field google.cloud.websecurityscanner.v1alpha.ListCrawledUrlsRequest.page_size

page_token

Field google.cloud.websecurityscanner.v1alpha.ListCrawledUrlsRequest.page_token

parent

Field google.cloud.websecurityscanner.v1alpha.ListCrawledUrlsRequest.parent

class google.cloud.websecurityscanner_v1alpha.types.ListCrawledUrlsResponse#

Response for the ListCrawledUrls method.

crawled_urls#

The list of CrawledUrls returned.

next_page_token#

Token to retrieve the next page of results, or empty if there are no more results in the list.

crawled_urls

Field google.cloud.websecurityscanner.v1alpha.ListCrawledUrlsResponse.crawled_urls

next_page_token

Field google.cloud.websecurityscanner.v1alpha.ListCrawledUrlsResponse.next_page_token

class google.cloud.websecurityscanner_v1alpha.types.ListFindingTypeStatsRequest#

Request for the ListFindingTypeStats method.

parent#

Required. The parent resource name, which should be a scan run resource name in the format ‘projects/{projectId}/scanConfigs/ {scanConfigId}/scanRuns/{scanRunId}’.

parent

Field google.cloud.websecurityscanner.v1alpha.ListFindingTypeStatsRequest.parent

class google.cloud.websecurityscanner_v1alpha.types.ListFindingTypeStatsResponse#

Response for the ListFindingTypeStats method.

finding_type_stats#

The list of FindingTypeStats returned.

finding_type_stats

Field google.cloud.websecurityscanner.v1alpha.ListFindingTypeStatsResponse.finding_type_stats

class google.cloud.websecurityscanner_v1alpha.types.ListFindingsRequest#

Request for the ListFindings method.

parent#

Required. The parent resource name, which should be a scan run resource name in the format ‘projects/{projectId}/scanConfigs/ {scanConfigId}/scanRuns/{scanRunId}’.

filter#

The filter expression. The expression must be in the format: . Supported field: ‘finding_type’. Supported operator: ‘=’.

page_token#

A token identifying a page of results to be returned. This should be a next_page_token value returned from a previous List request. If unspecified, the first page of results is returned.

page_size#

The maximum number of Findings to return, can be limited by server. If not specified or not positive, the implementation will select a reasonable value.

filter

Field google.cloud.websecurityscanner.v1alpha.ListFindingsRequest.filter

page_size

Field google.cloud.websecurityscanner.v1alpha.ListFindingsRequest.page_size

page_token

Field google.cloud.websecurityscanner.v1alpha.ListFindingsRequest.page_token

parent

Field google.cloud.websecurityscanner.v1alpha.ListFindingsRequest.parent

class google.cloud.websecurityscanner_v1alpha.types.ListFindingsResponse#

Response for the ListFindings method.

findings#

The list of Findings returned.

next_page_token#

Token to retrieve the next page of results, or empty if there are no more results in the list.

findings

Field google.cloud.websecurityscanner.v1alpha.ListFindingsResponse.findings

next_page_token

Field google.cloud.websecurityscanner.v1alpha.ListFindingsResponse.next_page_token

class google.cloud.websecurityscanner_v1alpha.types.ListScanConfigsRequest#

Request for the ListScanConfigs method.

parent#

Required. The parent resource name, which should be a project resource name in the format ‘projects/{projectId}’.

page_token#

A token identifying a page of results to be returned. This should be a next_page_token value returned from a previous List request. If unspecified, the first page of results is returned.

page_size#

The maximum number of ScanConfigs to return, can be limited by server. If not specified or not positive, the implementation will select a reasonable value.

page_size

Field google.cloud.websecurityscanner.v1alpha.ListScanConfigsRequest.page_size

page_token

Field google.cloud.websecurityscanner.v1alpha.ListScanConfigsRequest.page_token

parent

Field google.cloud.websecurityscanner.v1alpha.ListScanConfigsRequest.parent

class google.cloud.websecurityscanner_v1alpha.types.ListScanConfigsResponse#

Response for the ListScanConfigs method.

scan_configs#

The list of ScanConfigs returned.

next_page_token#

Token to retrieve the next page of results, or empty if there are no more results in the list.

next_page_token

Field google.cloud.websecurityscanner.v1alpha.ListScanConfigsResponse.next_page_token

scan_configs

Field google.cloud.websecurityscanner.v1alpha.ListScanConfigsResponse.scan_configs

class google.cloud.websecurityscanner_v1alpha.types.ListScanRunsRequest#

Request for the ListScanRuns method.

parent#

Required. The parent resource name, which should be a scan resource name in the format ‘projects/{projectId}/scanConfigs/{scanConfigId}’.

page_token#

A token identifying a page of results to be returned. This should be a next_page_token value returned from a previous List request. If unspecified, the first page of results is returned.

page_size#

The maximum number of ScanRuns to return, can be limited by server. If not specified or not positive, the implementation will select a reasonable value.

page_size

Field google.cloud.websecurityscanner.v1alpha.ListScanRunsRequest.page_size

page_token

Field google.cloud.websecurityscanner.v1alpha.ListScanRunsRequest.page_token

parent

Field google.cloud.websecurityscanner.v1alpha.ListScanRunsRequest.parent

class google.cloud.websecurityscanner_v1alpha.types.ListScanRunsResponse#

Response for the ListScanRuns method.

scan_runs#

The list of ScanRuns returned.

next_page_token#

Token to retrieve the next page of results, or empty if there are no more results in the list.

next_page_token

Field google.cloud.websecurityscanner.v1alpha.ListScanRunsResponse.next_page_token

scan_runs

Field google.cloud.websecurityscanner.v1alpha.ListScanRunsResponse.scan_runs

class google.cloud.websecurityscanner_v1alpha.types.OutdatedLibrary#

Information reported for an outdated library.

library_name#

The name of the outdated library.

version#

The version number.

learn_more_urls#

URLs to learn more information about the vulnerabilities in the library.

learn_more_urls

Field google.cloud.websecurityscanner.v1alpha.OutdatedLibrary.learn_more_urls

library_name

Field google.cloud.websecurityscanner.v1alpha.OutdatedLibrary.library_name

version

Field google.cloud.websecurityscanner.v1alpha.OutdatedLibrary.version

class google.cloud.websecurityscanner_v1alpha.types.ScanConfig#

A ScanConfig resource contains the configurations to launch a scan.

name#

The resource name of the ScanConfig. The name follows the format of ‘projects/{projectId}/scanConfigs/{scanConfigId}’. The ScanConfig IDs are generated by the system.

display_name#

Required. The user provided display name of the ScanConfig.

max_qps#

The maximum QPS during scanning. A valid value ranges from 5 to 20 inclusively. If the field is unspecified or its value is set 0, server will default to 15. Other values outside of [5, 20] range will be rejected with INVALID_ARGUMENT error.

starting_urls#

Required. The starting URLs from which the scanner finds site pages.

authentication#

The authentication configuration. If specified, service will use the authentication configuration during scanning.

user_agent#

The user agent used during scanning.

blacklist_patterns#

The blacklist URL patterns as described in https://cloud.google.com/security-scanner/docs/excluded-urls

schedule#

The schedule of the ScanConfig.

target_platforms#

Set of Cloud Platforms targeted by the scan. If empty, APP_ENGINE will be used as a default.

class Authentication#

Scan authentication configuration.

authentication#

Required. Authentication configuration

google_account#

Authentication using a Google account.

custom_account#

Authentication using a custom account.

class CustomAccount#

Describes authentication configuration that uses a custom account.

username#

Required. The user name of the custom account.

password#

Input only. Required. The password of the custom account. The credential is stored encrypted and not returned in any response.

login_url#

Required. The login form URL of the website.

login_url

Field google.cloud.websecurityscanner.v1alpha.ScanConfig.Authentication.CustomAccount.login_url

password

Field google.cloud.websecurityscanner.v1alpha.ScanConfig.Authentication.CustomAccount.password

username

Field google.cloud.websecurityscanner.v1alpha.ScanConfig.Authentication.CustomAccount.username

class GoogleAccount#

Describes authentication configuration that uses a Google account.

username#

Required. The user name of the Google account.

password#

Input only. Required. The password of the Google account. The credential is stored encrypted and not returned in any response.

password

Field google.cloud.websecurityscanner.v1alpha.ScanConfig.Authentication.GoogleAccount.password

username

Field google.cloud.websecurityscanner.v1alpha.ScanConfig.Authentication.GoogleAccount.username

custom_account

Field google.cloud.websecurityscanner.v1alpha.ScanConfig.Authentication.custom_account

google_account

Field google.cloud.websecurityscanner.v1alpha.ScanConfig.Authentication.google_account

class Schedule#

Scan schedule configuration.

schedule_time#

A timestamp indicates when the next run will be scheduled. The value is refreshed by the server after each run. If unspecified, it will default to current server time, which means the scan will be scheduled to start immediately.

interval_duration_days#

Required. The duration of time between executions in days.

interval_duration_days

Field google.cloud.websecurityscanner.v1alpha.ScanConfig.Schedule.interval_duration_days

schedule_time

Field google.cloud.websecurityscanner.v1alpha.ScanConfig.Schedule.schedule_time

authentication

Field google.cloud.websecurityscanner.v1alpha.ScanConfig.authentication

blacklist_patterns

Field google.cloud.websecurityscanner.v1alpha.ScanConfig.blacklist_patterns

display_name

Field google.cloud.websecurityscanner.v1alpha.ScanConfig.display_name

max_qps

Field google.cloud.websecurityscanner.v1alpha.ScanConfig.max_qps

name

Field google.cloud.websecurityscanner.v1alpha.ScanConfig.name

schedule

Field google.cloud.websecurityscanner.v1alpha.ScanConfig.schedule

starting_urls

Field google.cloud.websecurityscanner.v1alpha.ScanConfig.starting_urls

target_platforms

Field google.cloud.websecurityscanner.v1alpha.ScanConfig.target_platforms

user_agent

Field google.cloud.websecurityscanner.v1alpha.ScanConfig.user_agent

class google.cloud.websecurityscanner_v1alpha.types.ScanRun#

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

name#

Output only. The resource name of the ScanRun. The name follows the format of ‘projects/{projectId}/scanConfigs/{scanC onfigId}/scanRuns/{scanRunId}’. The ScanRun IDs are generated by the system.

execution_state#

Output only. The execution state of the ScanRun.

result_state#

Output only. The result state of the ScanRun. This field is only available after the execution state reaches “FINISHED”.

start_time#

Output only. The time at which the ScanRun started.

end_time#

Output only. The time at which the ScanRun reached termination state - that the ScanRun is either finished or stopped by user.

urls_crawled_count#

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.

urls_tested_count#

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.

has_vulnerabilities#

Output only. Whether the scan run has found any vulnerabilities.

progress_percent#

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.

end_time

Field google.cloud.websecurityscanner.v1alpha.ScanRun.end_time

execution_state

Field google.cloud.websecurityscanner.v1alpha.ScanRun.execution_state

has_vulnerabilities

Field google.cloud.websecurityscanner.v1alpha.ScanRun.has_vulnerabilities

name

Field google.cloud.websecurityscanner.v1alpha.ScanRun.name

progress_percent

Field google.cloud.websecurityscanner.v1alpha.ScanRun.progress_percent

result_state

Field google.cloud.websecurityscanner.v1alpha.ScanRun.result_state

start_time

Field google.cloud.websecurityscanner.v1alpha.ScanRun.start_time

urls_crawled_count

Field google.cloud.websecurityscanner.v1alpha.ScanRun.urls_crawled_count

urls_tested_count

Field google.cloud.websecurityscanner.v1alpha.ScanRun.urls_tested_count

class google.cloud.websecurityscanner_v1alpha.types.StartScanRunRequest#

Request for the StartScanRun method.

name#

Required. The resource name of the ScanConfig to be used. The name follows the format of ‘projects/{projectId}/scanConfigs/{scanConfigId}’.

name

Field google.cloud.websecurityscanner.v1alpha.StartScanRunRequest.name

class google.cloud.websecurityscanner_v1alpha.types.StopScanRunRequest#

Request for the StopScanRun method.

name#

Required. The resource name of the ScanRun to be stopped. The name follows the format of ‘projects/{projectId}/scanConfigs/{ scanConfigId}/scanRuns/{scanRunId}’.

name

Field google.cloud.websecurityscanner.v1alpha.StopScanRunRequest.name

class google.cloud.websecurityscanner_v1alpha.types.Timestamp#
nanos#

Field google.protobuf.Timestamp.nanos

seconds#

Field google.protobuf.Timestamp.seconds

class google.cloud.websecurityscanner_v1alpha.types.UpdateScanConfigRequest#

Request for the UpdateScanConfigRequest method.

scan_config#

Required. The ScanConfig to be updated. The name field must be set to identify the resource to be updated. The values of fields not covered by the mask will be ignored.

update_mask#

Required. The update mask applies to the resource. For the FieldMask definition, see https://developers.google.com/protocol- buffers/docs/reference/google.protobuf#fieldmask

scan_config

Field google.cloud.websecurityscanner.v1alpha.UpdateScanConfigRequest.scan_config

update_mask

Field google.cloud.websecurityscanner.v1alpha.UpdateScanConfigRequest.update_mask

class google.cloud.websecurityscanner_v1alpha.types.ViolatingResource#

Information regarding any resource causing the vulnerability such as JavaScript sources, image, audio files, etc.

content_type#

The MIME type of this resource.

resource_url#

URL of this violating resource.

content_type

Field google.cloud.websecurityscanner.v1alpha.ViolatingResource.content_type

resource_url

Field google.cloud.websecurityscanner.v1alpha.ViolatingResource.resource_url

class google.cloud.websecurityscanner_v1alpha.types.VulnerableParameters#

Information about vulnerable request parameters.

parameter_names#

The vulnerable parameter names.

parameter_names

Field google.cloud.websecurityscanner.v1alpha.VulnerableParameters.parameter_names

class google.cloud.websecurityscanner_v1alpha.types.Xss#

Information reported for an XSS.

stack_traces#

Stack traces leading to the point where the XSS occurred.

error_message#

An error message generated by a javascript breakage.

error_message

Field google.cloud.websecurityscanner.v1alpha.Xss.error_message

stack_traces

Field google.cloud.websecurityscanner.v1alpha.Xss.stack_traces