dcloud git security upload-sarifUpload a SARIF 2.1.0 file of code scanning results for a commit
IAM git:UploadCodeScanningResultsChanges state
Any SARIF-writing tool (Semgrep, CodeQL, Trivy, gosec). An analysis of the default branch updates the repository’s alerts and marks those it no longer reports fixed; an analysis of a pull request’s head shows on the pull request.
Synopsis
dcloud git security upload-sarif repoId --commit-sha commitSha --ref ref --sarif sarifArguments
<repoId>Requiredstring
Also accepted as
--repo-id. Constraints: uuid
Flags
--commit-shaRequiredstring
The commit the analysis ran on
Constraints: /^[0-9a-f]{40}$/
--refRequiredstring
The ref analysed: refs/heads/<branch>, or refs/pull/<n>/head for a pull request
Constraints: 1-255 chars
--sarifRequiredstring
The SARIF 2.1.0 document, as JSON text (at most 12 MB)
Constraints: 2-12582912 chars
Example
dcloud git security upload-sarif repoId --commit-sha example --ref example --sarif exampleGenerated from the API description, the same one the API checks requests against and the CLI is built from.