Fixed webhook error indexing json field (#8786)

This commit is contained in:
GabrieleDeri 2024-10-29 19:25:00 +01:00 committed by GitHub
parent f978581261
commit c40baa8b22
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -102,7 +102,7 @@ local function formatAlertMsg(alert)
if json_decoded and json_decoded.flow_risk_info then
json_decoded.flow_risk_info = json.decode(json_decoded.flow_risk_info)
end
if json_decoded and json_decoded.alert_generation.flow_risk_info then
if json_decoded and json_decoded.alert_generation and json_decoded.alert_generation.flow_risk_info then
json_decoded.alert_generation.flow_risk_info = json.decode(json_decoded.alert_generation.flow_risk_info)
end
decoded_alert.json = json_decoded