- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- CliAnalysis
- CodeScan
- SourceCode
- DataTypeClassification
- Try it!
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 |
Required. Resource name of the repo. Example: |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "cliAnalysis": { object ( |
Fields | |
---|---|
cli |
Required. CLI analysis results. |
local |
Required. Local scan path. |
cli |
Required. CLI version. |
scm |
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 ( |
Fields | |
---|---|
sources[] |
Optional. Data sources detected in the scan. |
code |
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 ( |
Fields | |
---|---|
source |
Required. Source code to analyze. |
data |
Optional. Data type classification requests. |
SourceCode
Contains source code from a repo.
JSON representation |
---|
{ "code": string, "path": string, "startLine": integer, "endLine": integer } |
Fields | |
---|---|
code |
Required. Source code. |
path |
Required. Path of the file. |
start |
Required. Start line number (1-based). |
end |
Required. End line number (1-based). |
DataTypeClassification
A request to classify data types.
JSON representation |
---|
{
"dataType": enum ( |
Fields | |
---|---|
data |
Required. Candidate data type. |
line |
Required. Line number (1-based). |