-
Notifications
You must be signed in to change notification settings - Fork 179
Closed
Labels
Milestone
Description
🐞 Bug report
Describe the bug
The Nikto parser is unable to properly parse findings when Nikto could not find a webserver (returns error as raw finding).
Steps To Reproduce
With Nikto installed, run a scan on a domain without a running webserver.
apiVersion: execution.securecodebox.io/v1
kind: Scan
metadata:
name: nuclei-scan
namespace: securecodebox-scanners
spec:
parameters:
- -host
- google.com
- -port
- "8080"
- -Tuning
- 1,2,3,5,7,b
scanType: nikto
Nikto logs
- Nikto v2.1.6
---------------------------------------------------------------------------
+ No web server found on google.com:8080
---------------------------------------------------------------------------
+ 0 host(s) tested
Nikto raw findings
{"id": "000029","OSVDB": "0","url":"/","msg":"No web server found on google.com:8080"}}Parser logs
Starting Parser
Fetching result file
Fetched result file
Parser failed with error:
TypeError: Cannot read property 'filter' of undefined
at parse (/home/app/parser-wrapper/parser/parser.js:47:26)
at main (/home/app/parser-wrapper/parser-wrapper.js:126:22)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
Furthermore, running Nikto on an unresolvable domain name, results in an empty raw findings file. Parser crashes with the same error.
Expected behavior
If there are no findings, or if Nikto encounters an error, the parser should not crash. The parser should create a finding of Nikto's error.
System (please complete the following information):
secureCodeBox v3.0.1