Skip to content
Snippets Groups Projects
Commit 4d639ee4 authored by Gioacchino Vino's avatar Gioacchino Vino
Browse files

Excluding not relevant issues

parent 96bdea45
No related branches found
No related tags found
1 merge request!120Excluding not relevant issues
......@@ -215,29 +215,6 @@ class Task:
with open(filename, "wb") as fh:
fh.write(base64.b64decode(code))
"""
def get_report_info2(self) -> Dict:
report = dict()
res = self.client.get_report(self.report_id,
report_format_id=ReportFormats.anonymous_xml,
ignore_pagination=True,
details="1")
threats = res.xpath('report/report/ports/port/threat/text()')
ports = res.xpath('report/report/ports/port/text()')
severities = res.xpath('report/report/ports/port/severity/text()')
severities = list(map(lambda a : float(a), severities))
for p,t,s in zip(ports, threats, severities):
report[p] = {'severity': s, 'threat': t}
glob_severity = -1 # severities are not negative
glob_threat = 'Log'
for threat,severity in zip(threats,severities):
if severity > glob_severity:
glob_severity = severity
glob_threat = threat
report['global'] = {'threat': glob_threat, 'severity': glob_severity}
return report """
def get_report_info(self, issues_to_drop: List[str]) -> Dict:
report = dict()
res = self.client.get_report(self.report_id,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment