Open JeroenKnoops opened 2 years ago
Thanks @JeroenKnoops, this is nicely documented and we appreciate it! I will file a bug in our internal Jira for this.
Similar issue for me:
Creating Black Duck Policy Check...
(node:1169) UnhandledPromiseRejectionWarning: HttpError: You must authenticate via a GitHub App.
at /__w/_actions/synopsys-sig/detect-action/v0.3.3/webpack:/detect-action/node_modules/@octokit/request/dist-node/index.js:86:1
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:1169) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1169) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
The action failed but it did not fail the step. This needs to fail the step if any internal error occurs.
This is a good catch; we have filed this as SIGINT-118 and will make sure this cannot happen in the new synopsys-action.
We are getting the same issue. @jcroall
Creating Black Duck Policy Check...
(node:3696107) UnhandledPromiseRejectionWarning: HttpError: You must authenticate via a GitHub App.
at /home/tenant/github-action-runner/work/_actions/synopsys-sig/detect-action/v0.3.0/webpack:/detect-action/node_modules/@octokit/request/dist-node/index.js:86:1
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:3696107) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:3696107) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Actions used: synopsys-sig/detect-action@v0.3.0
Have you found out a fix for this issue? If so let me know the fix for this version or the latest one!
Problem
When you don't provide a
github-token
, no scan is performed of the projects due to an error:UnhandledPromiseRejectionWarning: Error: Parameter token or opts.auth is required
.However, the job still remains green, giving you the impression the scan was correct.
Proposed solutions
There are two possible solutions:
1. Perform scan without
github-token
When no
github-token
is given, perform the check anyway. Thegithub-token
is necessary to report back to the PR in RAPID mode, but that might not be something a project wants.2. Mark job failed
When something went wrong in the execution, mark job failed.
Example log: