This means that only scan types are supported by the hook which are both supported by the secureCodeBox and DefectDojo. These are:
- ZAP (Baseline, API Scan and Full Scan)
Nikto is currently not supported even though it's supported by the secureCodeBox and DefectDojo as the secureCodeBox uses the Nikto JSON format while DefectDojo uses the XML format.
After uploading the results to DefectDojo it will use the findings parsed by DefectDojo to overwrite the original secureCodeBox findings identified by the parser. This lets you access the finding metadata like the false positive and duplicate status from DefectDojo in further ReadOnly hooks, e.g. send out slack notification for non-duplicate & non-false positive findings only.
Be careful when using the DefectDojo Hook in combination with other ReadAndWrite hooks. The secureCodeBox currently has no way to guarantee that one ReadAndWrite hook gets executed before another ReadAndWrite hook. This can lead to "lost update" problems as the DefectDojo hook will overwrite all findings, which disregards the results of previously run ReadAndWrite hooks. ReadOnly hooks work fine with the DefectDojo hook as they are always executed after ReadAndWrite Hooks.
The hook will automatically import the scan results into an engagement in DefectDojo. If the engagement doesn't exist the hook will create the engagement (CI/CD engagement) and all objects required for it (product & product type).
You don't need any configuration for that to work, the hook will infer engagement & product names from the scan name. If you want more control over the names or add additional meta information like the version of the tested software you can add these via annotation to the scan. See examples below.
|Scan Annotation||Description||Default if not set||Notes|
|Name of the Product Type||Product Type with ID 1 (typically "Research and Development")||Product Type will be automatically created if no Product Type under that name exists|
|Name of the Product||ScheduledScan Name if Scheduled, Scan Name if it's a standalone Scan||Product will be automatically created if no Product under that name exists|
|Description of the Product||Empty String||Only used when creating the Product not used for updating|
|Product Tags||Nothing||Only used when creating the Product not used for updating|
|Name of the Engagement||Scan Name||Will be automatically created if not Engagement with that name and version exists|
|Engagement Tags||Nothing||Only used when creating the Product not used for updating|
Simple Example Scans
This will import the results daily into an engagements called: "zap-juiceshop-$UNIX_TIMESTAMP" (Name of the Scan created daily by the ScheduledScan), in a Product called: "zap-juiceshop" in the default DefectDojo product type.
Complete Example Scan
This will import the results into engagement, product and product type following the labels. The engagement will be reused by the hook for the daily scans / imports until the engagement version is increased.
Installing the DefectDojo persistenceProvider hook will add a ReadOnly Hook to your namespace.
|defectdojo.authentication.apiKeyKey||string||Name of the apikey key in the |
|defectdojo.authentication.userSecret||string||Link a pre-existing generic secret with |
|defectdojo.authentication.usernameKey||string||Name of the username key in the |
|defectdojo.syncFindingsBack||bool||Syncs back (two way sync) all imported findings from DefectDojo to SCB Findings Store, set to false to only import the findings to DefectDojo (one way sync).|
|defectdojo.url||string||Url to the DefectDojo Instance|
|image.repository||string||Hook image repository|
|image.tag||string||Container image tag|