sarif-parsing

Parse, filter, deduplicate, and aggregate SARIF static analysis results from security scanners.

Updated Mar 22, 2026
One-click install
npx skills add https://github.com/TECH-HY/SKILLS --skill sarif-parsing-tech-hy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sarif-parsing
Source: https://github.com/TECH-HY/SKILLS/tree/main/skills/sarif-parsing
Command: npx skills add https://github.com/TECH-HY/SKILLS --skill sarif-parsing-tech-hy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Static analysis tools like CodeQL and Semgrep produce large SARIF files that are hard to query, deduplicate, and compare across runs, making it difficult to track findings, detect regressions, and integrate results into CI/CD pipelines. ## Core Features & Use Cases - Query and Filter Results: Use ready-made jq queries or Python helpers to extract findings by severity, rule ID, or file path from SARIF 2.1.0 files. - Deduplication and Fingerprinting: Compute stable, environment-independent fingerprints to track findings across runs and remove duplicates when aggregating multiple tools. - Aggregation and CI/CD Integration: Merge SARIF files from multiple scanners, diff baselines against current scans to detect new issues, and fail builds on high-severity findings. - Use Case: After running CodeQL and Semgrep in a pipeline, merge both SARIF outputs, deduplicate overlapping alerts, and fail the build only if new error-level findings appear compared to the baseline. ## Quick Start Ask the agent to parse the SARIF scan results file and summarize all error-level findings grouped by rule and file.

Frequently Asked Questions about sarif-parsing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I parse SARIF files from CodeQL or Semgrep?

Use jq for quick CLI queries like counting results or filtering by severity, or Python libraries such as pysarif and sarif-tools for programmatic access. The included sarif_helpers.py module extracts structured findings with rule ID, level, file path, and line numbers.

How to deduplicate SARIF findings across multiple tools?

Deduplicate using the partialFingerprints or fingerprints fields in each result, falling back to a computed hash of rule ID, filename, line, and message. This produces stable identifiers even when tools report different absolute paths.

What is the difference between pysarif and sarif-tools?

pysarif provides a full object model for loading and saving SARIF files programmatically, while sarif-tools adds reporting features like summaries, severity histograms, diffing two files, and conversion to CSV or HTML.

Can SARIF parsing handle very large result files?

Yes, for files over 100MB use the ijson library to stream results incrementally instead of loading the entire JSON into memory. This iterates through runs.item.results.item without exhausting RAM.

Why do SARIF fingerprints not match between runs?

Fingerprints mismatch when file paths differ between environments, tool versions change the fingerprinting algorithm, or code reformatting shifts line numbers. Compute custom fingerprints from rule ID, filename only, and normalized code snippets for stability.

Does this skill run CodeQL or Semgrep scans?

No, it only processes existing SARIF output files. Running scans, writing rules, or analyzing source code directly requires the dedicated CodeQL or Semgrep skills instead.