Added to double severity alert, single default alert

Implements #4919
This commit is contained in:
Matteo Biscosi 2021-01-28 18:17:27 +01:00
parent 055fbd5589
commit b1134b611f
7 changed files with 34 additions and 16 deletions

View file

@ -6,6 +6,7 @@ local user_scripts = require "user_scripts"
local flow_risks = require "flow_risk_utils"
local plugins_utils = require "plugins_utils"
local alerts_api = require "alerts_api"
local alert_severities = require "alert_severities"
-- #################################################################
@ -57,7 +58,10 @@ local script = {
}
},
is_alert = true,
default_value = {
severity = alert_severities.error,
items = {
1,2,3,4,5,
-- 6,7,8,9,10,
@ -171,7 +175,7 @@ function script.hooks.protocolDetected(now, conf)
if handler and handler.handle_risk then
-- Handler expect three params, namely flow-, client- and server-scores
handler.handle_risk(risk_id, table.unpack(risk2scores[risk_id] or DEFAULT_SCORES))
handler.handle_risk(conf, risk_id, table.unpack(risk2scores[risk_id] or DEFAULT_SCORES))
end
::continue::