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
Recursive SARIF file detection from upload-sarif sarif_file parameter
#220
Comments
|
This sounds like a reasonable change to me. Shouldn't have any unintended side-effects as I highly doubt anyone is currently relying on the behaviour is specifically not being recursive. |
|
Yeah, I hoped that would be the case! |
|
Please allow me to share more use cases specifically for Java projects. With a multi-module Gradle project, static analysis tools like Checkstyle and Detekt can generate one or more reports per module. Therefore recursively walking through the directory is fairly common, at least for all gradle projects. I hope this issue can be addressed soon. I did some quick search and it looks like the change is within this function |
|
@chao2zhang Thanks for implementing this! Confirmed it works with my original clang scan-build output use case. |
|
Did this make it work for you? I'm always getting due to the many report-xxxxx.sarif files getting generated. |
|
@Trass3r, please raise a new issue for this. You are seeing a different problem than was originally reported. Your workflow is producing too many sarif runs. You will need to upload them in batches of 15 or less and use a different (but consistent) category name for each upload. |
|
@Trass3r Yes, something changed and the server now rejects the SARIF output generated by Clang scan-build. |
|
scan-build simply produces 1 sarif file per source file. npx -y @microsoft/sarif-multitool merge csa/*/*.sarifBut I can't say yet whether that really fixes the problem. |


I created a workflow that runs Clang scan-build with the
-sarifparameter, to output SARIF format, and the-o build/sarifargument to put the output in the directorybuild/sarif.When it is run, scan-build puts the actual SARIF files in a sub-directory of the specified output directory.
The output from scan-build is:
And the sarif files are in the randomly named sub-directory:
You can see the CI run for this here: https://github.com/tlsa/libcyaml/runs/1133489433
At the moment, with
I get the following error:
Could the
sarif_filedirectory parameter be changed to a recursive search through the directory for SARIF files?The text was updated successfully, but these errors were encountered: