Skip to content

Commit 4d518a6

Browse files
committed
udpate
1 parent 10a89e4 commit 4d518a6

3 files changed

Lines changed: 1 addition & 8 deletions

File tree

dojo/tools/stackhawk/parser.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ def __init__(self, completed_scan):
1414
self.component_version = completed_scan["scan"]["env"]
1515
self.static_finding = False
1616
self.dynamic_finding = True
17-
self.service = completed_scan["scan"]["application"]
1817

1918

2019
class StackHawkParser:
@@ -106,7 +105,6 @@ def __extract_finding(
106105
dynamic_finding=metadata.dynamic_finding,
107106
vuln_id_from_tool=raw_finding["pluginId"],
108107
nb_occurences=raw_finding["totalCount"],
109-
service=metadata.service,
110108
false_p=are_all_endpoints_false_positive,
111109
risk_accepted=are_all_endpoints_risk_accepted,
112110
)

unittests/test_importers_performance.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ def _import_reimport_performance(
201201
"verified": True,
202202
"sync": True,
203203
"scan_type": scan_type,
204-
"service": "Secured Application",
205204
"tags": ["performance-test-reimport", "reimport-tag-in-param", "reimport-go-faster"],
206205
"apply_tags_to_findings": True,
207206
}
@@ -231,7 +230,6 @@ def _import_reimport_performance(
231230
"verified": True,
232231
"sync": True,
233232
"scan_type": scan_type,
234-
"service": "Secured Application",
235233
}
236234
reimporter = DefaultReImporter(**reimport_options)
237235
test, _, _len_new_findings, _len_closed_findings, _, _, _ = reimporter.process_scan(scan)
@@ -259,9 +257,6 @@ def _import_reimport_performance(
259257
"verified": True,
260258
"sync": True,
261259
"scan_type": scan_type,
262-
# StackHawk parser sets the service field causing close old findings to fail if we do not specify the service field
263-
# This is a big problem that needs fixing. Parsers should not set the service field.
264-
"service": "Secured Application",
265260
"close_old_findings": close_old_findings4,
266261
}
267262
reimporter = DefaultReImporter(**reimport_options)

unittests/tools/test_stackhawk_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ def __assertFindingEquals(
243243
self.assertTrue(actual_finding.dynamic_finding)
244244
self.assertEqual(finding_id, actual_finding.vuln_id_from_tool)
245245
self.assertEqual(count, actual_finding.nb_occurences)
246-
self.assertEqual(application_name, actual_finding.service)
246+
self.assertIsNone(actual_finding.service)
247247
self.assertEqual(false_positive, actual_finding.false_p)
248248
self.assertEqual(risk_accepted, actual_finding.risk_accepted)
249249
# The following fields should be not be set from this parser.

0 commit comments

Comments
 (0)