REST Resource: projects.scanConfigs

资源:ScanConfig

ScanConfig 资源包含启动扫描的配置。

JSON 表示法
{
  "name": string,
  "displayName": string,
  "maxQps": integer,
  "startingUrls": [
    string
  ],
  "authentication": {
    object (Authentication)
  },
  "userAgent": enum (UserAgent),
  "blacklistPatterns": [
    string
  ],
  "schedule": {
    object (Schedule)
  },
  "exportToSecurityCommandCenter": enum (ExportToSecurityCommandCenter),
  "riskLevel": enum (RiskLevel),
  "managedScan": boolean,
  "staticIpScan": boolean,
  "ignoreHttpStatusErrors": boolean
}
字段
name

string

ScanConfig 的资源名称。该名称采用“projects/{projectId}/scanConfigs/{scanConfigId}”格式。ScanConfig ID 由系统生成。

displayName

string

必需。由用户提供的 ScanConfig 显示名称。

maxQps

integer

扫描期间的最大 QPS。有效值的范围为 5 至 20(包括端点值)。如果该字段未指定或其值设置为 0,则服务器将默认为 15。超出 [5,20] 范围的其他值会因导致 INVALID_ARGUMENT 错误而被拒绝。

startingUrls[]

string

必需。扫描器找到网站页面的起始网址。

authentication

object (Authentication)

身份验证配置。如果已指定,服务将在扫描期间使用此身份验证配置。

userAgent

enum (UserAgent)

扫描期间使用的用户代理。

blacklistPatterns[]

string

https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls 中所述的排除网址格式

schedule

object (Schedule)

ScanConfig 的时间表。

exportToSecurityCommandCenter

enum (ExportToSecurityCommandCenter)

用于控制是否将扫描配置和结果导出到 Security Command Center。

riskLevel

enum (RiskLevel)

为扫描选择的风险级别

managedScan

boolean

扫描配置是否由 Web Security Scanner 管理,仅输出。

staticIpScan

boolean

扫描配置是否启用了静态 IP 地址扫描功能。启用后,扫描器将通过静态 IP 地址访问应用。

ignoreHttpStatusErrors

boolean

即使大多数请求返回 HTTP 错误代码,也是否继续扫描。

身份验证

扫描身份验证配置。

JSON 表示法
{

  // Union field authentication can be only one of the following:
  "googleAccount": {
    object (GoogleAccount)
  },
  "customAccount": {
    object (CustomAccount)
  },
  "iapCredential": {
    object (IapCredential)
  }
  // End of list of possible types for union field authentication.
}
字段
联合字段 authentication。必需。身份验证配置 authentication 只能是以下任一项:
googleAccount
(deprecated)

object (GoogleAccount)

使用 Google 账号进行身份验证。

customAccount

object (CustomAccount)

使用自定义账号进行身份验证。

iapCredential

object (IapCredential)

使用 Identity-Aware-Proxy (IAP) 进行身份验证。

GoogleAccount

描述使用 Google 账号的身份验证配置。

JSON 表示法
{
  "username": string,
  "password": string
}
字段
username

string

必需。Google 账号的用户名。

password

string

必需。仅限输入。Google 账号的密码。凭据以加密方式存储,并且不会在任何响应中返回,也不会包含在审核日志中。

CustomAccount

描述使用自定义账号的身份验证配置。

JSON 表示法
{
  "username": string,
  "password": string,
  "loginUrl": string
}
字段
username

string

必需。自定义账号的用户名。

password

string

必需。仅限输入。自定义账号的密码。凭据以加密方式存储,并且不会在任何响应中返回,也不会包含在审核日志中。

loginUrl

string

必需。网站的登录表单网址。

IapCredential

介绍了 Identity-Aware-Proxy (IAP) 的身份验证配置。

JSON 表示法
{

  // Union field iap_credentials can be only one of the following:
  "iapTestServiceAccountInfo": {
    object (IapTestServiceAccountInfo)
  }
  // End of list of possible types for union field iap_credentials.
}
字段
联合字段 iap_credentials。Identity-Aware-Proxy (IAP) 身份验证配置 iap_credentials 只能是以下项之一:
iapTestServiceAccountInfo

object (IapTestServiceAccountInfo)

在 Identity-Aware-Proxy (IAP) 访问权限政策中添加 Web-Security-Scanner 服务账号时的身份验证配置。

IapTestServiceAccountInfo

介绍在 Identity-Aware-Proxy (IAP) 访问权限政策中添加 Web-Security-Scanner 服务账号时的身份验证配置。

JSON 表示法
{
  "targetAudienceClientId": string
}
字段
targetAudienceClientId

string

必需。介绍了受 Identity-Aware-Proxy (IAP) 保护的资源的 OAuth2 客户端 ID。

UserAgent

用于扫描的用户代理的类型。

枚举
USER_AGENT_UNSPECIFIED 用户代理未知。服务会默认为 CHROME_LINUX。
CHROME_LINUX Linux 上的 Chrome。如果未指定,则为服务默认值。
CHROME_ANDROID Android 上的 Chrome。
SAFARI_IPHONE iPhone 上的 Safari。

Schedule

扫描时间安排配置。

JSON 表示法
{
  "scheduleTime": string,
  "intervalDurationDays": integer
}
字段
scheduleTime

string (Timestamp format)

时间戳指示何时将安排下一次运行。每次运行后,服务器都会刷新该值。如果未指定,则默认为当前服务器时间,这意味着系统会安排立即启动扫描。

时间戳采用 RFC3339 世界协调时间(UTC,即“祖鲁时”)格式,精确到纳秒,最多九个小数位。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z"

intervalDurationDays

integer

必需。执行时间间隔(以天为单位)。

ExportToSecurityCommandCenter

用于控制是否将扫描配置和结果导出到 Security Command Center。

枚举
EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED 使用默认值(已启用)。
ENABLED 将此扫描的结果导出到 Security Command Center。
DISABLED 请勿将此扫描的结果导出到 Security Command Center。

RiskLevel

Web Security Scanner 支持的扫描风险级别。影响较低的扫描会最大限度地减少可能会修改数据的请求。为了实现最大扫描覆盖率,建议选择“正常”风险级别。

枚举
RISK_LEVEL_UNSPECIFIED 使用默认值“NORMAL”。
NORMAL 普通扫描(推荐)
LOW 影响较小的扫描

方法

create

创建一个新的 ScanConfig。

delete

删除现有的 ScanConfig 及其子资源。

get

获取 ScanConfig。

list

列出给定项目下的 ScanConfig。

patch

更新 ScanConfig。

start

根据给定的 ScanConfig 启动 ScanRun。