Skip to content

Commit

Permalink
Merge branch 'hotfix/3.0.9'
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Apr 13, 2018
2 parents 417209d + bb0f728 commit bd257eb
Show file tree
Hide file tree
Showing 15 changed files with 69 additions and 20 deletions.
24 changes: 23 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
# Change Log

## [3.0.8](https://github.com/TheHive-Project/TheHive/tree/3.0.8) (2018-04-03)
## [3.0.9](https://github.com/TheHive-Project/TheHive/tree/3.0.9)
[Full Changelog](https://github.com/TheHive-Project/TheHive/compare/3.0.8...3.0.9)

**Fixed bugs:**

- Cortex connection can fail without any error log [\#543](https://github.com/TheHive-Project/TheHive/issues/543)
- PhishTank Cortex Tag is transparent [\#535](https://github.com/TheHive-Project/TheHive/issues/535)
- Naming inconsistencies in Live-Channel [\#531](https://github.com/TheHive-Project/TheHive/issues/531)
- Error when trying to analyze a filename with the Hybrid Analysis analyzer [\#530](https://github.com/TheHive-Project/TheHive/issues/530)
- Long Report isn't shown [\#527](https://github.com/TheHive-Project/TheHive/issues/527)
- Artifacts' sighted flags are not merged when merging cases [\#518](https://github.com/TheHive-Project/TheHive/issues/518)
- TheHive MISP cert validation, the trustAnchors parameter must be non-empty [\#452](https://github.com/TheHive-Project/TheHive/issues/452)

**Closed issues:**

- The Hive - MISP SSL configuration: General SSLEngine problem [\#544](https://github.com/TheHive-Project/TheHive/issues/544)
- Dropdown menu for case templates doesnt have scroll [\#541](https://github.com/TheHive-Project/TheHive/issues/541)

**Merged pull requests:**

- Update spacing for elasticsearch section in docker-compose yml file [\#539](https://github.com/TheHive-Project/TheHive/pull/539) ([jbarlow-mcafee](https://github.com/jbarlow-mcafee))

## [3.0.8](https://github.com/TheHive-Project/TheHive/tree/3.0.8) (2018-04-04)
[Full Changelog](https://github.com/TheHive-Project/TheHive/compare/3.0.7...3.0.8)

**Fixed bugs:**
Expand Down
4 changes: 2 additions & 2 deletions docker/thehive/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ services:
- thread_pool.bulk.queue_size=100000
ulimits:
nofile:
soft: 65536
hard: 65536
soft: 65536
hard: 65536
cortex:
image: certbdf/cortex:latest
depends_on:
Expand Down
1 change: 1 addition & 0 deletions thehive-backend/app/services/CaseMergeSrv.scala
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ class CaseMergeSrv @Inject() (
.set("tags", JsArray(sameArtifacts.flatMap(_.tags()).distinct.map(JsString)))
.set("ioc", JsBoolean(sameArtifacts.map(_.ioc()).reduce(_ || _)))
.set("status", mergeArtifactStatus(sameArtifacts))
.set("sighted", JsBoolean(sameArtifacts.map(_.sighted()).reduce(_ || _)))
// Merged artifact is created under new case
artifactSrv
.create(newCase, fields)
Expand Down
16 changes: 12 additions & 4 deletions thehive-backend/app/services/CustomWSAPI.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package services

import javax.inject.{ Inject, Singleton }
import scala.util.control.NonFatal

import javax.inject.{ Inject, Singleton }
import play.api.inject.ApplicationLifecycle
import play.api.libs.ws._
import play.api.libs.ws.ahc.{ AhcWSClient, AhcWSClientConfig, AhcWSClientConfigParser }
Expand Down Expand Up @@ -92,8 +93,15 @@ class CustomWSAPI(

def withConfig(subConfig: Configuration): CustomWSAPI = {
logger.debug(s"Override WS configuration using $subConfig")
new CustomWSAPI(
Configuration(subConfig.underlying.atKey("play").withFallback(config.underlying)),
environment, lifecycle, mat)
try {
new CustomWSAPI(
Configuration(subConfig.underlying.atKey("play").withFallback(config.underlying)),
environment, lifecycle, mat)
}
catch {
case NonFatal(e)
logger.error(s"WSAPI configuration error, use default values", e)
this
}
}
}
11 changes: 6 additions & 5 deletions thehive-cortex/app/connectors/cortex/services/CortexSrv.scala
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package connectors.cortex.services

import java.util.Date
import javax.inject.{ Inject, Singleton }

import javax.inject.{ Inject, Singleton }
import akka.NotUsed
import akka.actor.Actor
import akka.stream.Materializer
Expand All @@ -22,6 +22,7 @@ import play.api.{ Configuration, Logger }
import services.{ ArtifactSrv, CustomWSAPI, MergeArtifact, RemoveJobsOf }
import scala.concurrent.duration.DurationInt
import scala.concurrent.{ ExecutionContext, Future }
import scala.util.control.NonFatal
import scala.util.{ Failure, Success, Try }

import org.elastic4play.database.{ DBRemove, ModifyConfig }
Expand Down Expand Up @@ -179,15 +180,15 @@ class CortexSrv @Inject() (
def askAnalyzersOnAllCortex(f: CortexClient Future[Seq[Analyzer]]): Future[Seq[Analyzer]] = {
Future
.traverse(cortexConfig.instances) { cortex
f(cortex).recover { case _ Nil }
f(cortex).recover { case NonFatal(t) logger.error("Request to Cortex fails", t); Nil }
}
.map(_.flatten)
}

def getAnalyzersFor(dataType: String): Future[Seq[Analyzer]] = {
Future
.traverse(cortexConfig.instances) { cortex
cortex.listAnalyzerForType(dataType).recover { case _ Nil }
cortex.listAnalyzerForType(dataType).recover { case NonFatal(t) logger.error("Request to Cortex fails", t); Nil }
}
.map { listOfListOfAnalyzers
val analysers = listOfListOfAnalyzers.flatten
Expand All @@ -202,7 +203,7 @@ class CortexSrv @Inject() (
def listAnalyzer: Future[Seq[Analyzer]] = {
Future
.traverse(cortexConfig.instances) { cortex
cortex.listAnalyzer.recover { case _ Nil }
cortex.listAnalyzer.recover { case NonFatal(t) logger.error("Request to Cortex fails", t); Nil }
}
.map { listOfListOfAnalyzers
val analysers = listOfListOfAnalyzers.flatten
Expand Down Expand Up @@ -255,7 +256,7 @@ class CortexSrv @Inject() (
} yield artifactSrv.update(job.artifactId(), Fields.empty.set("reports", newReports.toString), ModifyConfig(retryOnConflict = 0, version = Some(artifact.version)))
}
.recover {
case t logger.warn(s"Unable to insert summary report in artifact", t)
case NonFatal(t) logger.warn(s"Unable to insert summary report in artifact", t)
}

}
Expand Down
2 changes: 1 addition & 1 deletion ui/app/scripts/controllers/case/CaseObservablesCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@
var job = response.data;
var report = {
job: job,
template: job.analyzerId,
template: job.analyzerName || job.analyzerId,
content: job.report,
status: job.status,
startDate: job.startDate,
Expand Down
10 changes: 9 additions & 1 deletion ui/app/scripts/services/CortexSrv.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,15 @@
}
}
}, {
analyzerId: analyzerId
_or: [
{analyzerId: analyzerId},
{
_like: {
_field: 'analyzerDefinition',
_value: analyzerId
}
}
]
}
]
}
Expand Down
5 changes: 5 additions & 0 deletions ui/app/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,11 @@ table tr td.task-actions span.action-button {
overflow-y: auto;
}

.scroll-dropdown-2x {
max-height: 400px;
overflow-y: auto;
}

.dropdown-menu.align-right {
left: auto;
right: 0;
Expand Down
2 changes: 1 addition & 1 deletion ui/app/views/components/header.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<span class="hpad5">New Case</span>
<span class="caret"></span>
</a>
<ul class="dropdown-menu" uib-dropdown-menu>
<ul class="dropdown-menu scroll-dropdown-2x" uib-dropdown-menu>
<li>
<a href ng-click="createNewCase()">Empty Case</a>
</li>
Expand Down
4 changes: 4 additions & 0 deletions ui/app/views/directives/flow/case.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
<div ng-switch-when="tlp">
{{k}}: <tlp format="'static'" value="v"></tlp>
</div>
<div ng-switch-when="owner">
{{k}}:
<em>{{getUserInfo.get(v) | getField: 'name'}}</em>
</div>
<div ng-switch-default>
{{k}}: <em>{{v | limitTo: 250}}</em>
</div>
Expand Down
2 changes: 1 addition & 1 deletion ui/app/views/directives/mini-report-list.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="tags-list flexwrap mt-xxs" ng-if="taxonomies.length > 0">
<span class="mr-xxxs text-muted"><i class="fa fa-cog"></i></span>
<span class="label mb-xxxs mr-xxxs clickable"
<span class="label mb-xxxs mr-xxxs clickable label-default"
ng-repeat="taxonomy in taxonomies"
ng-class="{'info': 'label-info',
'safe': 'label-success',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="modal-header bg-primary">
<h3 class="modal-title">Report of #{{$vm.report.job.analyzerId}} analysis</h3>
</div>
<div class="modal-body">
<div class="modal-body observable-report">
<report artifact="$vm.observable"
content="$vm.report.content.full || $vm.report.content"
report-type="long"
Expand Down
2 changes: 1 addition & 1 deletion ui/bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "thehive",
"version": "3.0.8",
"version": "3.0.9",
"license": "AGPL-3.0",
"dependencies": {
"angular": "1.5.8",
Expand Down
2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "thehive",
"version": "3.0.8",
"version": "3.0.9",
"license": "AGPL-3.0",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "3.0.8"
version in ThisBuild := "3.0.9"

0 comments on commit bd257eb

Please sign in to comment.