Skip to content

Commit

Permalink
#1424 Enforce MISP threat level range
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Jul 9, 2020
1 parent 2b91a5a commit c74d753
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions thehive-misp/app/connectors/misp/MispExport.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class MispExport @Inject()(

lazy val dateFormat = new SimpleDateFormat("yy-MM-dd")
private[misp] lazy val alertSrv = alertSrvProvider.get
lazy val logger: Logger = Logger(getClass)
lazy val logger: Logger = Logger(getClass)

def relatedMispEvent(mispName: String, caseId: String): Future[(Option[String], Option[String])] = {
import org.elastic4play.services.QueryDSL._
Expand Down Expand Up @@ -74,7 +74,7 @@ class MispExport @Inject()(
val mispEvent = Json.obj(
"Event" Json.obj(
"distribution" 0,
"threat_level_id" (4 - severity),
"threat_level_id" math.min(4, math.max(1, 4 - severity)),
"analysis" 0,
"info" title,
"date" dateFormat.format(date),
Expand Down

0 comments on commit c74d753

Please sign in to comment.