-
Notifications
You must be signed in to change notification settings - Fork 178
Description
🐞 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
- Enable generic parser:
Lines 46 to 48 in 7367c12
| 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; |
- Setup SecureCodeBox + locally built persistence provider ^^.
- Run an instance of parser-SCB
- 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.