diff --git a/Sekoia.io/action_get_an_alert.json b/Sekoia.io/action_get_an_alert.json index 6b76194cf..bfd561016 100644 --- a/Sekoia.io/action_get_an_alert.json +++ b/Sekoia.io/action_get_an_alert.json @@ -574,6 +574,48 @@ } } }, + "custom_status_uuid": { + "type": "string", + "format": "uuid", + "x-nullable": true, + "description": "UUID of the custom status associated to the alert" + }, + "custom_status": { + "x-nullable": true, + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "label": { + "type": "string" + }, + "level": { + "type": "integer" + }, + "stage": { + "type": "string" + } + } + }, + "verdict": { + "x-nullable": true, + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "label": { + "type": "string" + }, + "level": { + "type": "integer" + }, + "stage": { + "type": "string" + } + } + }, "created_by": { "type": "string" }, diff --git a/Sekoia.io/action_patch_an_alert.json b/Sekoia.io/action_patch_an_alert.json index 98cd97ba9..944725a4b 100644 --- a/Sekoia.io/action_patch_an_alert.json +++ b/Sekoia.io/action_patch_an_alert.json @@ -48,6 +48,16 @@ "maxLength": 10000, "description": "Title of the alert", "in": "body" + }, + "verdict_uuid": { + "description": "Verdict of the alert", + "type": "string", + "in": "body" + }, + "custom_status_uuid": { + "description": "Custom status of the alert", + "type": "string", + "in": "body" } }, "required": [ @@ -137,6 +147,60 @@ "type": "string" } } + }, + "custom_status_uuid": { + "type": "string", + "format": "uuid", + "x-nullable": true, + "description": "UUID of the custom status associated to the alert" + }, + "custom_status": { + "x-nullable": true, + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "label": { + "type": "string" + }, + "level": { + "type": "integer" + }, + "stage": { + "type": "string" + } + } + }, + "verdict_uuid": { + "type": "string", + "format": "uuid", + "x-nullable": true, + "description": "UUID of the verdict associated to the alert" + }, + "verdict": { + "x-nullable": true, + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "label": { + "type": "string" + }, + "level": { + "type": "integer" + }, + "stage": { + "type": "string" + } + }, + "required": [ + "description", + "label", + "level", + "stage" + ] }, "created_by": { "type": "string" diff --git a/Sekoia.io/sekoiaio/triggers/alerts.py b/Sekoia.io/sekoiaio/triggers/alerts.py index 98d01c80e..e0eb7f73f 100644 --- a/Sekoia.io/sekoiaio/triggers/alerts.py +++ b/Sekoia.io/sekoiaio/triggers/alerts.py @@ -82,6 +82,14 @@ def handle_event(self, message): "name": alert.get("status", {}).get("name"), "uuid": alert.get("status", {}).get("uuid"), }, + "custom_status": { + "name": alert.get("custom_status", {}).get("label"), + "uuid": alert.get("custom_status", {}).get("uuid"), + }, + "verdict": { + "name": alert.get("verdict", {}).get("label"), + "uuid": alert.get("verdict", {}).get("uuid"), + }, "created_at": alert.get("created_at"), "urgency": alert.get("urgency", {}).get("current_value"), "entity": alert.get("entity", {}),