|
| 1 | +--- |
| 2 | +title: "Semgrep Pro JSON Report" |
| 3 | +toc_hide: true |
| 4 | +--- |
| 5 | +Import Semgrep Pro findings in JSON format. |
| 6 | + |
| 7 | +### Sample Scan Data |
| 8 | +Sample Semgrep Pro JSON Report scans can be found [here](https://github.com/DefectDojo/django-DefectDojo/tree/master/unittests/scans/semgrep_pro). |
| 9 | + |
| 10 | +### Default Deduplication |
| 11 | +By default, DefectDojo uses the `match_based_id` from Semgrep Pro for deduplication. If this is not available, it falls back to using a combination of: |
| 12 | +- title |
| 13 | +- file path |
| 14 | +- line number |
| 15 | + |
| 16 | +### Fields Mapped |
| 17 | +The following fields are mapped from the Semgrep Pro JSON report: |
| 18 | + |
| 19 | +#### Basic Information |
| 20 | +- title: Mapped from `rule_name` |
| 21 | +- severity: Mapped from Semgrep Pro severity levels (ERROR/HIGH → High, WARNING/MEDIUM → Medium, INFO/LOW → Low) |
| 22 | +- file_path: Path to the affected file from `location.file_path` |
| 23 | +- line: Line number from `location.line` |
| 24 | +- unique_id_from_tool: Mapped from `match_based_id` |
| 25 | + |
| 26 | +#### Status Fields |
| 27 | +- active: Set to false if status is "fixed" or "removed" |
| 28 | +- verified: Set to true if triage_state is not "untriaged" |
| 29 | + |
| 30 | +#### Rich Content Fields |
| 31 | +- description: Includes: |
| 32 | + - Rule message and details |
| 33 | + - CWE references |
| 34 | + - OWASP references |
| 35 | + - Categories |
| 36 | + - Triage information |
| 37 | +- impact: Includes: |
| 38 | + - Vulnerability classes |
| 39 | + - Confidence level |
| 40 | + - Repository information |
| 41 | +- mitigation: Includes: |
| 42 | + - Guidance summary |
| 43 | + - Detailed instructions |
| 44 | + - Auto-fix suggestions |
| 45 | + - Auto-triage information |
| 46 | + - Component details and risk level |
| 47 | +- references: Includes: |
| 48 | + - Line of code URL |
| 49 | + - CWE references |
| 50 | + - OWASP references |
| 51 | + - External ticket information |
| 52 | + |
| 53 | +#### Component Information |
| 54 | +- component_name: Mapped from `assistant.component.tag` |
| 55 | + |
| 56 | +#### Additional Fields |
| 57 | +- static_finding: Always set to true |
| 58 | +- dynamic_finding: Always set to false |
| 59 | +- cwe: Extracted from first CWE reference if available |
| 60 | +- date: Mapped from `created_at` |
0 commit comments