Skip to content

Comments

Add support for SARIF output to pyAnalyze and pyAnalyzeLaurel#403

Open
tautschnig wants to merge 16 commits intomainfrom
tautschnig/pyAnalyze-SARIF
Open

Add support for SARIF output to pyAnalyze and pyAnalyzeLaurel#403
tautschnig wants to merge 16 commits intomainfrom
tautschnig/pyAnalyze-SARIF

Conversation

@tautschnig
Copy link
Contributor

@tautschnig tautschnig commented Feb 10, 2026

Description of changes:

We previously added SARIF tooling and actual use to StrataVerify. This adds the same support to pyAnalyze and pyAnalyzeLaurel, which is enabled when adding --sarif to their invocation. Testing added to CI.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

We previously added SARIF tooling and actual use to StrataVerify. This
adds the same support to pyAnalyze, which is enabled when adding
`--sarif` to a `pyAnalyze` invocation. Testing added to CI.
Copilot AI review requested due to automatic review settings February 10, 2026 14:10
@tautschnig tautschnig requested a review from a team as a code owner February 10, 2026 14:10
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds SARIF emission support to the strata pyAnalyze command (enabled via --sarif) and wires up CI coverage to validate the generated SARIF output for selected Python test programs.

Changes:

  • Extend strata CLI command handling to support per-command flags and add --sarif to pyAnalyze.
  • Generate and write SARIF output for pyAnalyze runs when requested.
  • Add a new Bash test script for SARIF validation and run it in CI; ignore generated *.sarif files in the Python test directory.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
StrataTest/Languages/Python/run_py_analyze_sarif.sh New test script that runs pyAnalyze --sarif and validates SARIF JSON structure/content.
StrataTest/Languages/Python/.gitignore Ignore generated SARIF files alongside generated Ion files.
StrataMain.lean Add SARIF output to pyAnalyze and introduce per-command flag parsing.
.github/workflows/ci.yml Run the new SARIF test script in CI after existing pyAnalyze tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

tautschnig and others added 2 commits February 10, 2026 17:23
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@tautschnig tautschnig enabled auto-merge February 18, 2026 22:24
@tautschnig tautschnig changed the title Add support for SARIF output to pyAnalyze Add support for SARIF output to pyAnalyze and pyAnalyzeLaurel Feb 18, 2026
@tautschnig tautschnig requested a review from shigoel February 18, 2026 23:21
shigoel
shigoel previously approved these changes Feb 18, 2026
@shigoel shigoel requested a review from MikaelMayer February 18, 2026 23:33
@tautschnig tautschnig marked this pull request as draft February 19, 2026 11:10
auto-merge was automatically disabled February 19, 2026 11:10

Pull request was converted to draft

@tautschnig
Copy link
Contributor Author

Reverting to draft as #451 should be merged first. Once that is merged I will resolve conflicts and mark this ready-for-review.

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.

4 participants