Skip to content

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

@EndPositive

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.

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