dcloud git security upload-sarif

Upload 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 sarif

Arguments

  • <repoId>Required

    string

    Also accepted as --repo-id. Constraints: uuid

Flags

  • --commit-shaRequired

    string

    The commit the analysis ran on

    Constraints: /^[0-9a-f]{40}$/

  • --refRequired

    string

    The ref analysed: refs/heads/<branch>, or refs/pull/<n>/head for a pull request

    Constraints: 1-255 chars

  • --sarifRequired

    string

    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 example

Generated from the API description, the same one the API checks requests against and the CLI is built from.