You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
upload-sarif: Better error message when run.results is missing #420
Some third-party SARIF producer tools incorrectly create a run without a results object when the tool succeeds and finds no results, when they should be populating results with an empty array. This is on the tool to fix, but we can provide a better error message in this case, instead of an unhelpful crash in the upload-sarif Action:
Uploading sarif files: ["filename.sarif"]
Error: Cannot read property 'length' of undefined
TypeError: Cannot read property 'length' of undefined
at countResultsInSarif (/home/runner/work/_actions/github/codeql-action/v1/lib/upload-lib.js:121:35)
at uploadFiles (/home/runner/work/_actions/github/codeql-action/v1/lib/upload-lib.js:214:30)
at Object.uploadFromActions (/home/runner/work/_actions/github/codeql-action/v1/lib/upload-lib.js:91:18)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async run (/home/runner/work/_actions/github/codeql-action/v1/lib/upload-sarif-action.js:34:29)
at async runWrapper (/home/runner/work/_actions/github/codeql-action/v1/lib/upload-sarif-action.js:46:9)
Activity
aeisenberg commentedon Mar 15, 2021
Just want to make sure that this does not affect the
codeql github upload-resultscommand since we are only expecting it to be used for codeql.adityasharad commentedon Mar 15, 2021
Worth checking how the CLI handles this case (and adding a test) - I expect it will give a SARIF validation error, which is correct.
aeisenberg commentedon Mar 17, 2021
Fixed in #426