Skip to content

Bug Fix: improve Kiuwan SCA parser to support multi component findings #12753

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

Open
wants to merge 2 commits into
base: bugfix
Choose a base branch
from

Conversation

mwager
Copy link
Contributor

@mwager mwager commented Jul 7, 2025

This PR enhances the Kiuwan SCA Parser by modifying the logic to create one finding per component, instead of taking only the first component from the components array.

The buggy code:

grafik

Motivation

In the current implementation, for a given CVE from a Kiuwan SCA scan, only the first component listed is used to create a finding. However, many CVEs in Kiuwan are related to multiple components. This leads to loss of detail and incomplete representation of risks in DefectDojo.

Test results

  • Manual test with real-world Kiuwan JSON input shows that all findings are now preserved and properly associated with the correct component.

This checklist is for your information.

  • Bugfixes should be submitted against the bugfix branch.
  • Give a meaningful name to your PR, as it may end up being used in the release notes.
  • Your code is flake8 compliant.
  • Your code is python 3.11 compliant.
  • Add applicable tests to the unit tests.
  • Add the proper label to categorize your PR.

@mwager mwager requested review from Maffooch and mtesauro as code owners July 7, 2025 13:09
@github-actions github-actions bot added the parser label Jul 7, 2025
Copy link

dryrunsecurity bot commented Jul 7, 2025

DryRun Security

No security concerns detected in this pull request.


All finding details can be found in the DryRun Security Dashboard.

@mwager
Copy link
Contributor Author

mwager commented Jul 7, 2025

TODO: Ideally you extend the test suite in tests/ and dojo/unittests to cover the changed in this PR.

I will soon check how to update & run unit tests, any info/docs on it appreciated :)

@valentijnscholten
Copy link
Member

Thanks for looking into this, information on running unit tests: https://github.com/DefectDojo/django-DefectDojo/blob/master/readme-docs/DOCKER.md#run-the-tests-with-docker-compose

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

Successfully merging this pull request may close these issues.

2 participants