Title: upload-sarif: Better error message when `run.results` is missing · Issue #420 · github/codeql-action · GitHub
Open Graph Title: upload-sarif: Better error message when `run.results` is missing · Issue #420 · github/codeql-action
X Title: upload-sarif: Better error message when `run.results` is missing · Issue #420 · github/codeql-action
Description: 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 provi...
Open Graph Description: 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...
X Description: 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...
Opengraph URL: https://github.com/github/codeql-action/issues/420
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"upload-sarif: Better error message when `run.results` is missing","articleBody":"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:\r\n\r\n```\r\nUploading sarif files: [\"filename.sarif\"]\r\nError: Cannot read property 'length' of undefined\r\nTypeError: Cannot read property 'length' of undefined\r\n at countResultsInSarif (/home/runner/work/_actions/github/codeql-action/v1/lib/upload-lib.js:121:35)\r\n at uploadFiles (/home/runner/work/_actions/github/codeql-action/v1/lib/upload-lib.js:214:30)\r\n at Object.uploadFromActions (/home/runner/work/_actions/github/codeql-action/v1/lib/upload-lib.js:91:18)\r\n at processTicksAndRejections (internal/process/task_queues.js:93:5)\r\n at async run (/home/runner/work/_actions/github/codeql-action/v1/lib/upload-sarif-action.js:34:29)\r\n at async runWrapper (/home/runner/work/_actions/github/codeql-action/v1/lib/upload-sarif-action.js:46:9)\r\n```","author":{"url":"https://github.com/adityasharad","@type":"Person","name":"adityasharad"},"datePublished":"2021-03-15T19:44:44.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/420/codeql-action/issues/420"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b709d26c-7380-b2ee-55b5-fd1dc3013757 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DA0A:2C9FC7:1422618:1AA8679:6A534781 |
| html-safe-nonce | f38c037c9fa7e4c7d7e81e12b0981fe875517fecc5ab27bd60d56d3b5d38bee2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQTBBOjJDOUZDNzoxNDIyNjE4OjFBQTg2Nzk6NkE1MzQ3ODEiLCJ2aXNpdG9yX2lkIjoiMzI0NTQyNTIxNDExNjg1MTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3d3e63b0d5907afd97021b30cc746b40b69d06dead6cf1dbe451816e94a26d00 |
| hovercard-subject-tag | issue:832136186 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/github/codeql-action/420/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cf827d9977e4de4e54f420bd811cca58631a08252116419b249ced81acd02d6a/github/codeql-action/issues/420 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cf827d9977e4de4e54f420bd811cca58631a08252116419b249ced81acd02d6a/github/codeql-action/issues/420 |
| og:image:alt | 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | adityasharad |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/github/codeql-action git https://github.com/github/codeql-action.git |
| octolytics-dimension-user_id | 9919 |
| octolytics-dimension-user_login | github |
| octolytics-dimension-repository_id | 259445878 |
| octolytics-dimension-repository_nwo | github/codeql-action |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 259445878 |
| octolytics-dimension-repository_network_root_nwo | github/codeql-action |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width