Method: accounts.repos.scans.generate

  • Uploads local Code Compliance analysis results and initiates a privacy issue scan, returning an Operation containing analysis and findings.

  • Requires a POST request to the specified endpoint with path parameters, request body including CLI analysis results, local scan path, CLI version, and SCM metadata.

  • Utilizes OAuth scope https://www.googleapis.com/auth/checks for authorization.

  • The response body contains an Operation object upon successful completion.

  • Includes definitions for CliAnalysis, CodeScan, SourceCode, and DataTypeClassification objects with their respective JSON representations and field descriptions.

Uploads the results of local Code Compliance analysis and generates a scan of privacy issues. Returns a google.longrunning.Operation containing analysis and findings.

HTTP request

POST https://checks.googleapis.com/v1alpha/{parent=accounts/*/repos/*}/scans:generate

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. Resource name of the repo.

Example: accounts/123/repos/456

Request body

The request body contains data with the following structure:

JSON representation
 { 
 "cliAnalysis" 
 : 
 { 
 object (  CliAnalysis 
 
) 
 } 
 , 
 "localScanPath" 
 : 
 string 
 , 
 "cliVersion" 
 : 
 string 
 , 
 "scmMetadata" 
 : 
 { 
 object (  ScmMetadata 
 
) 
 } 
 } 
Fields
cli Analysis

object ( CliAnalysis )

Required. CLI analysis results.

local Scan Path

string

Required. Local scan path.

cli Version

string

Required. CLI version.

Response body

If successful, the response body contains an instance of Operation .

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/checks

For more information, see the OAuth 2.0 Overview .

CliAnalysis

The results of a Code Compliance CLI analysis.

JSON representation
 { 
 "sources" 
 : 
 [ 
 { 
 object (  Source 
 
) 
 } 
 ] 
 , 
 "codeScans" 
 : 
 [ 
 { 
 object (  CodeScan 
 
) 
 } 
 ] 
 } 
Fields
sources[]

object ( Source )

Optional. Data sources detected in the scan.

code Scans[]

object ( CodeScan )

Optional. Requested code scans resulting from preliminary CLI analysis.

CodeScan

A requested analysis of source code. Contains the source code and processing state.

JSON representation
 { 
 "sourceCode" 
 : 
 { 
 object (  SourceCode 
 
) 
 } 
 , 
 "dataTypeClassifications" 
 : 
 [ 
 { 
 object (  DataTypeClassification 
 
) 
 } 
 ] 
 } 
Fields
source Code

object ( SourceCode )

Required. Source code to analyze.

data Type Classifications[]

object ( DataTypeClassification )

Optional. Data type classification requests.

SourceCode

Contains source code from a repo.

JSON representation
 { 
 "code" 
 : 
 string 
 , 
 "path" 
 : 
 string 
 , 
 "startLine" 
 : 
 integer 
 , 
 "endLine" 
 : 
 integer 
 } 
Fields
code

string

Required. Source code.

path

string

Required. Path of the file.

start Line

integer

Required. Start line number (1-based).

end Line

integer

Required. End line number (1-based).

DataTypeClassification

A request to classify data types.

JSON representation
 { 
 "dataType" 
 : 
 enum (  DataType 
 
) 
 , 
 "lineNumber" 
 : 
 integer 
 } 
Fields
data Type

enum ( DataType )

Required. Candidate data type.

line Number

integer

Required. Line number (1-based).

Create a Mobile Website
View Site in Mobile | Classic
Share by: