django-DefectDojo
django-DefectDojo copied to clipboard
Bugfixing when the Checkov report has no findings
Current error log:
[29/Mar/2022 11:55:54] ERROR [dojo.api_v2.exception_handler:26] 'check_type' Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 506, in dispatch response = handler(request, *args, **kwargs) File "/usr/local/lib/python3.8/site-packages/rest_framework/mixins.py", line 19, in create self.perform_create(serializer) File "/app/./dojo/api_v2/views.py", line 1957, in perform_create serializer.save(push_to_jira=push_to_jira) File "/app/./dojo/api_v2/serializers.py", line 1246, in save test, finding_count, closed_finding_count = importer.import_scan(scan, scan_type, engagement, lead, environment, File "/app/./dojo/importers/importer/importer.py", line 349, in import_scan parsed_findings = parser.get_findings(scan, test) File "/app/./dojo/tools/checkov/parser.py", line 22, in get_findings check_type = tree['check_type'] KeyError: 'check_type' [29/Mar/2022 11:55:54] ERROR [django.request:224] Internal Server Error: /api/v2/import-scan/ ERROR:django.request:Internal Server Error: /api/v2/import-scan/ [pid: 1|app: 0|req: 2020/4117] 10.6.33.147 () {44 vars in 738 bytes} [Tue Mar 29 11:55:54 2022] POST /api/v2/import-scan/ => generated 59 bytes in 54 msecs (HTTP/1.1 500) 7 headers in 212 bytes (1 switches on core 1)
Hi @dvelardez, thanks for the change, can you please provide a unit test as well?
Yes, of course, in a few days I will update the unit tests.Thanks.El 1 abr. 2022 04:40, Stefan Fleckenstein @.***> escribió: Hi @dvelardez, thanks for the change, can you please provide a unit test as well?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
@dvelardez, thank you for the PR, because the change is so small, I'm going to merge. I don't see the possibility of this PR having a negative implication. Thank you again for your PR.