Recommended Approach for CI/CD Import Scans Where Each Engagement Is a Pipeline Run #12983
Replies: 3 comments 1 reply
-
In general this should work, but sometimes the hash_code configuration is not 100% able to match duplicate findings. Do you have some examples of the inconsisten results? |
Beta Was this translation helpful? Give feedback.
-
Ok, so here’s one example: I have two engagements. For simplicity, I imported two Grype scans, one into each engagement. Both scans have 303 total findings. We are assuming the Grype reports are nearly identical. The only difference is the container name being scanned, but in practice, it’s the same container when built. In one engagement, there are 0 active findings, while in the other there are 59 active findings for some reason. The engagement with 59 active findings was imported after the one with 0. Here’s one of the findings that doesn’t seem to be counted as a duplicate. It is flagged as a duplicate in the first imported report, but not in the one imported afterward. This may be because there were other equivalent imports prior to this example, but if that were the case, I would have expected it to be counted as a duplicate in both reports. Finding:
I have attached a csv file that goes more into detail on the finding I have shared. Let me know if you need more information from me. |
Beta Was this translation helpful? Give feedback.
-
Good suggestion. I actually ran into that issue before submitting this question and have since resolved that particular problem. Currently, each time I import a report into Dojo, I have enabled "Deduplicate findings" at the System Settings level. The documentation you shared shows it under Pro Settings. Since I am using the community version, I’m not sure if there is a significant difference there, but I wanted to note it in case it matters. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I use a community instance of DefectDojo and follow this CI/CD integration model:
Format:
Each engagement is created by the pipeline (triggered by a
git push
to a branch) and performs:This results in:
So, at minimum, 5 tests are imported per engagement.
Because there may be no significant changes between pipeline runs, the findings imported into Dojo can often be identical to those from previous runs.
I have enabled deduplication in the system-level UI settings, but I’m encountering inconsistent results, sometimes identical findings are recognized as duplicates, sometimes not, even when the reports are unchanged.
Note: I’m using
import-scan
instead ofreimport-scan
, since each engagement corresponds to a unique pipeline run.Question:
How can I ensure duplicates are labeled correctly even with deduplication enabled? Is this ultimately a limitation of my chosen engagement model, and would switching to a different engagement structure so I can use
reimport-scan
be more effective?Beta Was this translation helpful? Give feedback.
All reactions