upload_to_github
Upload a SARIF report to GitHub Code Scanning for security analysis. Requires a SARIF file path, repository, commit SHA, and ref.
Instructions
Upload a SARIF report to GitHub Code Scanning.
Requires a GITHUB_TOKEN environment variable with security_events: write
scope. Generate the SARIF file first with export_sarif(output_path=...).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sarif_path": "<sarif_path>",
"repo": "<repo>",
"commit_sha": "<commit_sha>",
"ref": "<ref>"
},
"name": "upload_to_github"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sarif_path | Yes | Path to a SARIF file produced by `export_sarif`. | |
| repo | Yes | Repository in `owner/name` form. | |
| commit_sha | Yes | Full SHA of the commit the results apply to. | |
| ref | Yes | Fully qualified ref, e.g. `refs/heads/main`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |