← 输入框|github.com|刷新
Skip to content

DefectDojo persistence provider unable to use new SecureCodeBox Findings Importer #490

Closed

Description

@EndPositive

🐞 Bug report

Describe the bug

The DefectDojo persistence provider is unable to import scan results using the new (unreleased) secureCodeBox parser. This is because the code expects a corresponding test type (i.e. "SecureCodeBox Findings Importer". As (briefly) explained in #4431, the test types are no longer updated for new importers.

This can be seen when manually importing scan results with the DefectDojo UI. Only a Scan Type has to be provided, which is derived from the available importers (see here). The same details have to be provided to the ImportScanSerializer in DefectDojo (API).

Due to the fact that SecureCodeBox's java wrapper/client is not up to date (#6), we can't currently fix this issue in this project. However, when the wrapper is updated, we will have to update the persistence-provider. This needs to be updated in order for the new parser to function.

If you need any more info, send me a msg on slack!

Steps To Reproduce

  1. Enable generic parser:

throw new IllegalArgumentException("No Mapping found for ScanType '" + scanType + "'");
// use this as soon as generic parser is released (in DD or this Hook)
// return ScanNameMapping.GENERIC;

  1. Setup SecureCodeBox + locally built persistence provider ^^.
  2. Run an instance of parser-SCB
  3. Start a random scan.
Exception in thread "main" io.securecodebox.persistence.exceptions.DefectDojoPersistenceException: Could not find test type 'SecureCodeBox Findings Import' in DefectDojo API. DefectDojo might be running in an unsupported version.
	at io.securecodebox.persistence.strategies.VersionedEngagementsStrategy.lambda$createTest$7(VersionedEngagementsStrategy.java:242)
	at java.base/java.util.Optional.orElseThrow(Optional.java:408)
	at io.securecodebox.persistence.strategies.VersionedEngagementsStrategy.createTest(VersionedEngagementsStrategy.java:242)
	at io.securecodebox.persistence.strategies.VersionedEngagementsStrategy.run(VersionedEngagementsStrategy.java:83)
	at io.securecodebox.persistence.DefectDojoPersistenceProvider.main(DefectDojoPersistenceProvider.java:58)

System (please complete the following information):

Additional context

Check out #6 in the defectdojo wrapper.

Activity

  1. added
    defectdojoAll issues regarding the DefectDojo Integration
    on Jun 10, 2021
  2. added this to the v3.0.0 milestone on Jun 10, 2021
  3. changed the title [-]DefectDojo persistence provider unable to user new SecureCodeBox Findings Importer[/-] [+]DefectDojo persistence provider unable to use new SecureCodeBox Findings Importer[/+] on Jun 10, 2021
  4. J12934 commented on Jun 10, 2021

    @J12934
    Member

    Hi

    The DefectDojo PR (DefectDojo/django-DefectDojo#4431) will likely not be the solution we'll settle on. @JohannesZahn is currently working on fixing this problem by using the Generic Finding JSON Importer in DefectDojo 2.0 coming later this month. More on that discussion and development in #332 and the WIP implementation in #487.

    I think by using this generic importer we also avoid this issue. Totally not sure thought, @JohannesZahn do you know more about that?

  5. EndPositive commented on Jun 10, 2021

    @EndPositive
    ContributorAuthor

    Looks like Johannes his PR works wonderfully! If we won't use a separate secureCodeBox findings importer, I'll close the issue. I'll keep #6 open for now in case Johannes still wants to update the wrapper.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBugsdefectdojoAll issues regarding the DefectDojo Integration

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions