sarif-tools
SARIF tools
What it is and what it does
SARIF Tools is a command-line utility and Python library for working with SARIF files—the standard interchange format for static analysis tool output. It reads SARIF files produced by security scanners, linters, and code analysis tools, then transforms them into human-readable formats (HTML, CSV, Word documents, Code Climate JSON) or processes them programmatically. The package includes commands to summarize issues, compare results across builds, generate trend reports from timestamped scans, and enhance results with git blame information.
The library depends on jinja2 for templating, jsonpath-ng for navigating SARIF JSON structures, matplotlib for visualization, python-docx for Word document generation, and pyyaml for configuration. It's designed to handle real-world SARIF output from tools that may diverge from the standard—applying minor normalization to severity levels, message formats, and location representations so that results are usable even when tool authors haven't perfectly aligned their output to the spec.
Use it for:
- Convert SARIF output from security scanners into HTML reports for stakeholder review
- Generate CSV exports of all issues found across multiple static analysis tool runs
- Compare SARIF results between two builds to identify newly introduced or resolved issues
- Create Word document summaries of code quality findings for compliance or audit documentation
- Track trends in issue counts over time using timestamped SARIF filenames
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses, analyzes, and transforms SARIF (Static Analysis Results Interchange Format) files through command-line tools and a Python library, supporting multiple output formats and comparisons.
Yes. The package is actively maintained, has low install friction, carries a permissive MIT license, and fills a clear need for teams working with SARIF output from multiple static analysis tools. No known vulnerabilities. Install it if you need to process, report on, or compare results from security or code-quality scanning tools.
Install
sarif-tools on PyPI
pip
pip install sarif-toolsuv
uv add sarif-toolspoetry
poetry add sarif-toolsInstalling sarif-tools
Before you install
Low friction install with a pure Python wheel. Actively maintained as of April 2026 with recent releases. Requires Python 3.8 or later and five runtime dependencies (jinja2, jsonpath-ng, matplotlib, python-docx, pyyaml) that are all standard ecosystem packages.
License in practice
MIT license (permissive) means you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install sarif-tools
# Command-line usage
sarif summary path/to/results.sarif
# Or via Python
from sarif_tools import loader
run = loader.loader_from_file_path('results.sarif')
for result in run.results:
print(result.message.text)
Requires Python 3.8 or later. The `sarif` command-line tool may need PATH configuration after installation on Windows, Linux, or macOS; alternatively use `python -m sarif`.
Verify before relying
- Whether the package handles all SARIF specification edge cases or only common tool outputs
- Performance characteristics when processing very large SARIF files
- Whether git blame integration (blame command) works across all repository types
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (<4.0,>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — jinja2, jsonpath-ng, matplotlib, python-docx, pyyaml |
| Maintenance | actively maintained — 393 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 558,037/month — #6,008 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sarif_tools-3.0.5-py3-none-any.whl
Tags
More Quality Assurance packages
Coverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
ruffRuff is a Python linter and code formatter…
permissive · top 1,000 on PyPI
pexpectPexpect spawns and controls interactive console…
permissive · top 1,000 on PyPI
blackBlack reformats Python source code to a…
permissive · top 1,000 on PyPI
pytest-xdistpytest-xdist distributes pytest tests across…
permissive · top 1,000 on PyPI
cfn-lintValidates AWS CloudFormation templates in YAML…
permissive · top 1,000 on PyPI
sarif-omProvides Python classes implementing the SARIF…
permissive · top 5,000 on PyPI
bandit-sarif-formatterConverts Bandit security analysis output into…
permissive · top 15,000 on PyPI
socketsecuritySocket Security CLI scans Python projects for…
permissive · top 15,000 on PyPI
csv-diffCompares two CSV, TSV, or JSON files and…
permissive · top 15,000 on PyPI
xlsx2csvConverts XLSX spreadsheet files to CSV format,…
permissive · top 5,000 on PyPI
ansys-dpf-coreProvides a Python interface to Ansys Data…
permissive · top 15,000 on PyPI
strip-markdownConverts markdown text to plain text, removing…
permissive · top 15,000 on PyPI
pylint-gitlabProvides custom pylint output formatters that…
copyleft · top 5,000 on PyPI
csvkitcsvkit provides command-line tools for…
permissive · top 15,000 on PyPI
njsscannjsscan is a static application security…
copyleft · top 15,000 on PyPI