|
10 | 10 |
|
11 | 11 | WHAT = "ReversingLabs Spectra Assure" |
12 | 12 |
|
13 | | -""" |
14 | | -dedup on title: |
15 | | -
|
16 | | -if a finding is a Dependency: |
17 | | - title: |
18 | | - "<cve>, 'dep': <purl | name+version>" |
19 | | -
|
20 | | - description: |
21 | | - "<title>\n<number> component: <purl | name+version>, <sha256>, 'id in report.rl.json': <dep-uuid>\n" |
22 | | -
|
23 | | - for each duplicate title: (so the same Dependency): |
24 | | - increment occurrences and append to description of the first detected: |
25 | | -
|
26 | | - "<number+1> component: <purl | name+version>, <sha256>, 'id in report.rl.json': <dep-uuid>\n" |
27 | | -
|
28 | | -if a finding is a Component it is already unique. |
29 | | - title: |
30 | | - "<cve>, 'comp': <purl | name+version>, <sha256>" |
31 | | - occurrences = 1 |
32 | | -
|
33 | | - description: |
34 | | - <title>\n |
35 | | -
|
36 | | -Note: |
37 | | - We have components with the same name and version but different hash value. |
38 | | - This is typical for windows installers with multi language support. |
39 | | - A good example is: HxDSetup_2.5.0.exe |
40 | | -
|
41 | | - Parser for Spectra Assure rl-json files |
42 | | -
|
43 | | - This class MUST implement 3 methods: |
44 | | -
|
45 | | - - def get_scan_types(self) |
46 | | - This function return a list of all the scan_type supported by your parser. |
47 | | - These identifiers are used internally. |
48 | | - Your parser can support more than one scan_type. |
49 | | - e.g. some parsers use different identifier to modify the behavior of the parser (aggregate, filter, etc…) |
50 | | -
|
51 | | - - def get_label_for_scan_types(self, scan_type) |
52 | | - This function return a string used to provide some text in the UI (short label) |
53 | | -
|
54 | | - - def get_description_for_scan_types(self, scan_type) |
55 | | - This function return a string used to provide some text in the UI (long description) |
56 | | -
|
57 | | - - def get_findings(self, file, test) |
58 | | - This function return a list of findings |
59 | | -
|
60 | | - If your parser has more than 1 scan_type (for detailed mode) you MUST implement: |
61 | | - - def set_mode(self, mode) method |
62 | | -""" |
63 | | - |
64 | 13 |
|
65 | 14 | class ReversinglabsSpectraassureParser: |
66 | 15 |
|
|
0 commit comments