Skip to content

feat(reporting): add SARIF 2.1.0 output provider#343

Open
Alexi5000 wants to merge 1 commit into
KeygraphHQ:mainfrom
Alexi5000:pr/add-sarif-output
Open

feat(reporting): add SARIF 2.1.0 output provider#343
Alexi5000 wants to merge 1 commit into
KeygraphHQ:mainfrom
Alexi5000:pr/add-sarif-output

Conversation

@Alexi5000
Copy link
Copy Markdown

Summary

Closes #322

Implements SarifReportOutputProvider using the existing ReportOutputProvider interface. Reads the assembled markdown security report, parses finding sections, maps severity headings to SARIF levels, and writes report.sarif alongside the markdown.

Details

  • SARIF 2.1.0 schema (OASIS standard)
  • Maps critical/high headings to error, medium to warning, low/info to note
  • Generates stable rule IDs from heading text
  • Zero new dependencies (SARIF is plain JSON)
  • Compatible with GitHub Code Scanning upload, VS Code SARIF Viewer, and other SARIF consumers

Files

  • New: apps/worker/src/services/sarif-report-provider.ts

Test plan

  • Generate a markdown report from a scan
  • Verify sarif-report-provider parses findings correctly
  • Validate output against SARIF 2.1.0 schema
  • Upload to GitHub Code Scanning to verify integration

Closes KeygraphHQ#322

Implements SarifReportOutputProvider that converts the assembled
markdown security report into SARIF 2.1.0 format. Parses finding
sections from the markdown, maps severity headings to SARIF levels
(critical/high to error, medium to warning, low/info to note), and
writes report.sarif alongside the markdown report.

Compatible with GitHub Code Scanning, VS Code SARIF Viewer, and
other SARIF-consuming tools. Uses the existing ReportOutputProvider
interface with zero new dependencies (SARIF is plain JSON).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant