Skip to content

Commit

Permalink
fix(Qualys parser): wrong handling enable_weakness (#10105)
Browse files Browse the repository at this point in the history
  • Loading branch information
kiblik authored Jun 3, 2024
1 parent f9d74f1 commit 5b798a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions dojo/tools/qualys_webapp/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ def get_unique_items(
if qid in g_qid_list:
index = g_qid_list.index(qid)
findings[unique_id] = get_glossary_item(
glossary[index], finding, enable_weakness
glossary[index], finding, enable_weakness=enable_weakness
)
for unique_id, finding in get_unique_vulnerabilities(
info_gathered, test, True, is_app_report
Expand All @@ -364,7 +364,7 @@ def get_unique_items(
if qid in g_qid_list:
index = g_qid_list.index(qid)
finding = get_glossary_item(
glossary[index], finding, True, enable_weakness
glossary[index], finding, True, enable_weakness=enable_weakness
)
if qid in ig_qid_list:
index = ig_qid_list.index(qid)
Expand Down Expand Up @@ -393,15 +393,15 @@ def get_items(
if qid in g_qid_list:
index = g_qid_list.index(qid)
findings[qid] = get_glossary_item(
glossary[index], finding, enable_weakness
glossary[index], finding, enable_weakness=enable_weakness
)
for qid, finding in get_vulnerabilities(
info_gathered, test, True, is_app_report
).items():
if qid in g_qid_list:
index = g_qid_list.index(qid)
finding = get_glossary_item(
glossary[index], finding, True, enable_weakness
glossary[index], finding, True, enable_weakness=enable_weakness
)
if qid in ig_qid_list:
index = ig_qid_list.index(qid)
Expand Down
4 changes: 2 additions & 2 deletions unittests/tools/test_qualys_webapp_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ def test_qualys_webapp_parser_info_is_vuln(self):
for finding in findings:
for endpoint in finding.unsaved_endpoints:
endpoint.clean()
# 18 non-info findings, 21 total
self.assertEqual(18, len([x for x in findings if x.severity != "Info"]))
# 21 non-info findings, 21 total
self.assertEqual(21, len([x for x in findings if x.severity != "Info"]))
self.assertEqual(21, len(findings))

0 comments on commit 5b798a9

Please sign in to comment.