django-DefectDojo icon indicating copy to clipboard operation
django-DefectDojo copied to clipboard

Nessus .CSV file upload error

Open farhansaifchowdhury opened this issue 3 years ago • 1 comments

While uploading Nessus File (.csv) I find the following error. Please help me resolve Nessus Error

farhansaifchowdhury avatar May 07 '22 17:05 farhansaifchowdhury

@farhansaifchowdhury it's hard to help without a real stack-trace or the report. Can you provide one of them (you can obfuscate the report also)?

damiencarol avatar May 08 '22 07:05 damiencarol

@damiencarol - Here's a stack trace we're getting when attempting to upload, "Nessus Scan" CSV results (v.2.23.0-dev):

[12/May/2023 15:53:53] ERROR [dojo.engagement.views:703] '0'
Traceback (most recent call last):
  File "/app/dojo/engagement/views.py", line 687, in import_scan_results
    test, finding_count, closed_finding_count, _ = importer.import_scan(scan, scan_type, engagement, user, environment, active=active, verified=verified, tags=tags,
                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/dojo/importers/importer/importer.py", line 337, in import_scan
    new_findings = self.process_parsed_findings(test, parsed_findings, scan_type, user, active=active,
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/dojo/decorators.py", line 47, in __wrapper__
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/celery/local.py", line 188, in __call__
    return self._get_current_object()(*a, **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/celery/app/task.py", line 392, in __call__
    return self.run(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/dojo/importers/importer/importer.py", line 79, in process_parsed_findings
    if minimum_severity and (Finding.SEVERITIES[item.severity] >
                             ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
KeyError: '0'

ninp0 avatar May 12 '23 15:05 ninp0

I'd keep an eye on #8072 - there's some updates to Nessus parsing that are close to being merged and should be in the release the first week of May

mtesauro avatar May 12 '23 18:05 mtesauro

@ninp0 do you still have this bug? #8072 is merged.

damiencarol avatar Aug 02 '23 15:08 damiencarol

No - appears to be working now...thanks for following up @damiencarol

ninp0 avatar Aug 02 '23 15:08 ninp0

This can be closed @mtesauro as the PR was merged.

manuel-sommer avatar Jan 14 '24 19:01 manuel-sommer