Method: accounts.repos.scans.generate

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
cliAnalysis

object (CliAnalysis)

Required. CLI analysis results.

localScanPath

string

Required. Local scan path.

cliVersion

string

Required. CLI version.

scmMetadata

object (ScmMetadata)

Required. SCM metadata.

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.

codeScans[]

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
sourceCode

object (SourceCode)

Required. Source code to analyze.

dataTypeClassifications[]

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.

startLine

integer

Required. Start line number (1-based).

endLine

integer

Required. End line number (1-based).

DataTypeClassification

A request to classify data types.

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

enum (DataType)

Required. Candidate data type.

lineNumber

integer

Required. Line number (1-based).