DefectDojo / django-DefectDojo

DevSecOps, ASPM, Vulnerability Management. All on one platform.
https://defectdojo.com
BSD 3-Clause "New" or "Revised" License
3.62k stars 1.52k forks source link

'OpenVASCsvParser' object has no attribute 'chain' when importing a OpenVAS scan #3976

Closed MauJFernandez closed 3 years ago

MauJFernandez commented 3 years ago

DefectDojo version: 1.13.1. Installation type: Docker. OpenVAS version: 20.08. Steps: 1- Add a product. 2- Add engagement. 3- Import CSV scan from OpenVAS. 4- Submit and a toast with "An error has occurred in the parser, please see error log for details" appears at the top.

If I docker logs django-defectdojo_uwsgi_1 I see this:

[02/Mar/2021 17:55:46] ERROR [dojo:590] 'OpenVASCsvParser' object has no attribute 'chain' Traceback (most recent call last): File "./dojo/engagement/views.py", line 583, in import_scan_results parser_findings = parser.get_findings(file, t) File "./dojo/tools/openvas_csv/parser.py", line 338, in get_findings self.chain.process_column(self.column_names[column_number], column, finding) AttributeError: 'OpenVASCsvParser' object has no attribute 'chain' [02/Mar/2021 17:55:46] ERROR [dojo:591] Error in parser: 'OpenVASCsvParser' object has no attribute 'chain'

Expected behavior: The scan fully imported as findings.

damiencarol commented 3 years ago

it's a bug. I'm preparing a pull request. is it possible to have the scan ?

MauJFernandez commented 3 years ago

I'm sorry but no, it's work stuff, I failed to mention it in the OP. Do you need anything specific? A pattern? Searching for some weird character?

MauJFernandez commented 3 years ago

@damiencarol I dumbed down one of the reports to a single data row CSV and was able to reproduce the error, I attach said file.

report-e2759495-f26d-4089-9c56-12a10dc36c9c.csv.tar.gz

damiencarol commented 3 years ago

@MauJFernandez Thanks for the data. We are preparing a new 1.13.2 release that will contain the fixes.

damiencarol commented 3 years ago

@MauJFernandez it's merged in dev and master and part of last release 1.13.2 thanks for sharing!