codeql
codeql copied to clipboard
SARIF produced in `csharp` scan contains `NaN` values
Description of the issue
When executing a csharp
run on a repository, the SARIF produced has NaN
values in it and causes errors in the workflow.
Workflow Error
Code Scanning could not process the submitted SARIF file: parsing restricted subset of SARIF data has failed: parse error: expected number near offset 223643 of 'NaN'
Reproduction Repo
https://github.com/steve-gombos/codeql-error-repro
Thanks for your report. Could you trigger a re-run with debug logging enabled of a failed job such as https://github.com/steve-gombos/codeql-error-repro/actions/runs/7752599838 .
In debug mode the codeql-action will upload a zip file containing log files, the CodeQL database, and the SARIF file. Those files would be really helpful to debug this issue.
Just reran that job with debug enabled.
Found the bad bit of data in the SARIF file
"ruleId" : "cs/telemetry/extraction-information",
"value" : "NaN",
"message" : {
"text" : "Percentage of calls with call target"
}
This should be fixed by https://github.com/github/codeql/pull/15432 and should be included in the next release of CodeQL (2.16.2)