|
7 | 7 |
|
8 | 8 | from dojo.models import Finding |
9 | 9 | from dojo.tools.parser_test import ParserTest |
10 | | - |
11 | | -from dojo.tools.sarif.parser import SarifParser |
12 | | -from dojo.tools.sarif.parser import ( |
13 | | - get_codeFlowsDescription, |
14 | | - get_snippet, |
15 | | - get_title, |
16 | | - get_severity, |
17 | | - get_references, |
18 | | - cve_try, |
19 | | - get_rule_cwes, |
20 | | - get_result_cwes_properties, |
21 | | - cvss_to_severity, |
22 | | - get_properties_tags, |
23 | | - get_fingerprints_hashes, |
24 | | - get_rules |
25 | | - ) |
26 | | - |
| 10 | +from dojo.tools.sarif.parser import (SarifParser, cve_try, cvss_to_severity, |
| 11 | + get_codeFlowsDescription, |
| 12 | + get_fingerprints_hashes, |
| 13 | + get_properties_tags, get_references, |
| 14 | + get_result_cwes_properties, get_rule_cwes, |
| 15 | + get_rules, get_severity, get_snippet, |
| 16 | + get_title) |
27 | 17 |
|
28 | 18 | logger = logging.getLogger(__name__) |
29 | 19 |
|
30 | 20 | CWE_REGEX = r"cwe-\d+" |
31 | 21 |
|
32 | 22 |
|
33 | 23 | class MayhemParser(SarifParser): |
| 24 | + |
34 | 25 | """ |
35 | 26 | Mayhem SARIF Parser |
| 27 | +
|
36 | 28 | This class extends the existing SARIF parser, but with some minor |
37 | 29 | modifications to better support the structure of Mayhem SARIF reports. |
38 | 30 | """ |
@@ -81,7 +73,7 @@ def __get_items_from_run(self, run): |
81 | 73 | if result_items: |
82 | 74 | items.extend(result_items) |
83 | 75 | return items |
84 | | - |
| 76 | + |
85 | 77 | def __get_last_invocation_date(self, data): |
86 | 78 | invocations = data.get("invocations", []) |
87 | 79 | if len(invocations) == 0: |
|
0 commit comments