Interact with Code Scanning analysis and SARIF files.
gh-sarif
is a GitHub CLI extension.
gh extension install bagtoad/gh-sarif
Usage:
gh sarif [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
delete Delete a GitHub Code Scanning Analysis
help Help about any command
list List GitHub Code Scanning analyses for a repository
upload Upload a SARIF file to GitHub Code Scanning
view View GitHub Code Scanning analysis or SARIF results
Flags:
-h, --help help for gh-sarif
-j, --json Output JSON instead of text (includes additional fields)
-R, --repo string GitHub repository (format: owner/repo)
Use "gh sarif [command] --help" for more information about a command.
gh sarif list
gh sarif view <analysis-id>
gh sarif view <analysis-id> --sarif
gh sarif view <analysis-id> --csv
gh sarif view <path-to-sarif-file>
gh sarif upload <commit-sha> <ref> <path-to-sarif-file>
gh sarif delete <analysis-id>
gh sarif delete <analysis-id> <analysis-id> <analysis-id>...
gh sarif delete <analysis-id> --delete-all
gh sarif delete <analysis-id> --delete-all --confirm-delete
or
gh sarif delete <analysis-id> --purge