Skip to content

[cmd] parse extends sarif output with extra fields#4925

Open
andyg32 wants to merge 3 commits into
Ericsson:masterfrom
andyg32:sarif-extra-fields
Open

[cmd] parse extends sarif output with extra fields#4925
andyg32 wants to merge 3 commits into
Ericsson:masterfrom
andyg32:sarif-extra-fields

Conversation

@andyg32

@andyg32 andyg32 commented Jun 26, 2026

Copy link
Copy Markdown

There are a few fields in the SARIF specification which would be meaningful to be filled out, but today are not generated into the exported files.

  • CodeChecker parse already populates Report objects with review status information, but currently only JSON export makes use of it. This PR adds suppression objects to individual results in the SARIF file, according to the spec, including suppression source (source code comment or review config file) and justification message.
    location.physicalLocation may be added in a follow-up PR.

  • SARIF rules[] (~checkers) are extended with defaultConfiguration.level and helpUri fields (spec), corresponding to the severity and doc_url checker labels in CodeChecker config.
    Note that this only applies to the CodeChecker parse command at the moment, which has the analyzer context (including a CheckerLabel object) readily available. Doing the same for the standalone report-converter is an orthogonal task, and might entail bigger refactorings.

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