From 37f27524e1fa672cea108c419ff08c7726b1da4a Mon Sep 17 00:00:00 2001 From: To-om Date: Thu, 9 Jul 2020 08:32:35 +0200 Subject: [PATCH] #1424 Enforce MISP threat level range --- .../org/thp/thehive/connector/misp/services/MispExportSrv.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misp/connector/src/main/scala/org/thp/thehive/connector/misp/services/MispExportSrv.scala b/misp/connector/src/main/scala/org/thp/thehive/connector/misp/services/MispExportSrv.scala index d33f486745..561307a5f4 100644 --- a/misp/connector/src/main/scala/org/thp/thehive/connector/misp/services/MispExportSrv.scala +++ b/misp/connector/src/main/scala/org/thp/thehive/connector/misp/services/MispExportSrv.scala @@ -96,7 +96,7 @@ class MispExportSrv @Inject() ( client.createEvent( info = `case`.title, date = `case`.startDate, - threatLevel = 4 - `case`.severity, + threatLevel = math.min(4, math.max(1, 4 - `case`.severity)), published = false, analysis = 0, distribution = 0,