Skip to content

Commit 3e4c78e

Browse files
author
Your Name
committed
ruff adapt
1 parent 2d7eb2b commit 3e4c78e

2 files changed

Lines changed: 1 addition & 52 deletions

File tree

dojo/tools/reversinglabs_spectraassure/parser.py

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -10,57 +10,6 @@
1010

1111
WHAT = "ReversingLabs Spectra Assure"
1212

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-
6413

6514
class ReversinglabsSpectraassureParser:
6615

dojo/tools/reversinglabs_spectraassure/rlJsonInfo/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ def get_results_list(self) -> list[CveInfoNode]:
522522

523523
for compo in self._results.values():
524524
for component in compo.values():
525-
for cin in component.values(): # ruff: noqa: UP028
525+
for cin in component.values():
526526
rr.append(cin)
527527
return rr
528528

0 commit comments

Comments
 (0)