Kiuwan CSV Import silently drops some findings
Bug description When importing a kiuwan CSV report file. Some findings are dropped silently.
The parser in https://github.com/DefectDojo/django-DefectDojo/blob/master/dojo/tools/kiuwan/parser.py does not contain the file column in the description. Therefore findings that have the same description and line content have the same hash even if they are found in different files. This will skip the last found file.
Steps to reproduce
- Create a new project
- Create a new engagement
- Import the testfile
kiuwan-testscenario-missing-imports.csvwhich containes two findings - Only the first finding is imported. The second one is dropped silently
Expected behavior Both findings from the test file are imported and displayed.
Deployment method
- [ ] Docker Compose
- [ ] Kubernetes
- [ ] GoDojo
- [X] DefectDojo Saas (Pro Account)
Environment information
- DefectDojo Version 2.30.1 - Pro
Sample scan files kiuwan-testscenario-missing-imports.csv kiuwan-testscenario-missing-imports-working.csv
The second file contains the same import line from the first file to proof that the line itself does not contain any issues. It can imported successfully if the first line does not exist.
This can be closed @mtesauro
Thanks for the fast response @manuel-sommer.
Unfortunately this does not solve our issue. I tested you changes from the lasted dev branch.
In the attached test file I manually edited the CVE number to be able to better distinguish the results in the UI. In the real export from kiuwan the CVE is the same in both lines.
This file better refelcts this: kiuwan-testscenario-missing-imports.csv
The only difference is the file name. I created a pull request highlighting this change.
@mtesauro Is it possible to open this issue again? Or should I file a new one?
@flmarkus Yes. Re-opened
This can be closed again @mtesauro https://github.com/DefectDojo/django-DefectDojo/pull/9316
Thanks for accepting and merging my PR!