projectdiscovery / nuclei-action

Vulnerability Scan with Nuclei
https://projectdiscovery.io/nuclei
MIT License
238 stars 69 forks source link

New error/bug #53

Closed rxerium closed 1 year ago

rxerium commented 1 year ago

Hi there,

I am testing workflows with Nuclei Action and am faced with the below error which terminates my scan. I've noticed this issue occur in the previous scan I ran, is this a known bug?

[19:22:20] | Templates: 1 | Hosts: 20000 | RPS: 27 | Matched: 0 | Errors: 236095 | Requests: 1928087/2047585 (94%)
[19:22:25] | Templates: 1 | Hosts: 20000 | RPS: 27 | Matched: 0 | Errors: 236101 | Requests: 1928302/2047837 (94%)
[19:22:30] | Templates: 1 | Hosts: 20000 | RPS: 27 | Matched: 0 | Errors: 236110 | Requests: 1928515/2048030 (94%)
[19:22:35] | Templates: 1 | Hosts: 20000 | RPS: 27 | Matched: 0 | Errors: 236113 | Requests: 1928641/2048147 (94%)
/home/ubuntu/Rishi-Testing/_work/_actions/org/nuclei-automation/master/dist/index.js:1598
                error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);
                        ^

Error: The process '/home/ubuntu/Rishi-Testing/_work/_temp/5682e079-6ac0-4e40-9027-d94d34981154/nuclei' failed with exit code null
    at ExecState._setResult (/home/ubuntu/Rishi-Testing/_work/_actions/org/nuclei-automation/master/dist/index.js:1598:25)
    at ExecState.CheckComplete (/home/ubuntu/Rishi-Testing/_work/_actions/org/nuclei-automation/master/dist/index.js:1581:18)
    at ChildProcess.<anonymous> (/home/ubuntu/Rishi-Testing/_work/_actions/org/nuclei-automation/master/dist/index.js:1475:27)
    at ChildProcess.emit (node:events:390:28)
    at maybeClose (node:internal/child_process:1064:16)
    at Socket.<anonymous> (node:internal/child_process:450:11)
    at Socket.emit (node:events:390:28)
    at Pipe.<anonymous> (node:net:687:12)

Thanks

rxerium commented 1 year ago

Good morning, just wondering if any one had a chance to look into this? Thanks :)

ehsandeep commented 1 year ago

@hakrishi do you have more information to share as the issue is not clear, Are you running a longer scan? in that case, GitHub action will stop the workflow after 6 hours (allowed maximum time to run a single workflow)

Nuclei Action workflow working fine for me

image
rxerium commented 1 year ago

The workflow executes fine (it does not take longer than a few mins to execute) it then suddenly terminates with the above error, note that the max run time for a workflow is 35 days and I am well below the limit of the maximum execution time for a workflow.

Using Nuclei with specifying the templates folder with the -t flag works just fine, I've only encountered this issue when using Nuclei workflows (-w) with a custom list of CVEs.

Other details

Happy to provide further details if needed.

tarunKoyalwar commented 1 year ago

@hakrishi , the details in your comment doesnot actually show if error is present in nuclei-action or nuclei binary Ex: I got below error when i was testing it out


                     __     _
   ____  __  _______/ /__  (_)
  / __ \/ / / / ___/ / _ \/ /
 / / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   v2.8.9

        projectdiscovery.io

[INF] nuclei-templates are not installed, installing...
[INF] Successfully downloaded nuclei-templates (v9.3.8) to /home/runner/nuclei-templates. GoodLuck!
[FTL] Could not create runner: could not create output file: could not create output file: open assets/nuclei-scan.log: no such file or directory
/home/runner/work/_actions/projectdiscovery/nuclei-action/main/dist/index.js:1598
                error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);
                        ^

nuclei-action is not properly handling errors but the core error was thatassets/nuclei-scan.log file was not created .

can you share stacktrace with actual error

rxerium commented 1 year ago

Hey @tarunKoyalwar, I've slowly moved away from workflows and have not used them for a while now. Think it may be a one off error so will close this issue for the time being. Thanks for your support on this :)