As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

Types for Google Cloud Websecurityscanner v1 API

class google.cloud.websecurityscanner_v1.types.CrawledUrl(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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.

Type

str

url

Output only. The URL that was crawled.

Type

str

body

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

Type

str

class google.cloud.websecurityscanner_v1.types.CreateScanConfigRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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}’.

Type

str

scan_config

Required. The ScanConfig to be created.

Type

google.cloud.websecurityscanner_v1.types.ScanConfig

class google.cloud.websecurityscanner_v1.types.DeleteScanConfigRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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}’.

Type

str

class google.cloud.websecurityscanner_v1.types.Finding(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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/{scanConfigId}/scanruns/{scanRunId}/findings/{findingId}’. The finding IDs are generated by the system.

Type

str

finding_type

Output only. The type of the Finding. Detailed and up-to-date information on findings can be found here:

https://cloud.google.com/security-command-center/docs/how-to-remediate-web-security-scanner-findings

Type

str

severity

Output only. The severity level of the reported vulnerability.

Type

google.cloud.websecurityscanner_v1.types.Finding.Severity

http_method

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

Type

str

fuzzed_url

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

Type

str

body

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

Type

str

description

Output only. The description of the vulnerability.

Type

str

reproduction_url

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

Type

str

frame_url

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

Type

str

final_url

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

Type

str

tracking_id

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

Type

str

form

Output only. An addon containing information reported for a vulnerability with an HTML form, if any.

Type

google.cloud.websecurityscanner_v1.types.Form

outdated_library

Output only. An addon containing information about outdated libraries.

Type

google.cloud.websecurityscanner_v1.types.OutdatedLibrary

violating_resource

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

Type

google.cloud.websecurityscanner_v1.types.ViolatingResource

vulnerable_headers

Output only. An addon containing information about vulnerable or missing HTTP headers.

Type

google.cloud.websecurityscanner_v1.types.VulnerableHeaders

vulnerable_parameters

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

Type

google.cloud.websecurityscanner_v1.types.VulnerableParameters

xss

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

Type

google.cloud.websecurityscanner_v1.types.Xss

xxe

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

Type

google.cloud.websecurityscanner_v1.types.Xxe

class Severity(value)[source]

Bases: proto.enums.Enum

The severity level of a vulnerability.

Values:
SEVERITY_UNSPECIFIED (0):

No severity specified. The default value.

CRITICAL (1):

Critical severity.

HIGH (2):

High severity.

MEDIUM (3):

Medium severity.

LOW (4):

Low severity.

class google.cloud.websecurityscanner_v1.types.FindingTypeStats(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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.

Type

str

finding_count

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

Type

int

class google.cloud.websecurityscanner_v1.types.Form(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

! Information about a vulnerability with an HTML.

action_uri

! The URI where to send the form when it’s submitted.

Type

str

fields

! The names of form fields related to the vulnerability.

Type

MutableSequence[str]

class google.cloud.websecurityscanner_v1.types.GetFindingRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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}’.

Type

str

class google.cloud.websecurityscanner_v1.types.GetScanConfigRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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}’.

Type

str

class google.cloud.websecurityscanner_v1.types.GetScanRunRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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}’.

Type

str

class google.cloud.websecurityscanner_v1.types.ListCrawledUrlsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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}’.

Type

str

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.

Type

str

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.

Type

int

class google.cloud.websecurityscanner_v1.types.ListCrawledUrlsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response for the ListCrawledUrls method.

crawled_urls

The list of CrawledUrls returned.

Type

MutableSequence[google.cloud.websecurityscanner_v1.types.CrawledUrl]

next_page_token

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

Type

str

class google.cloud.websecurityscanner_v1.types.ListFindingTypeStatsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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}’.

Type

str

class google.cloud.websecurityscanner_v1.types.ListFindingTypeStatsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response for the ListFindingTypeStats method.

finding_type_stats

The list of FindingTypeStats returned.

Type

MutableSequence[google.cloud.websecurityscanner_v1.types.FindingTypeStats]

class google.cloud.websecurityscanner_v1.types.ListFindingsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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}’.

Type

str

filter

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

Type

str

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.

Type

str

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.

Type

int

class google.cloud.websecurityscanner_v1.types.ListFindingsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response for the ListFindings method.

findings

The list of Findings returned.

Type

MutableSequence[google.cloud.websecurityscanner_v1.types.Finding]

next_page_token

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

Type

str

class google.cloud.websecurityscanner_v1.types.ListScanConfigsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for the ListScanConfigs method.

parent

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

Type

str

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.

Type

str

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.

Type

int

class google.cloud.websecurityscanner_v1.types.ListScanConfigsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response for the ListScanConfigs method.

scan_configs

The list of ScanConfigs returned.

Type

MutableSequence[google.cloud.websecurityscanner_v1.types.ScanConfig]

next_page_token

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

Type

str

class google.cloud.websecurityscanner_v1.types.ListScanRunsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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}’.

Type

str

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.

Type

str

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.

Type

int

class google.cloud.websecurityscanner_v1.types.ListScanRunsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response for the ListScanRuns method.

scan_runs

The list of ScanRuns returned.

Type

MutableSequence[google.cloud.websecurityscanner_v1.types.ScanRun]

next_page_token

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

Type

str

class google.cloud.websecurityscanner_v1.types.OutdatedLibrary(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Information reported for an outdated library.

library_name

The name of the outdated library.

Type

str

version

The version number.

Type

str

learn_more_urls

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

Type

MutableSequence[str]

class google.cloud.websecurityscanner_v1.types.ScanConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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.

Type

str

display_name

Required. The user provided display name of the ScanConfig.

Type

str

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.

Type

int

starting_urls

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

Type

MutableSequence[str]

authentication

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

Type

google.cloud.websecurityscanner_v1.types.ScanConfig.Authentication

user_agent

The user agent used during scanning.

Type

google.cloud.websecurityscanner_v1.types.ScanConfig.UserAgent

blacklist_patterns

The excluded URL patterns as described in https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls

Type

MutableSequence[str]

schedule

The schedule of the ScanConfig.

Type

google.cloud.websecurityscanner_v1.types.ScanConfig.Schedule

export_to_security_command_center

Controls export of scan configurations and results to Security Command Center.

Type

google.cloud.websecurityscanner_v1.types.ScanConfig.ExportToSecurityCommandCenter

risk_level

The risk level selected for the scan

Type

google.cloud.websecurityscanner_v1.types.ScanConfig.RiskLevel

managed_scan

Whether the scan config is managed by Web Security Scanner, output only.

Type

bool

static_ip_scan

Whether the scan configuration has enabled static IP address scan feature. If enabled, the scanner will access applications from static IP addresses.

Type

bool

ignore_http_status_errors

Whether to keep scanning even if most requests return HTTP error codes.

Type

bool

class Authentication(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Scan authentication configuration.

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

google_account

Authentication using a Google account.

This field is a member of oneof authentication.

Type

google.cloud.websecurityscanner_v1.types.ScanConfig.Authentication.GoogleAccount

custom_account

Authentication using a custom account.

This field is a member of oneof authentication.

Type

google.cloud.websecurityscanner_v1.types.ScanConfig.Authentication.CustomAccount

iap_credential

Authentication using Identity-Aware-Proxy (IAP).

This field is a member of oneof authentication.

Type

google.cloud.websecurityscanner_v1.types.ScanConfig.Authentication.IapCredential

class CustomAccount(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Describes authentication configuration that uses a custom account.

username

Required. The user name of the custom account.

Type

str

password

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

Type

str

login_url

Required. The login form URL of the website.

Type

str

class GoogleAccount(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Describes authentication configuration that uses a Google account.

username

Required. The user name of the Google account.

Type

str

password

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

Type

str

class IapCredential(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Describes authentication configuration for Identity-Aware-Proxy (IAP).

iap_test_service_account_info

Authentication configuration when Web-Security-Scanner service account is added in Identity-Aware-Proxy (IAP) access policies.

This field is a member of oneof iap_credentials.

Type

google.cloud.websecurityscanner_v1.types.ScanConfig.Authentication.IapCredential.IapTestServiceAccountInfo

class IapTestServiceAccountInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Describes authentication configuration when Web-Security-Scanner service account is added in Identity-Aware-Proxy (IAP) access policies.

target_audience_client_id

Required. Describes OAuth2 client id of resources protected by Identity-Aware-Proxy (IAP).

Type

str

class ExportToSecurityCommandCenter(value)[source]

Bases: proto.enums.Enum

Controls export of scan configurations and results to Security Command Center.

Values:
EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED (0):

Use default, which is ENABLED.

ENABLED (1):

Export results of this scan to Security Command Center.

DISABLED (2):

Do not export results of this scan to Security Command Center.

class RiskLevel(value)[source]

Bases: proto.enums.Enum

Scan risk levels supported by Web Security Scanner. LOW impact scanning will minimize requests with the potential to modify data. To achieve the maximum scan coverage, NORMAL risk level is recommended.

Values:
RISK_LEVEL_UNSPECIFIED (0):

Use default, which is NORMAL.

NORMAL (1):

Normal scanning (Recommended)

LOW (2):

Lower impact scanning

class Schedule(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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.

Type

google.protobuf.timestamp_pb2.Timestamp

interval_duration_days

Required. The duration of time between executions in days.

Type

int

class UserAgent(value)[source]

Bases: proto.enums.Enum

Type of user agents used for scanning.

Values:
USER_AGENT_UNSPECIFIED (0):

The user agent is unknown. Service will default to CHROME_LINUX.

CHROME_LINUX (1):

Chrome on Linux. This is the service default if unspecified.

CHROME_ANDROID (2):

Chrome on Android.

SAFARI_IPHONE (3):

Safari on IPhone.

class google.cloud.websecurityscanner_v1.types.ScanConfigError(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Defines a custom error message used by CreateScanConfig and UpdateScanConfig APIs when scan configuration validation fails. It is also reported as part of a ScanRunErrorTrace message if scan validation fails due to a scan configuration error.

code

Output only. Indicates the reason code for a configuration failure.

Type

google.cloud.websecurityscanner_v1.types.ScanConfigError.Code

field_name

Output only. Indicates the full name of the ScanConfig field that triggers this error, for example “scan_config.max_qps”. This field is provided for troubleshooting purposes only and its actual value can change in the future.

Type

str

class Code(value)[source]

Bases: proto.enums.Enum

Output only. Defines an error reason code. Next id: 44

Values:
CODE_UNSPECIFIED (0):

There is no error.

OK (0):

There is no error.

INTERNAL_ERROR (1):

Indicates an internal server error. Please DO NOT USE THIS ERROR CODE unless the root cause is truly unknown.

APPENGINE_API_BACKEND_ERROR (2):

One of the seed URLs is an App Engine URL but we cannot validate the scan settings due to an App Engine API backend error.

APPENGINE_API_NOT_ACCESSIBLE (3):

One of the seed URLs is an App Engine URL but we cannot access the App Engine API to validate scan settings.

APPENGINE_DEFAULT_HOST_MISSING (4):

One of the seed URLs is an App Engine URL but the Default Host of the App Engine is not set.

CANNOT_USE_GOOGLE_COM_ACCOUNT (6):

Google corporate accounts can not be used for scanning.

CANNOT_USE_OWNER_ACCOUNT (7):

The account of the scan creator can not be used for scanning.

COMPUTE_API_BACKEND_ERROR (8):

This scan targets Compute Engine, but we cannot validate scan settings due to a Compute Engine API backend error.

COMPUTE_API_NOT_ACCESSIBLE (9):

This scan targets Compute Engine, but we cannot access the Compute Engine API to validate the scan settings.

CUSTOM_LOGIN_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT (10):

The Custom Login URL does not belong to the current project.

CUSTOM_LOGIN_URL_MALFORMED (11):

The Custom Login URL is malformed (can not be parsed).

CUSTOM_LOGIN_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS (12):

The Custom Login URL is mapped to a non-routable IP address in DNS.

CUSTOM_LOGIN_URL_MAPPED_TO_UNRESERVED_ADDRESS (13):

The Custom Login URL is mapped to an IP address which is not reserved for the current project.

CUSTOM_LOGIN_URL_HAS_NON_ROUTABLE_IP_ADDRESS (14):

The Custom Login URL has a non-routable IP address.

CUSTOM_LOGIN_URL_HAS_UNRESERVED_IP_ADDRESS (15):

The Custom Login URL has an IP address which is not reserved for the current project.

DUPLICATE_SCAN_NAME (16):

Another scan with the same name (case-sensitive) already exists.

INVALID_FIELD_VALUE (18):

A field is set to an invalid value.

FAILED_TO_AUTHENTICATE_TO_TARGET (19):

There was an error trying to authenticate to the scan target.

FINDING_TYPE_UNSPECIFIED (20):

Finding type value is not specified in the list findings request.

FORBIDDEN_TO_SCAN_COMPUTE (21):

Scan targets Compute Engine, yet current project was not whitelisted for Google Compute Engine Scanning Alpha access.

FORBIDDEN_UPDATE_TO_MANAGED_SCAN (43):

User tries to update managed scan

MALFORMED_FILTER (22):

The supplied filter is malformed. For example, it can not be parsed, does not have a filter type in expression, or the same filter type appears more than once.

MALFORMED_RESOURCE_NAME (23):

The supplied resource name is malformed (can not be parsed).

PROJECT_INACTIVE (24):

The current project is not in an active state.

REQUIRED_FIELD (25):

A required field is not set.

RESOURCE_NAME_INCONSISTENT (26):

Project id, scanconfig id, scanrun id, or finding id are not consistent with each other in resource name.

SCAN_ALREADY_RUNNING (27):

The scan being requested to start is already running.

SCAN_NOT_RUNNING (28):

The scan that was requested to be stopped is not running.

SEED_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT (29):

One of the seed URLs does not belong to the current project.

SEED_URL_MALFORMED (30):

One of the seed URLs is malformed (can not be parsed).

SEED_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS (31):

One of the seed URLs is mapped to a non-routable IP address in DNS.

SEED_URL_MAPPED_TO_UNRESERVED_ADDRESS (32):

One of the seed URLs is mapped to an IP address which is not reserved for the current project.

SEED_URL_HAS_NON_ROUTABLE_IP_ADDRESS (33):

One of the seed URLs has on-routable IP address.

SEED_URL_HAS_UNRESERVED_IP_ADDRESS (35):

One of the seed URLs has an IP address that is not reserved for the current project.

SERVICE_ACCOUNT_NOT_CONFIGURED (36):

The Web Security Scanner service account is not configured under the project.

TOO_MANY_SCANS (37):

A project has reached the maximum number of scans.

UNABLE_TO_RESOLVE_PROJECT_INFO (38):

Resolving the details of the current project fails.

UNSUPPORTED_BLACKLIST_PATTERN_FORMAT (39):

One or more blacklist patterns were in the wrong format.

UNSUPPORTED_FILTER (40):

The supplied filter is not supported.

UNSUPPORTED_FINDING_TYPE (41):

The supplied finding type is not supported. For example, we do not provide findings of the given finding type.

UNSUPPORTED_URL_SCHEME (42):

The URL scheme of one or more of the supplied URLs is not supported.

class google.cloud.websecurityscanner_v1.types.ScanRun(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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

name

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.

Type

str

execution_state

Output only. The execution state of the ScanRun.

Type

google.cloud.websecurityscanner_v1.types.ScanRun.ExecutionState

result_state

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

Type

google.cloud.websecurityscanner_v1.types.ScanRun.ResultState

start_time

Output only. The time at which the ScanRun started.

Type

google.protobuf.timestamp_pb2.Timestamp

end_time

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

Type

google.protobuf.timestamp_pb2.Timestamp

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.

Type

int

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.

Type

int

has_vulnerabilities

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

Type

bool

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.

Type

int

error_trace

Output only. If result_state is an ERROR, this field provides the primary reason for scan’s termination and more details, if such are available.

Type

google.cloud.websecurityscanner_v1.types.ScanRunErrorTrace

warning_traces

Output only. A list of warnings, if such are encountered during this scan run.

Type

MutableSequence[google.cloud.websecurityscanner_v1.types.ScanRunWarningTrace]

class ExecutionState(value)[source]

Bases: proto.enums.Enum

Types of ScanRun execution state.

Values:
EXECUTION_STATE_UNSPECIFIED (0):

Represents an invalid state caused by internal server error. This value should never be returned.

QUEUED (1):

The scan is waiting in the queue.

SCANNING (2):

The scan is in progress.

FINISHED (3):

The scan is either finished or stopped by user.

class ResultState(value)[source]

Bases: proto.enums.Enum

Types of ScanRun result state.

Values:
RESULT_STATE_UNSPECIFIED (0):

Default value. This value is returned when the ScanRun is not yet finished.

SUCCESS (1):

The scan finished without errors.

ERROR (2):

The scan finished with errors.

KILLED (3):

The scan was terminated by user.

class google.cloud.websecurityscanner_v1.types.ScanRunErrorTrace(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Output only. Defines an error trace message for a ScanRun.

code

Output only. Indicates the error reason code.

Type

google.cloud.websecurityscanner_v1.types.ScanRunErrorTrace.Code

scan_config_error

Output only. If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error message encountered during scan configuration validation that is performed before each scan run.

Type

google.cloud.websecurityscanner_v1.types.ScanConfigError

most_common_http_error_code

Output only. If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most common HTTP error code, if such is available. For example, if this code is 404, the scan has encountered too many NOT_FOUND responses.

Type

int

class Code(value)[source]

Bases: proto.enums.Enum

Output only. Defines an error reason code. Next id: 8

Values:
CODE_UNSPECIFIED (0):

Default value is never used.

INTERNAL_ERROR (1):

Indicates that the scan run failed due to an internal server error.

SCAN_CONFIG_ISSUE (2):

Indicates a scan configuration error, usually due to outdated ScanConfig settings, such as starting_urls or the DNS configuration.

AUTHENTICATION_CONFIG_ISSUE (3):

Indicates an authentication error, usually due to outdated ScanConfig authentication settings.

TIMED_OUT_WHILE_SCANNING (4):

Indicates a scan operation timeout, usually caused by a very large site.

TOO_MANY_REDIRECTS (5):

Indicates that a scan encountered excessive redirects, either to authentication or some other page outside of the scan scope.

TOO_MANY_HTTP_ERRORS (6):

Indicates that a scan encountered numerous errors from the web site pages. When available, most_common_http_error_code field indicates the most common HTTP error code encountered during the scan.

class google.cloud.websecurityscanner_v1.types.ScanRunLog(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A ScanRunLog is an output-only proto used for Stackdriver customer logging. It is used for logs covering the start and end of scan pipelines. Other than an added summary, this is a subset of the ScanRun. Representation in logs is either a proto Struct, or converted to JSON. Next id: 9

summary

Human friendly message about the event.

Type

str

name

The resource name of the ScanRun being logged.

Type

str

execution_state

The execution state of the ScanRun.

Type

google.cloud.websecurityscanner_v1.types.ScanRun.ExecutionState

result_state

The result state of the ScanRun.

Type

google.cloud.websecurityscanner_v1.types.ScanRun.ResultState

urls_crawled_count
Type

int

urls_tested_count
Type

int

has_findings
Type

bool

error_trace
Type

google.cloud.websecurityscanner_v1.types.ScanRunErrorTrace

class google.cloud.websecurityscanner_v1.types.ScanRunWarningTrace(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Output only. Defines a warning trace message for ScanRun. Warning traces provide customers with useful information that helps make the scanning process more effective.

code

Output only. Indicates the warning code.

Type

google.cloud.websecurityscanner_v1.types.ScanRunWarningTrace.Code

class Code(value)[source]

Bases: proto.enums.Enum

Output only. Defines a warning message code. Next id: 6

Values:
CODE_UNSPECIFIED (0):

Default value is never used.

INSUFFICIENT_CRAWL_RESULTS (1):

Indicates that a scan discovered an unexpectedly low number of URLs. This is sometimes caused by complex navigation features or by using a single URL for numerous pages.

TOO_MANY_CRAWL_RESULTS (2):

Indicates that a scan discovered too many URLs to test, or excessive redundant URLs.

TOO_MANY_FUZZ_TASKS (3):

Indicates that too many tests have been generated for the scan. Customer should try reducing the number of starting URLs, increasing the QPS rate, or narrowing down the scope of the scan using the excluded patterns.

BLOCKED_BY_IAP (4):

Indicates that a scan is blocked by IAP.

NO_STARTING_URL_FOUND_FOR_MANAGED_SCAN (5):

Indicates that no seeds is found for a scan

class google.cloud.websecurityscanner_v1.types.StartScanRunRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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}’.

Type

str

class google.cloud.websecurityscanner_v1.types.StopScanRunRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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}’.

Type

str

class google.cloud.websecurityscanner_v1.types.UpdateScanConfigRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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.

Type

google.cloud.websecurityscanner_v1.types.ScanConfig

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

Type

google.protobuf.field_mask_pb2.FieldMask

class google.cloud.websecurityscanner_v1.types.ViolatingResource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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

content_type

The MIME type of this resource.

Type

str

resource_url

URL of this violating resource.

Type

str

class google.cloud.websecurityscanner_v1.types.VulnerableHeaders(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Information about vulnerable or missing HTTP Headers.

headers

List of vulnerable headers.

Type

MutableSequence[google.cloud.websecurityscanner_v1.types.VulnerableHeaders.Header]

missing_headers

List of missing headers.

Type

MutableSequence[google.cloud.websecurityscanner_v1.types.VulnerableHeaders.Header]

class Header(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Describes a HTTP Header.

name

Header name.

Type

str

value

Header value.

Type

str

class google.cloud.websecurityscanner_v1.types.VulnerableParameters(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Information about vulnerable request parameters.

parameter_names

The vulnerable parameter names.

Type

MutableSequence[str]

class google.cloud.websecurityscanner_v1.types.Xss(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Information reported for an XSS.

stack_traces

Stack traces leading to the point where the XSS occurred.

Type

MutableSequence[str]

error_message

An error message generated by a javascript breakage.

Type

str

attack_vector

The attack vector of the payload triggering this XSS.

Type

google.cloud.websecurityscanner_v1.types.Xss.AttackVector

stored_xss_seeding_url

The reproduction url for the seeding POST request of a Stored XSS.

Type

str

class AttackVector(value)[source]

Bases: proto.enums.Enum

Types of XSS attack vector.

Values:
ATTACK_VECTOR_UNSPECIFIED (0):

Unknown attack vector.

LOCAL_STORAGE (1):

The attack comes from fuzzing the browser’s localStorage.

SESSION_STORAGE (2):

The attack comes from fuzzing the browser’s sessionStorage.

WINDOW_NAME (3):

The attack comes from fuzzing the window’s name property.

REFERRER (4):

The attack comes from fuzzing the referrer property.

FORM_INPUT (5):

The attack comes from fuzzing an input element.

COOKIE (6):

The attack comes from fuzzing the browser’s cookies.

POST_MESSAGE (7):

The attack comes from hijacking the post messaging mechanism.

GET_PARAMETERS (8):

The attack comes from fuzzing parameters in the url.

URL_FRAGMENT (9):

The attack comes from fuzzing the fragment in the url.

HTML_COMMENT (10):

The attack comes from fuzzing the HTML comments.

POST_PARAMETERS (11):

The attack comes from fuzzing the POST parameters.

PROTOCOL (12):

The attack comes from fuzzing the protocol.

STORED_XSS (13):

The attack comes from the server side and is stored.

SAME_ORIGIN (14):

The attack is a Same-Origin Method Execution attack via a GET parameter.

USER_CONTROLLABLE_URL (15):

The attack payload is received from a third-party host via a URL that is user-controllable

class google.cloud.websecurityscanner_v1.types.Xxe(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Information reported for an XXE.

payload_value

The XML string that triggered the XXE vulnerability. Non-payload values might be redacted.

Type

str

payload_location

Location within the request where the payload was placed.

Type

google.cloud.websecurityscanner_v1.types.Xxe.Location

class Location(value)[source]

Bases: proto.enums.Enum

Locations within a request where XML was substituted.

Values:
LOCATION_UNSPECIFIED (0):

Unknown Location.

COMPLETE_REQUEST_BODY (1):

The XML payload replaced the complete request body.