Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsers: Specify lists rather than dict.values() #10945

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dojo/tools/blackduck/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def ingest_findings(self, normalized_findings, test):

dupes[dupe_key] = finding

return dupes.values()
return list(dupes.values())

def format_title(self, i):
if i.channel_version_origin_id is not None:
Expand Down
2 changes: 1 addition & 1 deletion dojo/tools/blackduck_binary_analysis/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def ingest_findings(self, sorted_findings, test):

findings[unique_finding_key] = finding

return findings.values()
return list(findings.values())

def format_title(self, i):
title = f"{i.object_name}: {i.component} {i.version} Vulnerable"
Expand Down
2 changes: 1 addition & 1 deletion dojo/tools/h1/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def get_vulnerability_disclosure_json_findings(self, tree, test):
)
finding.unsaved_endpoints = []
dupes[dupe_key] = finding
return dupes.values()
return list(dupes.values())

def build_description(self, content):
date = content["attributes"]["created_at"]
Expand Down
2 changes: 1 addition & 1 deletion dojo/tools/intsights/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ def get_findings(self, file, test):
duplicates[dupe_key] = alert
if dupe_key not in duplicates:
duplicates[dupe_key] = True
return duplicates.values()
return list(duplicates.values())
2 changes: 1 addition & 1 deletion dojo/tools/mend/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,4 @@ def create_finding_key(f: Finding) -> str:
if dupe_key not in dupes:
dupes[dupe_key] = finding

return dupes.values()
return list(dupes.values())
2 changes: 1 addition & 1 deletion dojo/tools/qualys_webapp/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ def qualys_webapp_parser(qualys_xml_file, test, unique, enable_weakness=False):
).values(),
)

return items
return list(items)


class QualysWebAppParser:
Expand Down
2 changes: 1 addition & 1 deletion dojo/tools/sslscan/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@ def get_findings(self, file, test):
else:
endpoint = Endpoint(host=host, port=port)
finding.unsaved_endpoints.append(endpoint)
return dupes.values()
return list(dupes.values())
2 changes: 1 addition & 1 deletion dojo/tools/sslyze/parser_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,4 @@ def get_findings(self, file, test):
host=host, port=port, protocol=protocol,
),
)
return dupes.values()
return list(dupes.values())
2 changes: 1 addition & 1 deletion dojo/tools/whitehat_sentinel/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,4 +268,4 @@ def _convert_whitehat_sentinel_vulns_to_dojo_finding(
finding.unsaved_endpoints = endpoints
dupes[dupe_key] = finding

return dupes.values()
return list(dupes.values())
Loading