Package com.google.cloud.websecurityscanner.v1alpha (2.21.0)

A client to Web Security Scanner API

The interfaces provided are listed below, along with usage samples.

WebSecurityScannerClient

Service Description: Cloud Web Security Scanner Service identifies security vulnerabilities in web applications hosted on Google Cloud Platform. It crawls your application, and attempts to exercise as many user inputs and event handlers as possible.

Sample for WebSecurityScannerClient:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WebSecurityScannerClient webSecurityScannerClient = WebSecurityScannerClient.create()) {
   ProjectName parent = ProjectName.of("[PROJECT]");
   ScanConfig scanConfig = ScanConfig.newBuilder().build();
   ScanConfig response = webSecurityScannerClient.createScanConfig(parent, scanConfig);
 }
 

Classes

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.

Protobuf type google.cloud.websecurityscanner.v1alpha.CrawledUrl

CrawledUrl.Builder

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.

Protobuf type google.cloud.websecurityscanner.v1alpha.CrawledUrl

CrawledUrlProto

CreateScanConfigRequest

Request for the CreateScanConfig method.

Protobuf type google.cloud.websecurityscanner.v1alpha.CreateScanConfigRequest

CreateScanConfigRequest.Builder

Request for the CreateScanConfig method.

Protobuf type google.cloud.websecurityscanner.v1alpha.CreateScanConfigRequest

DeleteScanConfigRequest

Request for the DeleteScanConfig method.

Protobuf type google.cloud.websecurityscanner.v1alpha.DeleteScanConfigRequest

DeleteScanConfigRequest.Builder

Request for the DeleteScanConfig method.

Protobuf type google.cloud.websecurityscanner.v1alpha.DeleteScanConfigRequest

Finding

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

Protobuf type google.cloud.websecurityscanner.v1alpha.Finding

Finding.Builder

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

Protobuf type google.cloud.websecurityscanner.v1alpha.Finding

FindingAddonProto

FindingName

FindingName.Builder

Builder for projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}/findings/{finding}.

FindingProto

FindingTypeStats

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

Protobuf type google.cloud.websecurityscanner.v1alpha.FindingTypeStats

FindingTypeStats.Builder

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

Protobuf type google.cloud.websecurityscanner.v1alpha.FindingTypeStats

FindingTypeStatsProto

GetFindingRequest

Request for the GetFinding method.

Protobuf type google.cloud.websecurityscanner.v1alpha.GetFindingRequest

GetFindingRequest.Builder

Request for the GetFinding method.

Protobuf type google.cloud.websecurityscanner.v1alpha.GetFindingRequest

GetScanConfigRequest

Request for the GetScanConfig method.

Protobuf type google.cloud.websecurityscanner.v1alpha.GetScanConfigRequest

GetScanConfigRequest.Builder

Request for the GetScanConfig method.

Protobuf type google.cloud.websecurityscanner.v1alpha.GetScanConfigRequest

GetScanRunRequest

Request for the GetScanRun method.

Protobuf type google.cloud.websecurityscanner.v1alpha.GetScanRunRequest

GetScanRunRequest.Builder

Request for the GetScanRun method.

Protobuf type google.cloud.websecurityscanner.v1alpha.GetScanRunRequest

ListCrawledUrlsRequest

Request for the ListCrawledUrls method.

Protobuf type google.cloud.websecurityscanner.v1alpha.ListCrawledUrlsRequest

ListCrawledUrlsRequest.Builder

Request for the ListCrawledUrls method.

Protobuf type google.cloud.websecurityscanner.v1alpha.ListCrawledUrlsRequest

ListCrawledUrlsResponse

Response for the ListCrawledUrls method.

Protobuf type google.cloud.websecurityscanner.v1alpha.ListCrawledUrlsResponse

ListCrawledUrlsResponse.Builder

Response for the ListCrawledUrls method.

Protobuf type google.cloud.websecurityscanner.v1alpha.ListCrawledUrlsResponse

ListFindingTypeStatsRequest

Request for the ListFindingTypeStats method.

Protobuf type google.cloud.websecurityscanner.v1alpha.ListFindingTypeStatsRequest

ListFindingTypeStatsRequest.Builder

Request for the ListFindingTypeStats method.

Protobuf type google.cloud.websecurityscanner.v1alpha.ListFindingTypeStatsRequest

ListFindingTypeStatsResponse

Response for the ListFindingTypeStats method.

Protobuf type google.cloud.websecurityscanner.v1alpha.ListFindingTypeStatsResponse

ListFindingTypeStatsResponse.Builder

Response for the ListFindingTypeStats method.

Protobuf type google.cloud.websecurityscanner.v1alpha.ListFindingTypeStatsResponse

ListFindingsRequest

Request for the ListFindings method.

Protobuf type google.cloud.websecurityscanner.v1alpha.ListFindingsRequest

ListFindingsRequest.Builder

Request for the ListFindings method.

Protobuf type google.cloud.websecurityscanner.v1alpha.ListFindingsRequest

ListFindingsResponse

Response for the ListFindings method.

Protobuf type google.cloud.websecurityscanner.v1alpha.ListFindingsResponse

ListFindingsResponse.Builder

Response for the ListFindings method.

Protobuf type google.cloud.websecurityscanner.v1alpha.ListFindingsResponse

ListScanConfigsRequest

Request for the ListScanConfigs method.

Protobuf type google.cloud.websecurityscanner.v1alpha.ListScanConfigsRequest

ListScanConfigsRequest.Builder

Request for the ListScanConfigs method.

Protobuf type google.cloud.websecurityscanner.v1alpha.ListScanConfigsRequest

ListScanConfigsResponse

Response for the ListScanConfigs method.

Protobuf type google.cloud.websecurityscanner.v1alpha.ListScanConfigsResponse

ListScanConfigsResponse.Builder

Response for the ListScanConfigs method.

Protobuf type google.cloud.websecurityscanner.v1alpha.ListScanConfigsResponse

ListScanRunsRequest

Request for the ListScanRuns method.

Protobuf type google.cloud.websecurityscanner.v1alpha.ListScanRunsRequest

ListScanRunsRequest.Builder

Request for the ListScanRuns method.

Protobuf type google.cloud.websecurityscanner.v1alpha.ListScanRunsRequest

ListScanRunsResponse

Response for the ListScanRuns method.

Protobuf type google.cloud.websecurityscanner.v1alpha.ListScanRunsResponse

ListScanRunsResponse.Builder

Response for the ListScanRuns method.

Protobuf type google.cloud.websecurityscanner.v1alpha.ListScanRunsResponse

OutdatedLibrary

Information reported for an outdated library.

Protobuf type google.cloud.websecurityscanner.v1alpha.OutdatedLibrary

OutdatedLibrary.Builder

Information reported for an outdated library.

Protobuf type google.cloud.websecurityscanner.v1alpha.OutdatedLibrary

ProjectName

ProjectName.Builder

Builder for projects/{project}.

ScanConfig

A ScanConfig resource contains the configurations to launch a scan. next id: 12

Protobuf type google.cloud.websecurityscanner.v1alpha.ScanConfig

ScanConfig.Authentication

Scan authentication configuration.

Protobuf type google.cloud.websecurityscanner.v1alpha.ScanConfig.Authentication

ScanConfig.Authentication.Builder

Scan authentication configuration.

Protobuf type google.cloud.websecurityscanner.v1alpha.ScanConfig.Authentication

ScanConfig.Authentication.CustomAccount

Describes authentication configuration that uses a custom account.

Protobuf type google.cloud.websecurityscanner.v1alpha.ScanConfig.Authentication.CustomAccount

ScanConfig.Authentication.CustomAccount.Builder

Describes authentication configuration that uses a custom account.

Protobuf type google.cloud.websecurityscanner.v1alpha.ScanConfig.Authentication.CustomAccount

ScanConfig.Authentication.GoogleAccount

Describes authentication configuration that uses a Google account.

Protobuf type google.cloud.websecurityscanner.v1alpha.ScanConfig.Authentication.GoogleAccount

ScanConfig.Authentication.GoogleAccount.Builder

Describes authentication configuration that uses a Google account.

Protobuf type google.cloud.websecurityscanner.v1alpha.ScanConfig.Authentication.GoogleAccount

ScanConfig.Builder

A ScanConfig resource contains the configurations to launch a scan. next id: 12

Protobuf type google.cloud.websecurityscanner.v1alpha.ScanConfig

ScanConfig.Schedule

Scan schedule configuration.

Protobuf type google.cloud.websecurityscanner.v1alpha.ScanConfig.Schedule

ScanConfig.Schedule.Builder

Scan schedule configuration.

Protobuf type google.cloud.websecurityscanner.v1alpha.ScanConfig.Schedule

ScanConfigName

ScanConfigName.Builder

Builder for projects/{project}/scanConfigs/{scan_config}.

ScanConfigProto

ScanRun

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

Protobuf type google.cloud.websecurityscanner.v1alpha.ScanRun

ScanRun.Builder

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

Protobuf type google.cloud.websecurityscanner.v1alpha.ScanRun

ScanRunName

ScanRunName.Builder

Builder for projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}.

ScanRunProto

StartScanRunRequest

Request for the StartScanRun method.

Protobuf type google.cloud.websecurityscanner.v1alpha.StartScanRunRequest

StartScanRunRequest.Builder

Request for the StartScanRun method.

Protobuf type google.cloud.websecurityscanner.v1alpha.StartScanRunRequest

StopScanRunRequest

Request for the StopScanRun method.

Protobuf type google.cloud.websecurityscanner.v1alpha.StopScanRunRequest

StopScanRunRequest.Builder

Request for the StopScanRun method.

Protobuf type google.cloud.websecurityscanner.v1alpha.StopScanRunRequest

UpdateScanConfigRequest

Request for the UpdateScanConfigRequest method.

Protobuf type google.cloud.websecurityscanner.v1alpha.UpdateScanConfigRequest

UpdateScanConfigRequest.Builder

Request for the UpdateScanConfigRequest method.

Protobuf type google.cloud.websecurityscanner.v1alpha.UpdateScanConfigRequest

ViolatingResource

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

Protobuf type google.cloud.websecurityscanner.v1alpha.ViolatingResource

ViolatingResource.Builder

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

Protobuf type google.cloud.websecurityscanner.v1alpha.ViolatingResource

VulnerableHeaders

Information about vulnerable or missing HTTP Headers.

Protobuf type google.cloud.websecurityscanner.v1alpha.VulnerableHeaders

VulnerableHeaders.Builder

Information about vulnerable or missing HTTP Headers.

Protobuf type google.cloud.websecurityscanner.v1alpha.VulnerableHeaders

VulnerableHeaders.Header

Describes a HTTP Header.

Protobuf type google.cloud.websecurityscanner.v1alpha.VulnerableHeaders.Header

VulnerableHeaders.Header.Builder

Describes a HTTP Header.

Protobuf type google.cloud.websecurityscanner.v1alpha.VulnerableHeaders.Header

VulnerableParameters

Information about vulnerable request parameters.

Protobuf type google.cloud.websecurityscanner.v1alpha.VulnerableParameters

VulnerableParameters.Builder

Information about vulnerable request parameters.

Protobuf type google.cloud.websecurityscanner.v1alpha.VulnerableParameters

WebSecurityScannerClient

Service Description: Cloud Web Security Scanner Service identifies security vulnerabilities in web applications hosted on Google Cloud Platform. It crawls your application, and attempts to exercise as many user inputs and event handlers as possible.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WebSecurityScannerClient webSecurityScannerClient = WebSecurityScannerClient.create()) {
   ProjectName parent = ProjectName.of("[PROJECT]");
   ScanConfig scanConfig = ScanConfig.newBuilder().build();
   ScanConfig response = webSecurityScannerClient.createScanConfig(parent, scanConfig);
 }
 

Note: close() needs to be called on the WebSecurityScannerClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

The surface of this class includes several types of Java methods for each of the API's methods:

  1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
  2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
  3. A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of WebSecurityScannerSettings to create(). For example:

To customize credentials:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 WebSecurityScannerSettings webSecurityScannerSettings =
     WebSecurityScannerSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 WebSecurityScannerClient webSecurityScannerClient =
     WebSecurityScannerClient.create(webSecurityScannerSettings);
 

To customize the endpoint:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 WebSecurityScannerSettings webSecurityScannerSettings =
     WebSecurityScannerSettings.newBuilder().setEndpoint(myEndpoint).build();
 WebSecurityScannerClient webSecurityScannerClient =
     WebSecurityScannerClient.create(webSecurityScannerSettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 WebSecurityScannerSettings webSecurityScannerSettings =
     WebSecurityScannerSettings.newHttpJsonBuilder().build();
 WebSecurityScannerClient webSecurityScannerClient =
     WebSecurityScannerClient.create(webSecurityScannerSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

WebSecurityScannerClient.ListCrawledUrlsFixedSizeCollection

WebSecurityScannerClient.ListCrawledUrlsPage

WebSecurityScannerClient.ListCrawledUrlsPagedResponse

WebSecurityScannerClient.ListFindingsFixedSizeCollection

WebSecurityScannerClient.ListFindingsPage

WebSecurityScannerClient.ListFindingsPagedResponse

WebSecurityScannerClient.ListScanConfigsFixedSizeCollection

WebSecurityScannerClient.ListScanConfigsPage

WebSecurityScannerClient.ListScanConfigsPagedResponse

WebSecurityScannerClient.ListScanRunsFixedSizeCollection

WebSecurityScannerClient.ListScanRunsPage

WebSecurityScannerClient.ListScanRunsPagedResponse

WebSecurityScannerGrpc

Cloud Web Security Scanner Service identifies security vulnerabilities in web applications hosted on Google Cloud Platform. It crawls your application, and attempts to exercise as many user inputs and event handlers as possible.

WebSecurityScannerGrpc.WebSecurityScannerBlockingStub

A stub to allow clients to do synchronous rpc calls to service WebSecurityScanner.

Cloud Web Security Scanner Service identifies security vulnerabilities in web applications hosted on Google Cloud Platform. It crawls your application, and attempts to exercise as many user inputs and event handlers as possible.

WebSecurityScannerGrpc.WebSecurityScannerFutureStub

A stub to allow clients to do ListenableFuture-style rpc calls to service WebSecurityScanner.

Cloud Web Security Scanner Service identifies security vulnerabilities in web applications hosted on Google Cloud Platform. It crawls your application, and attempts to exercise as many user inputs and event handlers as possible.

WebSecurityScannerGrpc.WebSecurityScannerImplBase

Base class for the server implementation of the service WebSecurityScanner.

Cloud Web Security Scanner Service identifies security vulnerabilities in web applications hosted on Google Cloud Platform. It crawls your application, and attempts to exercise as many user inputs and event handlers as possible.

WebSecurityScannerGrpc.WebSecurityScannerStub

A stub to allow clients to do asynchronous rpc calls to service WebSecurityScanner.

Cloud Web Security Scanner Service identifies security vulnerabilities in web applications hosted on Google Cloud Platform. It crawls your application, and attempts to exercise as many user inputs and event handlers as possible.

WebSecurityScannerProto

WebSecurityScannerSettings

Settings class to configure an instance of WebSecurityScannerClient.

The default instance has everything set to sensible defaults:

  • The default service address (websecurityscanner.googleapis.com) and default port (443) are used.
  • Credentials are acquired automatically through Application Default Credentials.
  • Retries are configured for idempotent methods but not for non-idempotent methods.

The builder of this class is recursive, so contained classes are themselves builders. When build() is called, the tree of builders is called to create the complete settings object.

For example, to set the total timeout of createScanConfig to 30 seconds:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 WebSecurityScannerSettings.Builder webSecurityScannerSettingsBuilder =
     WebSecurityScannerSettings.newBuilder();
 webSecurityScannerSettingsBuilder
     .createScanConfigSettings()
     .setRetrySettings(
         webSecurityScannerSettingsBuilder
             .createScanConfigSettings()
             .getRetrySettings()
             .toBuilder()
             .setTotalTimeout(Duration.ofSeconds(30))
             .build());
 WebSecurityScannerSettings webSecurityScannerSettings =
     webSecurityScannerSettingsBuilder.build();
 

WebSecurityScannerSettings.Builder

Builder for WebSecurityScannerSettings.

Xss

Information reported for an XSS.

Protobuf type google.cloud.websecurityscanner.v1alpha.Xss

Xss.Builder

Information reported for an XSS.

Protobuf type google.cloud.websecurityscanner.v1alpha.Xss

Interfaces

CrawledUrlOrBuilder

CreateScanConfigRequestOrBuilder

DeleteScanConfigRequestOrBuilder

FindingOrBuilder

FindingTypeStatsOrBuilder

GetFindingRequestOrBuilder

GetScanConfigRequestOrBuilder

GetScanRunRequestOrBuilder

ListCrawledUrlsRequestOrBuilder

ListCrawledUrlsResponseOrBuilder

ListFindingTypeStatsRequestOrBuilder

ListFindingTypeStatsResponseOrBuilder

ListFindingsRequestOrBuilder

ListFindingsResponseOrBuilder

ListScanConfigsRequestOrBuilder

ListScanConfigsResponseOrBuilder

ListScanRunsRequestOrBuilder

ListScanRunsResponseOrBuilder

OutdatedLibraryOrBuilder

ScanConfig.Authentication.CustomAccountOrBuilder

ScanConfig.Authentication.GoogleAccountOrBuilder

ScanConfig.AuthenticationOrBuilder

ScanConfig.ScheduleOrBuilder

ScanConfigOrBuilder

ScanRunOrBuilder

StartScanRunRequestOrBuilder

StopScanRunRequestOrBuilder

UpdateScanConfigRequestOrBuilder

ViolatingResourceOrBuilder

VulnerableHeaders.HeaderOrBuilder

VulnerableHeadersOrBuilder

VulnerableParametersOrBuilder

WebSecurityScannerGrpc.AsyncService

Cloud Web Security Scanner Service identifies security vulnerabilities in web applications hosted on Google Cloud Platform. It crawls your application, and attempts to exercise as many user inputs and event handlers as possible.

XssOrBuilder

Enums

Finding.FindingType

Types of Findings.

Protobuf enum google.cloud.websecurityscanner.v1alpha.Finding.FindingType

ScanConfig.Authentication.AuthenticationCase

ScanConfig.TargetPlatform

Cloud platforms supported by Cloud Web Security Scanner.

Protobuf enum google.cloud.websecurityscanner.v1alpha.ScanConfig.TargetPlatform

ScanConfig.UserAgent

Type of user agents used for scanning.

Protobuf enum google.cloud.websecurityscanner.v1alpha.ScanConfig.UserAgent

ScanRun.ExecutionState

Types of ScanRun execution state.

Protobuf enum google.cloud.websecurityscanner.v1alpha.ScanRun.ExecutionState

ScanRun.ResultState

Types of ScanRun result state.

Protobuf enum google.cloud.websecurityscanner.v1alpha.ScanRun.ResultState