-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Report pulled from tenable.sc version 5.16.0
when running number_of_plugins_per_risk_factor
all results return 0 on all factors. It seems to be because the they changed it from 'risk_factor' to 'severity'
def number_of_plugins_per_risk_factor(report_host, risk_factor_level):
"""
Function returns number of all plugins reported during scan for given risk factor for given target.
:param report_host: report host element
:param risk_factor_level:
'Critical'
'High'
'Medium'
'Low'
'None'
:return: number of plugins for given risk factor
"""
risk_factor_counter = 0
for report_item in report_host.findall("ReportItem"):
risk_factor = report_item.find('risk_factor')
if risk_factor is not None:
if risk_factor.text == risk_factor_level:
risk_factor_counter += 1
return risk_factor_counter
Metadata
Metadata
Assignees
Labels
No labels