-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Static Analysis Results Interchange Format (SARIF) format? #1797
Comments
Please note that the Sarif output still needs a great amount of maturing, for example, it can't handle checkers loaded from plugins, which is a particularly great weakness for our use case. Sadly, the elegant solution for this is very non-trivial, but is on the way. But of course, that shouldn't stop us from considering using it in the future. |
I do not see any bug id (hash) in the generated report. Maybe it should be added to the output or we should generate the report id in CodeChecker for it. |
The current latest SARIF specification v2.10. See the list of oasis standards |
Documentation:
Questions:
Remaining questions:
Further notes:
Useful links:
|
It looks like GCC's static analyzer will also have SARIF support in GCC 13. |
Yeah Github integration in general is based on sarif. |
Any news on this new feature? |
we will resume work on this soon, @Franco0700 |
Fixes Ericsson#1797. Based on a PR authored by @csordasmarton. We've long wanted to support sarif (https://sarifweb.azurewebsites.net/), and finally, this is the first real step towards it!
Fixes Ericsson#1797. Based on a commit authored by @csordasmarton. Credit goes to him! We've long wanted to support sarif (https://sarifweb.azurewebsites.net/), and finally, this is the first real step towards it! This patch can both parse and and export to sarif.
Fixes Ericsson#1797. Based on a commit authored by @csordasmarton. Credit goes to him! We've long wanted to support sarif (https://sarifweb.azurewebsites.net/), and finally, this is the first real step towards it! This patch can both parse and and export to sarif.
Fixes Ericsson#1797. Based on a commit authored by @csordasmarton. Credit goes to him! We've long wanted to support sarif (https://sarifweb.azurewebsites.net/), and finally, this is the first real step towards it! This patch can both parse and and export to sarif.
Fixes Ericsson#1797. Based on a commit authored by @csordasmarton. Credit goes to him! We've long wanted to support sarif (https://sarifweb.azurewebsites.net/), and finally, this is the first real step towards it! This patch can both parse and export to sarif. My intent is that the code is self explanatory (because I explained things in the code!), there are two things I'd like to highlight: 1. I strugged a LOT with mypy, which lead me to express a things things in a rather cumbersome manner. I left comments around these parts 2. I copied all example tests from https://github.com/microsoft/sarif-tutorials/ to tools/report-converter/tests/unit/parser/sarif/sarif_test_files/. These examples come with an MIT licence, which I also copied over.
Fixes Ericsson#1797. Based on a commit authored by @csordasmarton. Credit goes to him! We've long wanted to support sarif (https://sarifweb.azurewebsites.net/), and finally, this is the first real step towards it! This patch can both parse and export to sarif. My intent is that the code is self explanatory (because I explained things in the code!), there are two things I'd like to highlight: 1. I strugged a LOT with mypy, which lead me to express a things things in a rather cumbersome manner. I left comments around these parts 2. I copied all example tests from https://github.com/microsoft/sarif-tutorials/ to tools/report-converter/tests/unit/parser/sarif/sarif_test_files/. These examples come with an MIT licence, which I also copied over.
Fixes Ericsson#1797. Based on a commit authored by @csordasmarton. Credit goes to him! We've long wanted to support sarif (https://sarifweb.azurewebsites.net/), and finally, this is the first real step towards it! This patch can both parse and export to sarif. My intent is that the code is self explanatory (because I explained things in the code!), there are two things I'd like to highlight: 1. I strugged a LOT with mypy, which lead me to express a things things in a rather cumbersome manner. I left comments around these parts 2. I copied all example tests from https://github.com/microsoft/sarif-tutorials/ to tools/report-converter/tests/unit/parser/sarif/sarif_test_files/. These examples come with an MIT licence, which I also copied over.
Fixes Ericsson#1797. Based on a commit authored by @csordasmarton. Credit goes to him! We've long wanted to support sarif (https://sarifweb.azurewebsites.net/), and finally, this is the first real step towards it! This patch can both parse and export to sarif. My intent is that the code is self explanatory (because I explained things in the code!), there are two things I'd like to highlight: 1. I strugged a LOT with mypy, which lead me to express a things things in a rather cumbersome manner. I left comments around these parts 2. I copied all example tests from https://github.com/microsoft/sarif-tutorials/ to tools/report-converter/tests/unit/parser/sarif/sarif_test_files/. These examples come with an MIT licence, which I also copied over. Co-authored-by: Kristóf Umann <dkszelethus@gmail.com>
Apologies for confusion, but it seems to me that #4011 added support for parsing SARIF into the CodeChecker, |
I actually expected parsing an input SARIF file, so CodeChecker can ingest the output of more linters. |
You can convert existing report to sarif using report-converter:
It is true though that results stored on the server cannot be exported just yet. Also, I realize that report-converter to manually postprocess results isn't the most convenient :) edit: It may have been a little overkill to close this issue straight away, we support only a subset of sarif that we immediately needed to support the gcc static analyzer. Considering that we have a new issue already, I'll leave this closed. |
This requires using git-tip of codechecker, as it was implemented in this PR and the commit 90a3905 is not yet released. I was initially surprised that my |
CSA just gained the ability to output SARIF: llvm-mirror/clang@962c092#diff-e47bf599aad9618f970aa41d0f09bf4f
Do we want to support this for interop with other tools? (Or prefer over plist at some point?)
Even if we consume plist it would be great to be able to generate both plist and sarif at the same time so both CodeChecker and other tools can consume the same results.
The text was updated successfully, but these errors were encountered: