sarif-parsing
Skill by trailofbits
Parses, filters and deduplicates SARIF files from static analysis tools such as CodeQL and Semgrep. Built for developers and security teams who need to read and combine existing scan results. It does not run scans.
Install sarif-parsing
Built from the published package, never by AI.
git clone --depth 1 https://github.com/trailofbits/skills /tmp/skills && mkdir -p ~/.claude/skills && cp -r /tmp/skills/plugins/static-analysis/skills/sarif-parsing ~/.claude/skills/sarif-parsingRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/trailofbits/skills /tmp/skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/skills/plugins/static-analysis/skills/sarif-parsing ~/.gemini/antigravity-cli/skills/sarif-parsingAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
The sarif-parsing skill helps an AI assistant read and process SARIF 2.1.0 files produced by static analysis tools like CodeQL, Semgrep, or other scanners. It covers quick jq queries, Python scripting with pysarif and sarif-tools, and a standard-library helper module. It handles filtering, deduplication, format conversion, and CI/CD integration of SARIF data.
It resolves severity from the rule when a result omits its level, a common CodeQL case, and uses fingerprints to track findings across runs. It is for developers and security teams working with existing scan output. The skill does not run scans. For that, the source points to the Semgrep or CodeQL skills.
Written from the project's SKILL.md and checked against it.
What it can do
- Quick jq queriesCounts findings, lists rule IDs, and extracts file locations with jq.
- Python with pysarifLoads SARIF files into an object model and iterates runs and results.
- Aggregation with sarif-toolsSummarizes, diffs, and converts SARIF files to CSV or HTML.
- Severity resolutionResolves result severity from the rule when result.level is absent.
- DeduplicationRemoves duplicate findings using tool fingerprints or a hashed key.
- Path normalizationStrips file URI schemes and decodes paths so tools' paths can be compared.
What you need
- jq for command-line queries
- Python for pysarif, sarif-tools, or the helper module
- uv for running Python packages with uv run --with
Try asking
- Parse this SARIF file and list the error-level findings
- Deduplicate the alerts from these two SARIF files
- Summarize the findings in results.sarif by rule ID
Good to know
- Does not run static analysis scans
- Works on existing SARIF files only
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: plugins/static-analysis/skills/sarif-parsing/SKILL.md, plugins/static-analysis/skills/sarif-parsing/resources/sarif_helpers.py, plugins/static-analysis/skills/sarif-parsing/resources/test_sarif_helpers.py. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
Allowed tools: Bash Read Glob Grep
-
SKILL.md18 KB -
agents/openai.yaml231 B -
assets/trail-of-bits-mark.svg3 KB -
resources/fixtures/codeql-no-level.sarif2 KB -
resources/fixtures/levels-on-results.sarif2 KB
Show all 8 files
-
resources/jq-queries.md8 KB -
resources/sarif_helpers.py13 KB -
resources/test_sarif_helpers.py14 KB
Alternatives to sarif-parsing
All alternatives →Retrieves lab biomarker results and clinician notes from Function Health through its FHIR API. It is for people who want an AI assistant to review their own lab history and notes.
Gives an AI assistant a methodology for finding and exploiting privilege escalation weaknesses on Windows systems during authorized penetration tests. It is for security testers and defenders validating escalation paths.
Guides the assistant through designing, debugging and hardening GitHub Actions CI/CD workflows. It is aimed at teams that run production pipelines on GitHub.
Develops evidence-backed structural security hardening proposals from disclosures, findings, source code, or Codex Security scans. It is for teams that need systemic fixes and architectural tradeoffs.
Claude Security scans code for security issues with Claude Code. It covers whole repositories, branch or pull request diffs, single commits, and existing findings from SARIF files or earlier reports.
Turns vulnerability notes, disclosure reports, PoCs, source code, or Codex Security findings into self-contained vulnerability reports. Built for security researchers who need claims the evidence supports.
Compare with function_health, windows-privilege-escalation or github-actions-advanced
sarif-parsing: common questions
Does this skill run security scans?
No. The source says it does not run scans and points to the Semgrep or CodeQL skills for that.
Why can severity appear as clean in some SARIF output?
CodeQL omits result.level and stores severity on the rule. The skill resolves level from the rule's defaultConfiguration to avoid this.
How does it detect duplicate findings?
deduplicate() prefers tool-supplied fingerprints and falls back to hashing rule ID, normalized path, line, and message.
How do I install sarif-parsing?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is sarif-parsing free?
The code is published under the CC-BY-SA-4.0 licence. The service it connects to may have its own pricing.
Is sarif-parsing safe to use?
It scores 92 of 100. Grades: maintenance A, licence C, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to sarif-parsing?
Similar skills: function_health, windows-privilege-escalation, github-actions-advanced, propose-security-hardening.
