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

  1. Convert scanner output to SARIF and gzip it, keeping the compressed payload under the 10 MB size limit.
  2. Base64-encode the gzipped SARIF and POST it to /repos/{owner}/{repo}/code-scanning/sarifs with commit_sha, ref, and a tool-specific category.
  3. Poll GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id} to confirm processing status and surface any upload errors.
  4. Call GET /repos/{owner}/{repo}/code-scanning/alerts to list resulting alerts, filtering by tool name, severity, or state.
  5. Update an alert's state and dismissed_reason via PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number} when triaging false positives.

Known gotchas

Related routes

Integrate OSV-Scanner into a GitHub Actions CI pipeline with SARIF upload
google.github.io · 5 steps · unrated
Set up the OpenSSF Scorecard GitHub Action to run security checks and upload results as SARIF to GitHub code scanning
github.com/ossf/scorecard-action · 6 steps · unrated
Scan Terraform files with Checkov and emit SARIF output for GitHub code scanning
checkov.io / github.com/bridgecrewio/checkov · 6 steps · unrated

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?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans