sarif-integration.md

March 19, 2026 ยท View on GitHub

SARIF v2.1.0 Overview

The Static Analysis Results Interchange Format (SARIF) v2.1.0 is the universal interchange format for all scan tools in the Agentic Accelerator Framework. Every domain (Security, Accessibility, Code Quality, FinOps) produces SARIF-compliant output that flows into GitHub Code Scanning, ADO Advanced Security, and Microsoft Defender for Cloud.

Schema Requirements

Every SARIF file must include the following structure:

{
  "$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/main/sarif-2.1/schema/sarif-schema-2.1.0.json",
  "version": "2.1.0",
  "runs": [
    {
      "tool": {
        "driver": {
          "name": "tool-name",
          "rules": []
        }
      },
      "results": [],
      "automationDetails": {
        "id": "category/"
      }
    }
  ]
}

Required Fields (GitHub)

FieldPurpose
$schemaSARIF schema URL
versionMust be "2.1.0"
tool.driver.nameName of the scan tool
tool.driver.rules[]Rule definitions with unique ruleId values
help.textPlain-text help for each rule (required by GitHub)
partialFingerprintsFingerprinting for deduplication across runs
FieldPurpose
help.markdownMarkdown-formatted help (GitHub renders this in the UI)
properties.tagsArray of tags for filtering (for example, ["accessibility", "wcag2.1"])
automationDetails.idCategory prefix for grouping runs (for example, accessibility-scan/homepage)

Platform Limits

LimitValue
Maximum file size10 MB (gzip compressed)
Maximum results per run25,000
Maximum runs per file20

Important

Report only regressions and below-threshold items as SARIF results to stay within the 25,000-result limit. Full reports should go to separate storage (for example, Azure Blob or build artifacts).

SARIF Category Registry

Each scan type uses a distinct automationDetails.id category prefix to prevent collisions and enable filtering in Security Overview.

Category PrefixScan TypeTool
secret-scanning/SecretsGitHub Secret Protection
dependency-review/SCA (Software Composition Analysis)Dependabot
codeql/SAST (Static Application Security Testing)CodeQL + Copilot Autofix
iac-scanning/Infrastructure as CodeMSDO (Checkov, Trivy)
container-scanning/Container ImagesTrivy, Grype
dast/Dynamic Application Security TestingZAP
accessibility-scan/Accessibility (WCAG 2.2)axe-core + IBM Equal Access
code-quality/coverage/Code CoverageCoverage-to-SARIF converter
agent-config-scan/Agent Configuration SecurityAPM (microsoft/apm) apm audit
finops-finding/FinOps and Cost AnalysisCost analysis agent

Severity Classification

All findings use a consistent severity model mapped to SARIF levels.

SeveritySARIF LevelDescription
CRITICALerrorImmediate risk: active exploitation possible, data exposure, or compliance violation
HIGHerrorSignificant risk: must be remediated before merge
MEDIUMwarningModerate risk: should be addressed in the current sprint
LOWnoteMinor risk: track for future improvement

When applicable, map findings to CWE IDs (security), OWASP Top 10 (application security), OWASP LLM Top 10 (AI/LLM findings), and WCAG 2.2 success criteria (accessibility).

Domain-Specific Mappings

Accessibility: axe-core Impact to SARIF

The accessibility scanner maps axe-core impact levels to SARIF levels with numeric security-severity scores.

axe-core ImpactSARIF Levelsecurity-severityNotes
criticalerror9.0Blocks users from accessing content
seriouserror7.0Significantly impairs usability
moderatewarning4.0Creates difficulty for some users
minornote1.0Best-practice improvement

SARIF enrichment for accessibility results:

  • help.markdown includes WCAG mapping and remediation guidance
  • properties.tags includes accessibility and WCAG success criteria tags (for example, wcag2.1.1)
  • partialFingerprints enables deduplication across scans
  • automationDetails.id uses accessibility-scan/<url> for multi-site matrix scans

Code Quality: Coverage to SARIF

Coverage reports convert to SARIF findings for threshold enforcement.

Coverage ConceptSARIF Mapping
Uncovered functionresult with ruleId: "uncovered-function"
Uncovered branchresult with ruleId: "uncovered-branch"
File below thresholdresult with ruleId: "coverage-threshold-violation"
Uncovered line rangephysicalLocation.region with startLine and endLine

The automationDetails.id category is code-quality/coverage/.

Tip

Report only regressions and below-threshold functions as SARIF results rather than full coverage data. This keeps results within the 25,000-result limit.

FinOps: Cost Findings to SARIF

FinOps findings use a SARIF-inspired schema with domain-specific rule identifiers.

Finding TypeSARIF ruleIdDescription
Budget overspendbudget-overspendSpending exceeds the defined budget threshold
Cost anomalycost-anomalyUnexpected cost spike detected
Untagged resourcesuntagged-resourcesResources missing required cost allocation tags
Idle resourcesidle-resourcesResources running with minimal or no utilization
Reservation wastereservation-wasteReserved instances or savings plans with low utilization
Cost trendcost-trendPersistent upward cost trend exceeding forecast
Optimization opportunityoptimization-opportunityAzure Advisor recommendation for cost savings

The automationDetails.id category is finops-finding/v1.

Upload Patterns

GitHub Actions

All SARIF uploads in GitHub Actions use the github/codeql-action/upload-sarif@v4 action.

- name: Upload SARIF results
  uses: github/codeql-action/upload-sarif@v4
  with:
    sarif_file: results.sarif
    category: accessibility-scan/homepage

The workflow must have security-events: write permission:

permissions:
  security-events: write

Azure DevOps

SARIF results upload to ADO Advanced Security through the AdvancedSecurity-Publish@1 pipeline task.

- script: npx a11y-scan scan --url "$(SCAN_URL)" --threshold 80 --format sarif --output a11y-results.sarif
  displayName: Run accessibility scan

- task: AdvancedSecurity-Publish@1
  inputs:
    sarif_file: a11y-results.sarif
  displayName: Publish SARIF to ADO Advanced Security

For native ADO code scanning, use the GHAzDO pipeline tasks:

- task: AdvancedSecurity-Codeql-Init@1
  inputs:
    languages: 'csharp'
    enableAutomaticCodeQLInstall: true

- task: AdvancedSecurity-Dependency-Scanning@1

- task: AdvancedSecurity-Codeql-Analyze@1

Comparison

AspectGitHub ActionsAzure DevOps
Upload action/taskgithub/codeql-action/upload-sarif@v4AdvancedSecurity-Publish@1
Permission requiredsecurity-events: writeGHAzDO enabled on the repo
Results visible inGitHub Code Scanning alertsADO Code Scanning tab
Defender for CloudVia GitHub connectorVia ADO connector
Category filteringautomationDetails.idTool name in ADO UI

25,000-Result Limit Strategy

GitHub enforces a limit of 25,000 results per SARIF run. For large-scale scans, apply these strategies:

  1. Report only regressions (new findings compared to the baseline) rather than the full finding set.
  2. Report only below-threshold items (for example, functions below 80% coverage) rather than every measured item.
  3. Split results across multiple SARIF files with distinct automationDetails.id categories.
  4. Use matrix strategies to partition scans by URL, module, or language, each producing a separate SARIF file.
  5. Archive full results to build artifacts or Azure Blob storage for historical analysis.

References