Skip to content

Commit fcfee2f

Browse files
importers: defend against parsers returning None (#13335)
1 parent 0399b58 commit fcfee2f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dojo/importers/default_importer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def process_scan(
108108
parser = self.get_parser()
109109
# Get the findings from the parser based on what methods the parser supplies
110110
# This could either mean traditional file parsing, or API pull parsing
111-
parsed_findings = self.parse_findings(scan, parser)
111+
parsed_findings = self.parse_findings(scan, parser) or []
112112
# process the findings in the foreground or background
113113
new_findings = self.determine_process_method(parsed_findings, **kwargs)
114114
# Close any old findings in the processed list if the the user specified for that

dojo/importers/default_reimporter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def process_scan(
9393
parser = self.get_parser()
9494
# Get the findings from the parser based on what methods the parser supplies
9595
# This could either mean traditional file parsing, or API pull parsing
96-
parsed_findings = self.parse_findings(scan, parser)
96+
parsed_findings = self.parse_findings(scan, parser) or []
9797
# process the findings in the foreground or background
9898
(
9999
new_findings,

0 commit comments

Comments
 (0)