You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SARIF parser customizes the Test_Type with data from the report.
10
-
For example, a report with `Dockle` as a driver name will produce a Test with a Test_Type named `Dockle Scan (SARIF)`
9
+
Current implementation will aggregate all the findings in the SARIF file into a single report.
11
10
12
-
Current implementation is limited and will aggregate all the findings in the SARIF file in one single report.
11
+
## How Test Types Are Determined
13
12
14
-
##### Support for de-duplication (fingerprinting)
13
+
Unlike most parsers in DefectDojo, the SARIF parser has a **report-defined Test Type**. When you import a SARIF file with `scan_type=SARIF`, DefectDojo reads the tool name from within the SARIF file at `runs[].tool.driver.name` and uses it to construct the Test Type name.
15
14
16
-
SARIF parser take into account data for fingerprinting. It's base on `fingerprints` and `partialFingerprints` properties.
17
-
It's possible to activate de-duplication based on this data by customizing settings.
15
+
The naming pattern is: **`{tool name} ({scan_type})`**
16
+
17
+
For example:
18
+
19
+
| Tool |`runs[].tool.driver.name` value | Resulting Test Type |
This means that even though all of these tools produce SARIF output and are imported with `scan_type=SARIF`, each tool will create a **distinct Test Type** in DefectDojo. For more information on how report-defined Test Types work, see **[Test Types](/asset_modelling/hierarchy/product_hierarchy#test-types)**.
27
+
28
+
## Reimporting SARIF Results
29
+
30
+
When using the `/api/v2/reimport-scan/` endpoint, DefectDojo needs to match incoming results to an existing Test. Understanding how this matching works is important when multiple SARIF-based tools are reporting into the same Engagement.
31
+
32
+
### One Tool Per Test
33
+
34
+
Each Test in DefectDojo represents results from a single tool. SARIF results from different tools (e.g. Semgrep, Trivy, MobSF) cannot be combined into the same Test, even though they share the same `scan_type=SARIF`. DefectDojo enforces this by validating that the tool name inside the SARIF file matches the existing Test's Test Type on reimport.
35
+
36
+
This constraint is what makes reimport's comparison logic reliable: when a Finding is absent from a new report, DefectDojo can safely assume it has been resolved. If results from multiple tools were mixed in a single Test, DefectDojo would not be able to distinguish between a resolved Finding and a Finding that simply isn't covered by the current tool.
37
+
38
+
## Support for Deduplication (Fingerprinting)
39
+
40
+
The SARIF parser takes into account data for fingerprinting, based on the `fingerprints` and `partialFingerprints` properties in the SARIF file. It's possible to activate deduplication based on this data by customizing settings:
Sample SARIF scans can be found [here](https://github.com/DefectDojo/django-DefectDojo/tree/master/unittests/scans/sarif).
26
49
27
50
### Default Deduplication Hashcode Fields
28
-
By default, DefectDojo identifies duplicate Findings using these [hashcode fields](https://docs.defectdojo.com/en/working_with_findings/finding_deduplication/about_deduplication/):
51
+
By default, DefectDojo identifies duplicate Findings using these [hashcode fields](/triage_findings/finding_deduplication/about_deduplication):
0 commit comments