Upload third-party static analysis results to GitHub code scanning via the SARIF upload API and triage alerts
domain: docs.github.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
Steps
Convert scanner output to SARIF and gzip it, keeping the compressed payload under the 10 MB size limit.
Base64-encode the gzipped SARIF and POST it to /repos/{owner}/{repo}/code-scanning/sarifs with commit_sha, ref, and a tool-specific category.
Poll GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id} to confirm processing status and surface any upload errors.
Call GET /repos/{owner}/{repo}/code-scanning/alerts to list resulting alerts, filtering by tool name, severity, or state.
Update an alert's state and dismissed_reason via PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number} when triaging false positives.
Known gotchas
SARIF uploads only work on repos with GitHub Advanced Security / code scanning enabled, and each run counts against a per-repo daily upload rate limit.
The category field must stay consistent per tool/config across runs, or GitHub treats results as a separate analysis stream and alerts won't merge correctly.
Give your agent this knowledge — and 15,500+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?