sarif-tools is a Python library and command-line interface for working with Static Analysis Results Interchange Format (SARIF) files. It provides utilities for summarizing, comparing, transforming, and extracting information from SARIF reports. The current version is 3.0.5, with an active development cadence focusing on bug fixes and occasional breaking changes in major versions.
pip install sarif-toolsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to load a SARIF file using `SarifFileSet`, access its issue report via `get_report()`, and then retrieve issues filtered by severity using the v3.0.0+ API. It creates a temporary dummy SARIF file for the example.
Update your code to call `sarif_set.get_report()` and then use methods on the returned `IssueReport` object (e.g., `report.get_issue_count_for_severity(severity)` or `report.get_issues_for_severity(severity)`).
If parsing CSV output, update your parsing logic for the new column structure. For filtering, replace `--blame-filter` with `--filter` and adapt your filter definitions to the new YAML format. Use the `upgrade-filter` command to assist with conversion.
Always use the latest patch release of a major version. For example, if upgrading to v3, use v3.0.5 or later, not v3.0.0.
Upgrade to `sarif-tools` v3.0.5 or newer to benefit from fixes handling invalid UTF-8.
Upgrade to `sarif-tools` v3.0.4 or newer to resolve crashes with the `--check` command.
No dependency data recorded yet.