Before SARIF, every analyzer had its own report format, and every consumer needed a parser per tool. SARIF version 2.1.0, standardized by OASIS, defines one shape. A SARIF log contains one or more runs; each run names the tool and the rules it applied, and lists results. A result references a rule, carries a level (error, warning, note), a message, and one or more locations: a file URI and a region of lines and columns. Optional fields describe code flows (the path a tainted value takes), fixes, suppressions and fingerprints that let a consumer recognize the same result across runs.
How it is used in practice
SARIF is the common currency of code-scanning integrations. SAST tools, IaC scanners, linters and some dependency scanners can emit it, and code hosts and CI systems ingest it to show findings inline on a pull request or in a security dashboard. Teams also use it to aggregate results from many tools into one store, compare runs, and track whether a result is new, unchanged or fixed.
Common pitfalls
- Unstable fingerprints. If a tool's fingerprint depends on line numbers, adding a line above a finding makes it look new, and its triage history is lost.
- Path mismatches. Locations relative to a different checkout root than the consumer expects do not resolve to files.
- Lossy conversion. Dependency findings do not map naturally onto file-and-line locations; forcing them into SARIF often drops package and version data.
- Severity drift. Tools set
leveldifferently; a "warning" in one tool may be a critical issue in another. - Size. Large repositories can produce SARIF files that exceed a consumer's upload limits.
How TrustIvan relates to it
TrustIvan exports a scan's findings as a SARIF 2.1.0 log, from the API or a GitHub Actions job, for upload to GitHub code scanning; findings from a repository scan then annotate the changed lines of a pull request, with each rule's fix guidance carried as its help. No TrustIvan integration is installed on the code host: the upload is the code host's own step. A log holds at most 5,000 results, dropping the least severe and marking itself truncated. Suppressed and resolved findings are left out, so suppressing a finding in TrustIvan closes its alert on the next upload. Paths from an image scan are paths inside the image and annotate nothing. It is export only: TrustIvan does not import SARIF from another tool. The log's structure is validated against the OASIS schema in TrustIvan's test suite; an upload to GitHub is not part of that suite. See Findings on pull requests with SARIF.
Related terms
- SAST (static application security testing) Static application security testing (SAST) analyzes an application's own source code, bytecode or binaries for security weaknesses without executing it, such as injection, unsafe deserialization or disabled certificate checks.
- Shift left Shift left is the practice of moving security checks earlier in the software delivery process, into design, coding, pull requests and CI, so that problems are found when they are cheapest and quickest to fix.
- IaC scanning (infrastructure-as-code scanning) Infrastructure-as-code (IaC) scanning analyzes the files that define infrastructure, such as Terraform, CloudFormation, Kubernetes manifests, Helm charts and Dockerfiles, for insecure configuration before it is deployed.
- Software composition analysis (SCA) Software composition analysis (SCA) identifies the third-party and open-source components inside an application or artifact, then reports the known vulnerabilities and license obligations attached to each one.
- Policy as code Policy as code is the practice of expressing security, compliance and operational rules as machine-readable definitions that are versioned, reviewed and evaluated automatically, rather than as prose in a document.
Guides on SARIF
- Finding and Rotating Secrets Leaked into Git History A secret deleted in a later commit is still leaked. Scan the whole git history, rotate in the right order, check for use, and know when a rewrite helps.
- TrustIvan vs. Running Trivy Yourself TrustIvan’s detection is Trivy, the same open-source engine anyone can run free. What TrustIvan adds on top, and when running Trivy alone is the right call.
- Policy as Code for Release Gates: Fail Builds on What Matters A release gate that fails on every critical gets switched off. Write a policy that blocks exploited, fixable risk, warns on the rest and explains itself.