-
Notifications
You must be signed in to change notification settings - Fork 351
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
Unable to upload SARIF file #418
Comments
Yes, that does seem suspicious. For now, can you change the language property to |
Apologies for not following up until now. I think the pattern we would want to use is this: @lcartey, does this look right to you? |
My sarif file was generated by the C# compiler, so I can't change the language tag. I have now disabled this action in my workflow, as it was not important for my project to use the compiler generated sarif file.
Yes. I also think that pattern is correct. |
This was first mentioned in github/codeql-action#418 Also, raised in oasis-tcs#488. cc: @lcartey
See oasis-tcs/sarif-spec#490 See #418 Note that this changes the sarif spec file. Unless this change is actually merged in the sarif spec repo, the version used by the action will be slightly different.
See oasis-tcs/sarif-spec#490 See #418 Note that this changes the sarif spec file. Unless this change is actually merged in the sarif spec repo, the version used by the action will be slightly different.
See oasis-tcs/sarif-spec#490 See github#418 Note that this changes the sarif spec file. Unless this change is actually merged in the sarif spec repo, the version used by the action will be slightly different.
Still getting this error with release 2.9.4. My situation is also using a sarif file generated by the package |
Hmmmm...The regex The sarif file being uploaded is |
Tomorrow I can try to upload the artifact in the repo so that we can see the actual file generated in GitHub, and I may be able to spend a few minutes digging in further with the codeql code. Here's a locally-generated file:
|
How interesting: the exact same dotnet application produces a sarif file with this, when run on GitHub Actions: "language": "", Which is obviously problematic. I will look into that further on the .NET side and submit a ticket in the proper .NET repository if needed. For the upload process, clearly there is a workaround: open the file and inject a valid language into it! And then 🤞 hopefully nothing else turns up. |
I worked around it by replacing the value prior to upload |
@stephenfuqua @niederee You can also specify a |
When I attempted to upload a sarif file using the
upload-sarif@v1
action, I encountered the following error.The language property of my sarif file is
ja-JP
, which is a valid form of language tag, but it did not match the regular expression pattern described above.I think the regular expression pattern for this schema is a mistake.
codeql-action/src/sarif_v2.1.0_schema.json
Line 2342 in cfec2bb
I think this schema is coming from https://github.com/oasis-tcs/sarif-spec .
So, I'm submitting an issue to that repository as well.
oasis-tcs/sarif-spec#488
The text was updated successfully, but these errors were encountered: