mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Fixes vulnerability scan alert
This commit is contained in:
parent
c9231fb32e
commit
7eaa652d0e
3 changed files with 27 additions and 6 deletions
|
|
@ -50,11 +50,19 @@ function alert_vulnerability_scan.format(ifid, alert, alert_type_params)
|
|||
end
|
||||
|
||||
if alert_type_params.num_new_cve_issues then
|
||||
msg = msg .. i18n('vulnerability_scan_alert_new_issues', { num_issues = alert_type_params.num_new_cve_issues }) .. " "
|
||||
local new_cve = table.concat(alert_type_params.new_cve or {}, ", ")
|
||||
if alert_type_params.num_new_cve_issues > 5 then
|
||||
new_cve = new_cve .. " and other " .. alert_type_params.num_new_cve_issues - 5
|
||||
end
|
||||
msg = msg .. i18n('vulnerability_scan_alert_new_issues', { num_issues = alert_type_params.num_new_cve_issues, new_cve = new_cve }) .. " "
|
||||
end
|
||||
|
||||
if alert_type_params.num_cve_solved then
|
||||
msg = msg .. i18n('vulnerability_scan_alert_solved_issues', { num_issues = alert_type_params.num_cve_solved }) .. " "
|
||||
local cve_solved = table.concat(alert_type_params.cve_solved or {}, ", ")
|
||||
if alert_type_params.num_cve_solved > 5 then
|
||||
cve_solved = cve_solved .. " and other " .. alert_type_params.num_cve_solved - 5
|
||||
end
|
||||
msg = msg .. i18n('vulnerability_scan_alert_solved_issues', { num_issues = alert_type_params.num_cve_solved, cve_solved = cve_solved }) .. " "
|
||||
end
|
||||
|
||||
return i18n('vulnerability_scan_alert', { msg = msg })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue