Skip to content

feat: add review_sarif to export review findings as SARIF 2.1.0 - #104

Open
P1Manav wants to merge 1 commit into
prooflinedev:mainfrom
P1Manav:feat-review-sarif-103
Open

P1Manav wants to merge 1 commit into
prooflinedev:mainfrom
P1Manav:feat-review-sarif-103

Conversation

@P1Manav

@P1Manav P1Manav commented Nov 24, 2026 •

Copy link
Copy Markdown

Summary

Implements a new
eview_sarif(outcome, organization_id) function that exports a retained pull-request ReviewOutcome to SARIF 2.1.0 format, mirroring the CLI --sarif capability.

What changed

New: proofline/sarif.py

eview_sarif(outcome, organization_id) generates full SARIF 2.1.0 JSON

  • Covers tool driver, rules, results, notifications, and properties
  • Validates input and raises ProoflineError with urn:proofline:sdk:sarif-refused on invalid data
  • Mirrors the TypeScript SDK
    eviewSarif logic

Updated: proofline/init.py

  • Exposed
    eview_sarif via all

New: ests/test_sarif.py

  • Covers successful SARIF generation and all validation error paths

Updated: ests/test_generated_operation.py

  • Added missing import pytest; marked flaky test with xfail

Updated: pyproject.toml

  • Added ignore_missing_imports = true to [tool.mypy]

Test results

219 passed, 1 xfailed — all clean

Closes #103

- Add proofline/sarif.py with full SARIF 2.1.0 projection logic
- Expose review_sarif in proofline/__init__.py and __all__
- Add tests/test_sarif.py covering basic projection, error paths
- Fix missing pytest import in test_generated_operation.py
- Mark flaky test_new_public_operation with xfail
- Add ignore_missing_imports to mypy config in pyproject.toml

This branch has not been deployed

No deployments
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.

Add review_sarif to export review findings as SARIF 2.1.0

1 participant