REST Resource: projects.scanConfigs

Resource: ScanConfig

A ScanConfig resource contains the configurations to launch a scan.

JSON representation
{
  "name": string,
  "displayName": string,
  "maxQps": number,
  "startingUrls": [
    string
  ],
  "authentication": {
    object(Authentication)
  },
  "userAgent": enum(UserAgent),
  "blacklistPatterns": [
    string
  ],
  "schedule": {
    object(Schedule)
  },
  "targetPlatforms": [
    enum(TargetPlatform)
  ]
}
Fields
name

string

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

displayName

string

Required. The user provided display name of the ScanConfig.

maxQps

number

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.

startingUrls[]

string

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

authentication

object(Authentication)

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

userAgent

enum(UserAgent)

The user agent used during scanning.

blacklistPatterns[]

string

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

schedule

object(Schedule)

The schedule of the ScanConfig.

targetPlatforms[]

enum(TargetPlatform)

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

Authentication

Scan authentication configuration.

JSON representation
{

  // Union field authentication can be only one of the following:
  "googleAccount": {
    object(GoogleAccount)
  },
  "customAccount": {
    object(CustomAccount)
  }
  // End of list of possible types for union field authentication.
}
Fields
Union field authentication. Required. Authentication configuration authentication can be only one of the following:
googleAccount

object(GoogleAccount)

Authentication using a Google account.

customAccount

object(CustomAccount)

Authentication using a custom account.

GoogleAccount

Describes authentication configuration that uses a Google account.

JSON representation
{
  "username": string,
  "password": string
}
Fields
username

string

Required. The user name of the Google account.

password

string

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

CustomAccount

Describes authentication configuration that uses a custom account.

JSON representation
{
  "username": string,
  "password": string,
  "loginUrl": string
}
Fields
username

string

Required. The user name of the custom account.

password

string

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

loginUrl

string

Required. The login form URL of the website.

UserAgent

Type of user agents used for scanning.

Enums
USER_AGENT_UNSPECIFIED The user agent is unknown. Service will default to CHROME_LINUX.
CHROME_LINUX Chrome on Linux. This is the service default if unspecified.
CHROME_ANDROID Chrome on Android.
SAFARI_IPHONE Safari on IPhone.

Schedule

Scan schedule configuration.

JSON representation
{
  "scheduleTime": string,
  "intervalDurationDays": number
}
Fields
scheduleTime

string (Timestamp format)

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.

A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

intervalDurationDays

number

Required. The duration of time between executions in days.

TargetPlatform

Cloud platforms supported by Cloud Web Security Scanner.

Enums
TARGET_PLATFORM_UNSPECIFIED The target platform is unknown. Requests with this enum value will be rejected with INVALID_ARGUMENT error.
APP_ENGINE Google App Engine service.
COMPUTE Google Compute Engine service.

Methods

create

Creates a new ScanConfig.

delete

Deletes an existing ScanConfig and its child resources.

get

Gets a ScanConfig.

list

Lists ScanConfigs under a given project.

patch

Updates a ScanConfig.

start

Start a ScanRun according to the given ScanConfig.
Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Security Scanner