Merge SARIF 2.1.0 logs from several scanners into one de-duplicated log and mark results new, unchanged or absent versus a baseline. Use when the user has several .sarif files or asks what a scan newly introduced.
97%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Low
Low-risk findings worth noting
Combine SARIF 2.1.0 files from different scanners into one log, and compare a scan with a previous one. Everything runs locally on files with Python 3.10+ (standard library only); no package install and no network access are needed.
.sarif files (for example SAST, secrets and dependency scanners)
and wants a single log."version": "2.1.0").python3 scripts/sarif_merge.py merge a.sarif b.sarif --output merged.sarifpython3 scripts/sarif_merge.py baseline current.sarif baseline.sarif --output compared.sarif --fail-on-newruns[].properties.sarifMerge in the output (inputResults, duplicates) and
results[].baselineState (new, unchanged, absent) to report the outcome.Exit codes: 0 success, 1 new results found with --fail-on-new, 2 usage, I/O or invalid
SARIF (the reason is printed to stderr).
Runs are grouped by tool driver name and version. Results are de-duplicated by a SHA-256 key built
from the rule id plus partialFingerprints.primaryLocationLineHash when present, otherwise from
the rule id, normalised file URI, start line and message text. Rule tables are merged and every
ruleIndex is recomputed. Run-level artifacts arrays are dropped and artifactLocation.index
values are removed so no index dangles. Details and limits are in
references/merge-rules.md.
Project source: https://github.com/Trysac/u260-sarif-merge
repository in the plugin manifest, or publish from a GitHub Action to verify it.