Refract Guides · Practical AI safety testing patterns

SARIF 2.1.0 and GitHub Code Scanning for Refract

Refract emits SARIF 2.1.0 so AI safety findings live next to code vulnerabilities in GitHub Code Scanning, backed by the same record-chain evidence as the 2×2 report.

Why SARIF matters

SARIF 2.1.0 is the standard format GitHub Code Scanning renders natively. Refract rule IDs make silent breaches and false-alarm patterns reviewable in the security tab.

Export a scan

refract scan --target anthropic:claude-opus-5-5 --battery baseline --sarif refract.sarif
refract verify

Upload in GitHub Actions

- uses: github/codeql-action/upload-sarif@v4
  if: always()
  with:
    sarif_file: refract.sarif

Keep evidence aligned

Run refract verify before uploading. If the SARIF file and recorded transcripts ever disagree, verification fails the job instead of publishing misleading findings.

Related

Silent Breach Detection with Refract

How Refract detects AI silent breaches, canary leaks that a guardrail misses, using synthetic high-entropy canaries, benign controls, and SARIF 2.1.0 CI gating.