Closed Th3BlackHol3 closed 1 week ago
This a plus one from me too.
similar workflow to the @Th3BlackHol3 - the initial error seems to happen in the application
I presume the action is using latest version of nuclei - but there is no input exposed to pin the version of nuclei to use - thus I cannot debug it by trying older versions
[http-missing-security-headers:strict-transport-security] [http] [info] http://localhost:8888
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x126bb28]
goroutine 33006 [running]:
github.com/projectdiscovery/nuclei/v2/pkg/reporting/format.CreateReportDescription(0xc00cca4fc0, {0x2b2d540, 0x3b2bef0})
github.com/projectdiscovery/nuclei/v2/pkg/reporting/format/format_utils.go:116 +0xd28
github.com/projectdiscovery/nuclei/v2/pkg/reporting/exporters/markdown.(*Exporter).Export(0xc001ec4168, 0xc00cca4fc0)
github.com/projectdiscovery/nuclei/v2/pkg/reporting/exporters/markdown/markdown.go:117 +0x6a8
github.com/projectdiscovery/nuclei/v2/pkg/reporting.(*ReportingClient).CreateIssue(0xc001dbc100, 0xc00cca4fc0?)
github.com/projectdiscovery/nuclei/v2/pkg/reporting/reporting.go:244 +0x192
github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/helpers/writer.WriteResult(0xc004e39d10, {0x2b2e0e0, 0xc00017e150}, {0x2b32af8, 0xc000bfa090}, {0x2b2e128, 0xc001dbc100})
github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/helpers/writer/writer.go:29 +0x17c
github.com/projectdiscovery/nuclei/v2/pkg/templates.(*ClusterExecuter).Execute.func1(0xc004e39d10)
github.com/projectdiscovery/nuclei/v2/pkg/templates/cluster.go:263 +0x3a8
github.com/projectdiscovery/nuclei/v2/pkg/protocols/http.(*Request).ExecuteWithResults.func1.1(0xc004e39d10)
github.com/projectdiscovery/nuclei/v2/pkg/protocols/http/request.go:399 +0x2fa
github.com/projectdiscovery/nuclei/v2/pkg/protocols/http.(*Request).executeRequest(0xc0041dd500, 0xc0066df578, 0xc002677680, 0xc0066df578?, 0x0, 0xc00d0b3b28, 0xc002bfb500?)
github.com/projectdiscovery/nuclei/v2/pkg/protocols/http/request.go:764 +0x2b1b
github.com/projectdiscovery/nuclei/v2/pkg/protocols/http.(*Request).ExecuteWithResults.func1({0xc00b2ca010, 0xb}, 0xe?, 0x490c69?)
github.com/projectdiscovery/nuclei/v2/pkg/protocols/http/request.go:377 +0x5bb
github.com/projectdiscovery/nuclei/v2/pkg/protocols/http.(*Request).ExecuteWithResults(0xc0041dd500, 0xc0066df578, 0xc002bfb440, 0xc002bfb350, 0xc0066df5c0)
github.com/projectdiscovery/nuclei/v2/pkg/protocols/http/request.go:436 +0x36a
github.com/projectdiscovery/nuclei/v2/pkg/templates.(*ClusterExecuter).Execute(0xc00711cd80, 0xc0066df560)
github.com/projectdiscovery/nuclei/v2/pkg/templates/cluster.go:245 +0x20f
github.com/projectdiscovery/nuclei/v2/pkg/core.(*Engine).executeTemplateWithTargets.func2.1(0x757986?, 0x0?, 0xc00826ae60)
github.com/projectdiscovery/nuclei/v2/pkg/core/executors.go:128 +0x296
created by github.com/projectdiscovery/nuclei/v2/pkg/core.(*Engine).executeTemplateWithTargets.func2
github.com/projectdiscovery/nuclei/v2/pkg/core/executors.go:105 +0x52a
/home/runner/work/_actions/projectdiscovery/nuclei-action/v1.0.7/dist/index.js:1[59](https://github.com/my-project/workflows/actions/runs/5752752188/job/15594439456#step:7:61)8
error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);
^
Error: The process '/home/runner/work/_temp/6fdf9[68](https://github.com/my-project/workflows/actions/runs/5752752188/job/15594439456#step:7:70)1-0a39-4e01-a48e-3af293c6af68/nuclei' failed with exit code 2
at ExecState._setResult (/home/runner/work/_actions/projectdiscovery/nuclei-action/v1.0.7/dist/index.js:1598:25)
at ExecState.CheckComplete (/home/runner/work/_actions/projectdiscovery/nuclei-action/v1.0.7/dist/index.js:1581:18)
at ChildProcess.<anonymous> (/home/runner/work/_actions/projectdiscovery/nuclei-action/v1.0.7/dist/index.js:1[47](https://github.com/my-project/workflows/actions/runs/5752752188/job/15594439456#step:7:49)5:27)
at ChildProcess.emit (node:events:[52](https://github.com/my-project/workflows/actions/runs/5752752188/job/15594439456#step:7:54)7:28)
at maybeClose (node:internal/child_process:1092:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
@Th3BlackHol3 can you please mention relative paths of urls.txt
and Nuclei-Target-Workflow-Engine
workflow files?
Hello @RamanaReddy0M,
Thanks for responding!
I have 2 copies of urls.txt Path1: "Home of Repository", Path2: "/.github/workflow/", and Nuclei-Target-Workflow-Engine path is " /.github/workflow /Nuclei-Target-Workflow-Engine.yml"
Best Regards @Th3BlackHol3
Hello @RamanaReddy0M,
Thanks for responding!
I have 2 copies of urls.txt Path1: "Home of Repository", Path2: "/.github/workflow/", and Nuclei-Target-Workflow-Engine path is " /.github/workflow /Nuclei-Target-Workflow-Engine.yml"
Best Regards @Th3BlackHol3
Okay, let's consider path2, we have urls.txt
under workflows => .github/workflows/urls.txt
Now replace the line in the workflow urls: urls.txt
with urls: .github/workflows/urls.txt
@Th3BlackHol3 please try with above changes and let me know if it doesn't work.
Hello @RamanaReddy0M
Thanks for the solution, But Here is still the issue that exists.
[INF] nuclei-templates are not installed, installing...
[INF] Successfully installed nuclei-templates at /home/runner/nuclei-templates
[FTL] Could not create runner: could not create input provider: could not open targets file: open .github/workflows/subfinderout.txt: 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}`);
^
Error: The process '/home/runner/work/_temp/bc666f0a-7aa0-41[23](https://github.com/Th3BlackHol3/Nuclei-Target/actions/runs/5765147108/job/15630554567#step:3:25)-aaea-3492361e346f/nuclei' failed with exit code 1
at ExecState._setResult (/home/runner/work/_actions/projectdiscovery/nuclei-action/main/dist/index.js:1598:[25](https://github.com/Th3BlackHol3/Nuclei-Target/actions/runs/5765147108/job/15630554567#step:3:27))
at ExecState.CheckComplete (/home/runner/work/_actions/projectdiscovery/nuclei-action/main/dist/index.js:1581:18)
at ChildProcess.<anonymous> (/home/runner/work/_actions/projectdiscovery/nuclei-action/main/dist/index.js:1475:[27](https://github.com/Th3BlackHol3/Nuclei-Target/actions/runs/5765147108/job/15630554567#step:3:29))
at ChildProcess.emit (node:events:527:[28](https://github.com/Th3BlackHol3/Nuclei-Target/actions/runs/5765147108/job/15630554567#step:3:30))
at maybeClose (node:internal/child_process:1092:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:[30](https://github.com/Th3BlackHol3/Nuclei-Target/actions/runs/5765147108/job/15630554567#step:3:32)2:5)
Hello @RamanaReddy0M
Thanks for the solution, But Here is still the issue that exists.
[INF] nuclei-templates are not installed, installing... [INF] Successfully installed nuclei-templates at /home/runner/nuclei-templates [FTL] Could not create runner: could not create input provider: could not open targets file: open .github/workflows/subfinderout.txt: 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}`); ^ Error: The process '/home/runner/work/_temp/bc666f0a-7aa0-41[23](https://github.com/Th3BlackHol3/Nuclei-Target/actions/runs/5765147108/job/15630554567#step:3:25)-aaea-3492361e346f/nuclei' failed with exit code 1 at ExecState._setResult (/home/runner/work/_actions/projectdiscovery/nuclei-action/main/dist/index.js:1598:[25](https://github.com/Th3BlackHol3/Nuclei-Target/actions/runs/5765147108/job/15630554567#step:3:27)) at ExecState.CheckComplete (/home/runner/work/_actions/projectdiscovery/nuclei-action/main/dist/index.js:1581:18) at ChildProcess.<anonymous> (/home/runner/work/_actions/projectdiscovery/nuclei-action/main/dist/index.js:1475:[27](https://github.com/Th3BlackHol3/Nuclei-Target/actions/runs/5765147108/job/15630554567#step:3:29)) at ChildProcess.emit (node:events:527:[28](https://github.com/Th3BlackHol3/Nuclei-Target/actions/runs/5765147108/job/15630554567#step:3:30)) at maybeClose (node:internal/child_process:1092:16) at Process.ChildProcess._handle.onexit (node:internal/child_process:[30](https://github.com/Th3BlackHol3/Nuclei-Target/actions/runs/5765147108/job/15630554567#step:3:32)2:5)
@Th3BlackHol3 .github/workflows/subfinderout.txt: no such file or directory
here I believe .github/workflows/subfinderout.txt
is a replacer of .github/workflows/urls.txt
. if so please make sure you have committed this file .github/workflows/subfinderout.txt
.
I have tried the same workflow and it's working fine. Sharing reference here: https://github.com/RamanaReddy0M/nuclei-action/actions/runs/5764997810/workflow
If it is a public repo that you are trying on, sharing the build failure link would help to investigate further.
I have changed urls.txt to subfinderout.txt.
I too have experienced this issue in the last few days with several scans. I have stored my input in .github/input/urls.txt
(25k hosts). I am using the below Nuclei flags in my config:
tags: kev
ss: host-spray
concurrency: 100
bulk-size: 10
max-host-error: 10
max-redirects: 1
stats: true
ts: true
Are there any workarounds/fixes in the works?
Happy to provide further config/info if needed.
@hakrishi @Th3BlackHol3, we've have been unable to replicate it. We've followed the workflow provided by @Th3BlackHol3 at https://github.com/projectdiscovery/nuclei-action/issues/63#issue-1832222356, and it's performing flawlessly as shown in this successful run.
If possible, could you please attempt this workflow on a sample public repository? Kindly share any failed workflow here, and I'll delve into it further to pinpoint the root cause.
@RamanaReddy0M thanks for your reply! I wouldn't feel comfortable making the repo public as it contains sensitive information, primarily being the list of hosts that are being scanned. Was there any specific logs you were looking for? Very happy to share it here
Good morning, I am receiving the following errors which leads to a scan terminating:
I am using the same config as above.
panic: runtime error: invalid memory address or nil pointer dereference
16127
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x11cde1d]
16128
16129
goroutine 134110067 [running]:
16130
github.com/projectdiscovery/dsl.init.0.func73({0xc0033e2d40, 0x3, 0x16?})
16131
github.com/projectdiscovery/dsl@v0.0.16/dsl.go:852 +0x35d
16132
github.com/projectdiscovery/dsl.dslFunction.Exec({{0x20dc2c5, 0x6}, 0x0, {0xc000251e30, 0x1, 0x1}, 0x2737a78}, {0xc0033e2d40, 0x3, 0x4})
16133
github.com/projectdiscovery/dsl@v0.0.16/func.go:52 +0x143
16134
github.com/Knetic/govaluate.makeFunctionStage.func1({0xc0129bce10?, 0x1c85380?}, {0x1c85380, 0xc002fd6c18?}, {0x2181817?, 0xc0129bd101?})
16135
github.com/Knetic/govaluate@v3.0.1-0.20171022003610-9aa49832a739+incompatible/evaluationStage.go:243 +0x67
16136
github.com/Knetic/govaluate.EvaluableExpression.evaluateStage({{0x218ae09, 0x22}, 0x1, {0xc004995800, 0x17, 0x20}, 0xc0129bd180, {0xc018ef33e2, 0x4e}}, 0xc0129bce60, ...)
16137
github.com/Knetic/govaluate@v3.0.1-0.20171022003610-9aa49832a739+incompatible/EvaluableExpression.go:232 +0x5dc
16138
github.com/Knetic/govaluate.EvaluableExpression.evaluateStage({{0x218ae09, 0x22}, 0x1, {0xc004995800, 0x17, 0x20}, 0xc0129bd180, {0xc018ef33e2, 0x4e}}, 0xc0129bceb0, ...)
16139
github.com/Knetic/govaluate@v3.0.1-0.20171022003610-9aa49832a739+incompatible/EvaluableExpression.go:205 +0x3b5
16140
github.com/Knetic/govaluate.EvaluableExpression.evaluateStage({{0x218ae09, 0x22}, 0x1, {0xc004995800, 0x17, 0x20}, 0xc0129bd180, {0xc018ef33e2, 0x4e}}, 0xc0129bcf50, ...)
16141
github.com/Knetic/govaluate@v3.0.1-0.20171022003610-9aa49832a739+incompatible/EvaluableExpression.go:205 +0x3b5
16142
github.com/Knetic/govaluate.EvaluableExpression.evaluateStage({{0x218ae09, 0x22}, 0x1, {0xc004995800, 0x17, 0x20}, 0xc0129bd180, {0xc018ef33e2, 0x4e}}, 0xc0129bcfa0, ...)
16143
github.com/Knetic/govaluate@v3.0.1-0.20171022003610-9aa49832a739+incompatible/EvaluableExpression.go:205 +0x3b5
16144
github.com/Knetic/govaluate.EvaluableExpression.evaluateStage({{0x218ae09, 0x22}, 0x1, {0xc004995800, 0x17, 0x20}, 0xc0129bd180, {0xc018ef33e2, 0x4e}}, 0xc0129bcff0, ...)
16145
github.com/Knetic/govaluate@v3.0.1-0.20171022003610-9aa49832a739+incompatible/EvaluableExpression.go:205 +0x3b5
16146
github.com/Knetic/govaluate.EvaluableExpression.evaluateStage({{0x218ae09, 0x22}, 0x1, {0xc004995800, 0x17, 0x20}, 0xc0129bd180, {0xc018ef33e2, 0x4e}}, 0xc0129bd040, ...)
16147
github.com/Knetic/govaluate@v3.0.1-0.20171022003610-9aa49832a739+incompatible/EvaluableExpression.go:205 +0x3b5
16148
github.com/Knetic/govaluate.EvaluableExpression.evaluateStage({{0x218ae09, 0x22}, 0x1, {0xc004995800, 0x17, 0x20}, 0xc0129bd180, {0xc018ef33e2, 0x4e}}, 0xc0129bd090, ...)
16149
github.com/Knetic/govaluate@v3.0.1-0.20171022003610-9aa49832a739+incompatible/EvaluableExpression.go:205 +0x3b5
16150
github.com/Knetic/govaluate.EvaluableExpression.evaluateStage({{0x218ae09, 0x22}, 0x1, {0xc004995800, 0x17, 0x20}, 0xc0129bd180, {0xc018ef33e2, 0x4e}}, 0xc0129bd0e0, ...)
16151
github.com/Knetic/govaluate@v3.0.1-0.20171022003610-9aa49832a739+incompatible/EvaluableExpression.go:205 +0x3b5
16152
github.com/Knetic/govaluate.EvaluableExpression.evaluateStage({{0x218ae09, 0x22}, 0x1, {0xc004995800, 0x17, 0x20}, 0xc0129bd180, {0xc018ef33e2, 0x4e}}, 0xc0129bd130, ...)
16153
github.com/Knetic/govaluate@v3.0.1-0.20171022003610-9aa49832a739+incompatible/EvaluableExpression.go:205 +0x3b5
16154
github.com/Knetic/govaluate.EvaluableExpression.evaluateStage({{0x218ae09, 0x22}, 0x1, {0xc004995800, 0x17, 0x20}, 0xc0129bd180, {0xc018ef33e2, 0x4e}}, 0xc0129bd180, ...)
16155
github.com/Knetic/govaluate@v3.0.1-0.20171022003610-9aa49832a739+incompatible/EvaluableExpression.go:205 +0x3b5
16156
github.com/Knetic/govaluate.EvaluableExpression.Eval({{0x218ae09, 0x22}, 0x1, {0xc004995800, 0x17, 0x20}, 0xc0129bd180, {0xc018ef33e2, 0x4e}}, {0x2b19b00, ...})
16157
github.com/Knetic/govaluate@v3.0.1-0.20171022003610-9aa49832a739+incompatible/EvaluableExpression.go:163 +0x125
16158
github.com/Knetic/govaluate.EvaluableExpression.Evaluate({{0x218ae09, 0x22}, 0x1, {0xc004995800, 0x17, 0x20}, 0xc0129bd180, {0xc018ef33e2, 0x4e}}, 0xc016062ab0)
16159
github.com/Knetic/govaluate@v3.0.1-0.20171022003610-9aa49832a739+incompatible/EvaluableExpression.go:137 +0x9c
16160
github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/expressions.evaluate({0xc018ef3380?, 0xc018ef3320?}, 0x52?)
16161
github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/expressions/expressions.go:61 +0x198
16162
github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/expressions.EvaluateByte(...)
16163
github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/expressions/expressions.go:40
16164
github.com/projectdiscovery/nuclei/v2/pkg/protocols/network.(*Request).executeRequestWithPayloads(0xc003bcc800, 0xc00c181728, {0xc00cc712c0, 0x12}, {0xc00cc71080, 0x12}, {0xc00cc71080, 0x12}, 0x0, 0xc0105c2510, ...)
16165
github.com/projectdiscovery/nuclei/v2/pkg/protocols/network/request.go:159 +0x646
16166
github.com/projectdiscovery/nuclei/v2/pkg/protocols/network.(*Request).executeAddress(0xc003bcc800, 0xc00292bb50, {0xc00cc712c0, 0x12}, {0xc00cc71080, 0x12}, {0xc00cc71080, 0x12}, 0x1?, 0xc0194b9e00, ...)
16167
github.com/projectdiscovery/nuclei/v2/pkg/protocols/network/request.go:108 +0x666
16168
github.com/projectdiscovery/nuclei/v2/pkg/protocols/network.(*Request).ExecuteWithResults(0xc003bcc800, 0xc0031f8b40, 0xc00b69c6c0?, 0xc0255f52d8?, 0xc0194b9f20)
16169
github.com/projectdiscovery/nuclei/v2/pkg/protocols/network/request.go:71 +0x485
16170
github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/executer.(*Executer).Execute(0xc003c18520, 0xc0031f8af8)
16171
github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/executer/executer.go:92 +0x3f7
16172
github.com/projectdiscovery/nuclei/v2/pkg/core.(*Engine).executeTemplatesOnTarget.func1(0xc003bef680, 0xc023462c00, 0xc018589970?)
16173
github.com/projectdiscovery/nuclei/v2/pkg/core/executors.go:183 +0x23b
16174
created by github.com/projectdiscovery/nuclei/v2/pkg/core.(*Engine).executeTemplatesOnTarget
16175
github.com/projectdiscovery/nuclei/v2/pkg/core/executors.go:164 +0x45
16176
/home/ubuntu/hakrishi/_work/_actions/projectdiscovery/nuclei-action/main/dist/index.js:1598
16177
error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);
16178
^
16179
16180
Error: The process '/home/ubuntu/hakrishi/_work/_temp/57f4b23c-4c01-4062-9114-d1b26d3e5ec1/nuclei' failed with exit code 2
16181
at ExecState._setResult (/home/ubuntu/hakrishi/_work/_actions/projectdiscovery/nuclei-action/main/dist/index.js:1598:25)
16182
at ExecState.CheckComplete (/home/ubuntu/hakrishi/_work/_actions/projectdiscovery/nuclei-action/main/dist/index.js:1581:18)
16183
at ChildProcess.<anonymous> (/home/ubuntu/hakrishi/_work/_actions/projectdiscovery/nuclei-action/main/dist/index.js:1475:27)
16184
at ChildProcess.emit (node:events:513:28)
16185
at maybeClose (node:internal/child_process:1100:16)
16186
at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
@hakrishi this is an issue with nuclei core - https://github.com/projectdiscovery/nuclei/issues/4025 and fixed in https://github.com/projectdiscovery/nuclei/pull/4068 and will be part of next nuclei release.
closing as original issue in nuclei project is now resolved.
This code is not working,
Showing this error: