Fixed remediations link not working (#8681)

This commit is contained in:
GabrieleDeri 2024-08-29 16:46:55 +02:00 committed by GitHub
parent b33118cd29
commit e280e42575
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 29 additions and 20 deletions

View file

@ -391,6 +391,7 @@ function alert_utils.formatFlowAlertMessage(ifid, alert, alert_json, add_score,
if (tonumber(alert_risk) == 0) then
alert_src = "ntopng"
alert_risk = tonumber(alert.alert_id)
else
alert_src = "nDPI"
end
@ -429,12 +430,12 @@ function alert_utils.formatFlowAlertMessage(ifid, alert, alert_json, add_score,
msg = alert_utils.format_score(msg, alert_score)
end
end
-- Add the link to the documentation
if alert_risk and alert_risk > 0 then
msg = string.format("%s %s %s",
msg, flow_risk_utils.get_documentation_link(alert_risk, alert_src),
flow_risk_utils.get_remediation_documentation_link(alert.alert_id, alert_src))
flow_risk_utils.get_remediation_documentation_link(alert_risk, alert_src))
local info_msg = alert_utils.get_flow_risk_info(alert_risk, alert_json)
-- Add check info_msg ~= alert.info to avoid duplicated in description msg