Skip to content

SARIF code scanning

View as Markdown

Use the GitHub Action with the following inputs to publish validation diagnostics to GitHub code scanning.

with:
format: sarif
upload-sarif: true

Grant the job security-events: write and contents: read, and make sure code scanning is available for the repository. The action uploads the report before it fails a job for validation errors.

For an existing CI job that uploads its own report, generate the file with the command line. A validation failure can still produce a report, so allow the upload step to run after the checker exits.