Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BlackDuck API report import issue. #11029

Closed
1 of 3 tasks
barucijah opened this issue Oct 9, 2024 · 2 comments
Closed
1 of 3 tasks

BlackDuck API report import issue. #11029

barucijah opened this issue Oct 9, 2024 · 2 comments
Labels

Comments

@barucijah
Copy link
Contributor

Slack us first!
I was writing in the Slack channel but no response.
https://owasp.slack.com/archives/C2P5BA8MN/p1727869238459629

Be informative
Please enter as much information as possible, otherwise we can't provide support. If possible upgrade to the latest release or dev version and try again.
I am using latest version of the DefectDojo

Bug description
Recently, we faced an issue with importing a report from Blackduck via the BlackDuckAPI config. I am unable to import this report, and I get the error' An exception error occurred during the report import: 'vulnerabilityWithRemediation'.
I have noticed that after upgrading the BlackDuck instance to the version v2024.7.0 we started getting this error. Before everything was working.
Also, I am using latest version of the defectdojo

Steps to reproduce
Steps to reproduce the behavior:

  1. re-upload report for the test with BlackDuckAPI

Expected behavior
I expect that the import will finish successfully.

Deployment method (select with an X)

  • Docker Compose
  • Kubernetes
  • GoDojo

Environment information

  • DefectDojo version v. 2.38.4
    Logs
    [09/Oct/2024 13:51:55] ERROR [dojo.api_v2.exception_handler:48] 'vulnerabilityWithRemediation' Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/rest_framework/views.py", line 506, in dispatch response = handler(request, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/rest_framework/mixins.py", line 19, in create self.perform_create(serializer) File "/app/dojo/api_v2/views.py", line 2576, in perform_create serializer.save(push_to_jira=push_to_jira) File "/app/dojo/api_v2/serializers.py", line 2608, in save self.process_scan(auto_create_manager, data, context) File "/app/dojo/api_v2/serializers.py", line 2560, in process_scan ).process_scan( ^^^^^^^^^^^^^ File "/app/dojo/importers/default_reimporter.py", line 93, in process_scan self.parsed_findings = self.parse_findings(scan, parser) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/dojo/importers/default_reimporter.py", line 302, in parse_findings self.parsed_findings = self.parse_findings_static_test_type(scan, parser) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/dojo/importers/default_reimporter.py", line 316, in parse_findings_static_test_type return super().parse_findings_static_test_type(scan, parser) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/dojo/importers/base_importer.py", line 159, in parse_findings_static_test_type return parser.get_findings(scan, self.test) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/dojo/tools/api_blackduck/parser.py", line 46, in get_findings vulnerability_id = entry["vulnerabilityWithRemediation"][ ~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ KeyError: 'vulnerabilityWithRemediation' [09/Oct/2024 13:51:55] ERROR [django.request:241] Internal Server Error: /api/v2/reimport-scan/
    Sample scan files
    If applicable, add sample scan files to help reproduce your problem.

Screenshots
Screenshot 2024-10-09 at 15 47 44

Additional context (optional)
Add any other context about the problem here.

@barucijah barucijah added the bug label Oct 9, 2024
@mtesauro
Copy link
Contributor

@barucijah Unfortunately with the API integrations, there's not much the project can do to assist with this as we don't have a license or install of Blackduck which we can test this error.

Have you tried the 3 different Blackduck file parsers we have - see https://documentation.defectdojo.com/integrations/parsers/file/

Perhaps one of those will work for you.

Without access to the API, I'm not sure how we reproduce this issue to be able to figure out a fix. ☹️

@mtesauro
Copy link
Contributor

Closing as discussion has moved to #11301

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants