Skip to content

Commit

Permalink
Merge branch 'release/2.10.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Mar 8, 2017
2 parents bd5994f + d9fb0e9 commit fb66d75
Show file tree
Hide file tree
Showing 125 changed files with 679 additions and 629 deletions.
1 change: 1 addition & 0 deletions .github_changelog_generator
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
enhancement_labels=enhancement, Enhancement,feature request
54 changes: 41 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,43 @@
# Change Log

## [2.10.1](https://github.com/CERT-BDF/TheHive/tree/2.10.0) (2017-03-08)
[Full Changelog](https://github.com/CERT-BDF/TheHive/compare/2.10.0...2.10.0)

**Implemented enhancements:**

- Remove the "Run all analyzers" option from observables list [\#141](https://github.com/CERT-BDF/TheHive/issues/141)
- Remove duplicate stream callbacks registration [\#138](https://github.com/CERT-BDF/TheHive/issues/138)
- Typo in quick filters [\#134](https://github.com/CERT-BDF/TheHive/issues/134)
- Display a warning when trying to merge an already merged case [\#129](https://github.com/CERT-BDF/TheHive/issues/129)
- Restyle avatar's upload button [\#126](https://github.com/CERT-BDF/TheHive/issues/126)
- Feature Request: Ansible build scripts [\#124](https://github.com/CERT-BDF/TheHive/issues/124)
- Add pagination component at the top of the task log [\#116](https://github.com/CERT-BDF/TheHive/issues/116)
- Disable buttons in MISP event's preview dialog [\#115](https://github.com/CERT-BDF/TheHive/issues/115)
- Make The Hive working on any URL path and not only / [\#114](https://github.com/CERT-BDF/TheHive/issues/114)
- Misleading MISP Event Date and Time [\#101](https://github.com/CERT-BDF/TheHive/issues/101)
- Upgrade to the last version of UI-Bootstrap UI library [\#79](https://github.com/CERT-BDF/TheHive/issues/79)

**Fixed bugs:**

- Fix OTXQuery report template [\#142](https://github.com/CERT-BDF/TheHive/issues/142)
- 401 HTTP responses don't trigger redirection to login page [\#140](https://github.com/CERT-BDF/TheHive/issues/140)
- Fix a JS issue related to inactivity dialog [\#139](https://github.com/CERT-BDF/TheHive/issues/139)
- Flow is not shown [\#127](https://github.com/CERT-BDF/TheHive/issues/127)
- Case merge does not close tasks in merged cases [\#118](https://github.com/CERT-BDF/TheHive/issues/118)
- Web UI doesn't refresh once a report template is deleted [\#113](https://github.com/CERT-BDF/TheHive/issues/113)
- Open log in new windows [\#108](https://github.com/CERT-BDF/TheHive/issues/108)
- Cannot add an observable which datatype has been added by an admin [\#106](https://github.com/CERT-BDF/TheHive/issues/106)
- Observables password hint does not reflect backend change [\#83](https://github.com/CERT-BDF/TheHive/issues/83)

## [2.10.0](https://github.com/CERT-BDF/TheHive/tree/2.10.0) (2017-02-01)
[Full Changelog](https://github.com/CERT-BDF/TheHive/compare/2.9.2...2.10.0)

**Implemented enhancements:**

- Improve cases listing page [\#76](https://github.com/CERT-BDF/TheHive/issues/76)
- Feature Request - Add Case Statistics by Severity [\#70](https://github.com/CERT-BDF/TheHive/issues/70)
- Use avatars in user profiles [\#69](https://github.com/CERT-BDF/TheHive/issues/69)
- Allow \(un\)set observable as IOC from the observable's page [\#68](https://github.com/CERT-BDF/TheHive/issues/68)
- When closing a task, close the associated tab as well [\#66](https://github.com/CERT-BDF/TheHive/issues/66)
- Load the Current Cases View when Closing a Case [\#61](https://github.com/CERT-BDF/TheHive/issues/61)
- Externalize observable analysis [\#53](https://github.com/CERT-BDF/TheHive/issues/53)
Expand All @@ -31,10 +63,6 @@

**Closed issues:**

- Update BuildGuide [\#102](https://github.com/CERT-BDF/TheHive/issues/102)
- Feature Request - Add Case Statistics by Severity [\#70](https://github.com/CERT-BDF/TheHive/issues/70)
- Use avatars in user profiles [\#69](https://github.com/CERT-BDF/TheHive/issues/69)
- Allow \(un\)set observable as IOC from the observable's page [\#68](https://github.com/CERT-BDF/TheHive/issues/68)
- Database schema update \(v8\) [\#67](https://github.com/CERT-BDF/TheHive/issues/67)
- Add support for more filetypes to PE\_info analyser [\#54](https://github.com/CERT-BDF/TheHive/issues/54)
- Create an analyzer to get information about PE file [\#51](https://github.com/CERT-BDF/TheHive/issues/51)
Expand All @@ -48,21 +76,25 @@
## [2.9.2](https://github.com/CERT-BDF/TheHive/tree/2.9.2) (2017-01-19)
[Full Changelog](https://github.com/CERT-BDF/TheHive/compare/2.9.1...2.9.2)

**Fixed bugs:**
**Implemented enhancements:**

- docker image: $.post\(...\).success is not a function [\#95](https://github.com/CERT-BDF/TheHive/issues/95)
- Feature Request - Add observable statistics [\#71](https://github.com/CERT-BDF/TheHive/issues/71)

**Closed issues:**
**Fixed bugs:**

- Feature Request - Add observable statistics [\#71](https://github.com/CERT-BDF/TheHive/issues/71)
- docker image: $.post\(...\).success is not a function [\#95](https://github.com/CERT-BDF/TheHive/issues/95)

## [2.9.1](https://github.com/CERT-BDF/TheHive/tree/2.9.1) (2016-11-28)
**Implemented enhancements:**

- Statistics on a per case template name / prefix basis [\#31](https://github.com/CERT-BDF/TheHive/issues/31)
- Observable Viewing Page [\#17](https://github.com/CERT-BDF/TheHive/issues/17)
- Update logo and favicon [\#45](https://github.com/CERT-BDF/TheHive/issues/45)
- Inconsistent wording between the login and user management pages [\#44](https://github.com/CERT-BDF/TheHive/issues/44)
- MaxMind Analyzer 'Short Report' has hard-coded language [\#23](https://github.com/CERT-BDF/TheHive/issues/23)
- Don't update imported case from MISP if it is deleted or merged [\#22](https://github.com/CERT-BDF/TheHive/issues/22)
- Case merging [\#14](https://github.com/CERT-BDF/TheHive/issues/14)
- New analyzer to check URL categories [\#24](https://github.com/CERT-BDF/TheHive/pull/24) ([ecapuano](https://github.com/ecapuano))

**Fixed bugs:**

Expand All @@ -80,18 +112,14 @@
**Closed issues:**

- Statistics based on Tags [\#37](https://github.com/CERT-BDF/TheHive/issues/37)
- Statistics on a per case template name / prefix basis [\#31](https://github.com/CERT-BDF/TheHive/issues/31)
- Observable Viewing Page [\#17](https://github.com/CERT-BDF/TheHive/issues/17)
- Give us something to work with! [\#2](https://github.com/CERT-BDF/TheHive/issues/2)
- Case merging [\#14](https://github.com/CERT-BDF/TheHive/issues/14)

**Merged pull requests:**

- Fix "Run from Docker" [\#9](https://github.com/CERT-BDF/TheHive/pull/9) ([2xyo](https://github.com/2xyo))
- Fixing a Simple Typo [\#6](https://github.com/CERT-BDF/TheHive/pull/6) ([swannysec](https://github.com/swannysec))
- Fixed broken link to Wiki [\#1](https://github.com/CERT-BDF/TheHive/pull/1) ([Neo23x0](https://github.com/Neo23x0))
- New analyzer to check URL categories [\#24](https://github.com/CERT-BDF/TheHive/pull/24) ([ecapuano](https://github.com/ecapuano))



\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
12 changes: 11 additions & 1 deletion contrib/report-templates/Abuse_Finder_1.0/long.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</div>
</dd>
</dl>
<dl class="dl-horizontal" ng-if=".abuse_finder.names">
<dl class="dl-horizontal" ng-if="content.abuse_finder.names">
<dt>Abuse addresses:</dt>
<dd>
<div ng-repeat="abuse in content.abuse_finder.abuse">
Expand All @@ -21,3 +21,13 @@
</dl>
</div>
</div>

<!-- General error -->
<div class="panel panel-danger" ng-if="!success">
<div class="panel-heading">
<strong>{{(artifact.data || artifact.attachment.name) | fang}}</strong>
</div>
<div class="panel-body">
{{content.errorMessage}}
</div>
</div>
12 changes: 11 additions & 1 deletion contrib/report-templates/OTXQuery_1_0/long.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
<div class="panel panel-info">
<div class="panel panel-danger" ng-if="!success">
<div class="panel-heading">
<strong>{{artifact.data | fang}}</strong>
</div>
<div class="panel-body">
{{content.errorMessage}}
</div>
</div>


<div class="panel panel-info" ng-if="success">
<div class="panel-heading">
OTX Report
</div>
Expand Down
44 changes: 0 additions & 44 deletions dockerCreation.txt

This file was deleted.

2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ object Dependencies {
val reflections = "org.reflections" % "reflections" % "0.9.10"
val zip4j = "net.lingala.zip4j" % "zip4j" % "1.3.2"
val akkaTest = "com.typesafe.akka" %% "akka-stream-testkit" % "2.4.4"
val elastic4play = "org.cert-bdf" %% "elastic4play" % "1.1.2"
val elastic4play = "org.cert-bdf" %% "elastic4play" % "1.1.3"

object Elastic4s {
private val version = "2.3.0"
Expand Down
6 changes: 3 additions & 3 deletions thehive-backend/app/controllers/Artifact.scala
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class ArtifactCtrl @Inject() (
val withStats = request.body.getBoolean("nstats").getOrElse(false)

val (artifacts, total) = artifactSrv.find(query, range, sort)
val artifactWithCase = auxSrv(artifacts, nparent, withStats)
val artifactWithCase = auxSrv(artifacts, nparent, withStats, false)
renderer.toOutput(OK, artifactWithCase, total)
}

Expand All @@ -106,7 +106,7 @@ class ArtifactCtrl @Inject() (
val sort = request.body.getStrings("sort").getOrElse(Nil)

val (artifacts, total) = artifactSrv.findSimilar(artifact, range, sort)
val artifactWithCase = auxSrv(artifacts, 1, false)
val artifactWithCase = auxSrv(artifacts, 1, false, true)
renderer.toOutput(OK, artifactWithCase, total)
}
}
Expand All @@ -117,4 +117,4 @@ class ArtifactCtrl @Inject() (
val aggs = request.body.getValue("stats").getOrElse(throw BadRequestError("Parameter \"stats\" is missing")).as[Seq[Agg]]
artifactSrv.stats(query, aggs).map(s Ok(s))
}
}
}
4 changes: 2 additions & 2 deletions thehive-backend/app/controllers/Case.scala
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class CaseCtrl @Inject() (

for {
caze caseSrv.get(id)
casesWithStats auxSrv.apply(caze, 0, withStats.getOrElse(false))
casesWithStats auxSrv.apply(caze, 0, withStats.getOrElse(false), false)
} yield renderer.toOutput(OK, casesWithStats)
}

Expand Down Expand Up @@ -96,7 +96,7 @@ class CaseCtrl @Inject() (
val withStats = request.body.getBoolean("nstats").getOrElse(false)

val (cases, total) = caseSrv.find(query, range, sort)
val casesWithStats = auxSrv.apply(cases, nparent, withStats)
val casesWithStats = auxSrv.apply(cases, nparent, withStats, false)
renderer.toOutput(OK, casesWithStats, total)
}

Expand Down
2 changes: 1 addition & 1 deletion thehive-backend/app/controllers/CaseTemplate.scala
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class CaseTemplateCtrl @Inject() (
val withStats = request.body.getBoolean("nstats").getOrElse(false)

val (caseTemplates, total) = caseTemplateSrv.find(query, range, sort)
val caseTemplatesWithStats = auxSrv(caseTemplates, nparent, withStats)
val caseTemplatesWithStats = auxSrv(caseTemplates, nparent, withStats, false)
renderer.toOutput(OK, caseTemplatesWithStats, total)
}
}
2 changes: 1 addition & 1 deletion thehive-backend/app/controllers/Search.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class SearchCtrl @Inject() (
val withStats = request.body.getBoolean("nstats").getOrElse(false)

val (entities, total) = findSrv(None, and(query, "status" ~!= "Deleted", not(or(ofType("audit"), ofType("data"), ofType("user"), ofType("analyzer"), ofType("misp")))), range, sort)
val entitiesWithStats = auxSrv(entities, nparent, withStats)
val entitiesWithStats = auxSrv(entities, nparent, withStats, true)
renderer.toOutput(OK, entitiesWithStats, total)
}
}
5 changes: 4 additions & 1 deletion thehive-backend/app/controllers/Status.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import javax.inject.{ Inject, Singleton }

import scala.collection.immutable

import play.api.Configuration
import play.api.libs.json.Json
import play.api.libs.json.Json.toJsFieldJsValueWrapper
import play.api.mvc.{ Action, Controller }
Expand All @@ -23,6 +24,7 @@ import org.elastic4play.services.AuthSrv
@Singleton
class StatusCtrl @Inject() (
connectors: immutable.Set[Connector],
configuration: Configuration,
authSrv: AuthSrv) extends Controller {

private[controllers] def getVersion(c: Class[_]) = Option(c.getPackage.getImplementationVersion).getOrElse("SNAPSHOT")
Expand All @@ -38,10 +40,11 @@ class StatusCtrl @Inject() (
"ElasticSearch" getVersion(classOf[org.elasticsearch.Build])),
"connectors" JsObject(connectors.map(c c.name c.status).toSeq),
"config" Json.obj(
"protectDownloadsWith" configuration.getString("datastore.attachment.password").get,
"authType" (authSrv match {
case multiAuthSrv: MultiAuthSrv multiAuthSrv.authProviders.map { a JsString(a.name) }
case _ JsString(authSrv.name)
}),
"capabilities" authSrv.capabilities.map(c JsString(c.toString)))))
}
}
}
2 changes: 1 addition & 1 deletion thehive-backend/app/controllers/Task.scala
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class TaskCtrl @Inject() (
val withStats = request.body.getBoolean("stats").getOrElse(false)

val (tasks, total) = taskSrv.find(query, range, sort)
val tasksWithStats = auxSrv.apply(tasks, nparent, withStats)
val tasksWithStats = auxSrv.apply(tasks, nparent, withStats, false)
renderer.toOutput(OK, tasksWithStats, total)
}

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 @@ -264,6 +264,7 @@ class CaseMergeSrv @Inject() (
_ mergeTasksAndLogs(newCase, cases)
_ mergeArtifactsAndJobs(newCase, cases)
_ markCaseAsDuplicated(cases, newCase)
_ Future.traverse(cases)(caze taskSrv.closeTasksOfCase(caze.id))
} yield newCase
}
}
2 changes: 1 addition & 1 deletion thehive-backend/app/services/FlowSrv.scala
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class FlowSrv @Inject() (
}
}
}
val fObj = auxSrv.apply(audit.objectType(), audit.objectId(), 10, false)
val fObj = auxSrv.apply(audit.objectType(), audit.objectId(), 10, false, true)

for {
summary fSummary
Expand Down
2 changes: 1 addition & 1 deletion thehive-backend/app/services/StreamMessage.scala
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ object AuditOperationGroup {
}
.collect { case (name, value, Some(attr)) if !attr.isUnaudited (name, value) }
}
val obj = auxSrv(operation.entity, 10, false)
val obj = auxSrv(operation.entity, 10, false, true)
.recover {
case error
log.error("auxSrv fails", error)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import play.api.routing.sird.{ DELETE, GET, PATCH, POST, UrlContext }
import org.elastic4play.{ BadRequestError, NotFoundError, Timed }
import org.elastic4play.controllers.{ Authenticated, FieldsBodyParser, Renderer }
import org.elastic4play.models.JsonFormat.baseModelEntityWrites
import org.elastic4play.services.{ QueryDef, QueryDSL, Role }
import org.elastic4play.services.{ AuxSrv, QueryDef, QueryDSL, Role }
import org.elastic4play.services.JsonFormat.queryReads

import connectors.Connector
Expand All @@ -26,6 +26,7 @@ class CortextCtrl @Inject() (
reportTemplateCtrl: ReportTemplateCtrl,
cortexConfig: CortexConfig,
cortexSrv: CortexSrv,
auxSrv: AuxSrv,
authenticated: Authenticated,
fieldsBodyParser: FieldsBodyParser,
renderer: Renderer,
Expand Down Expand Up @@ -74,7 +75,8 @@ class CortextCtrl @Inject() (
val sort = request.body.getStrings("sort").getOrElse(Nil)

val (jobs, total) = cortexSrv.find(query, range, sort)
renderer.toOutput(OK, jobs, total)
val jobWithoutReport = auxSrv.apply(jobs, 0, false, true)
renderer.toOutput(OK, jobWithoutReport, total)
}

@Timed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class ReportTemplateCtrl @Inject() (
val withStats = request.body.getBoolean("nstats").getOrElse(false)

val (reportTemplates, total) = reportTemplateSrv.find(query, range, sort)
val reportTemplatesWithStats = auxSrv(reportTemplates, nparent, withStats)
val reportTemplatesWithStats = auxSrv(reportTemplates, nparent, withStats, false)
renderer.toOutput(OK, reportTemplatesWithStats, total)
}

Expand Down
9 changes: 7 additions & 2 deletions ui/app/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,12 @@ angular.module('thehive', ['ngAnimate', 'ngMessages', 'ui.bootstrap', 'ui.router
.state('app.case.observables-item', {
url: '/observables/{itemId}',
templateUrl: 'views/partials/case/case.observables.item.html',
controller: 'CaseObservablesItemCtrl'
controller: 'CaseObservablesItemCtrl',
resolve: {
appConfig: function(VersionSrv) {
return VersionSrv.get();
}
}
})
.state('app.misp-list', {
url: 'misp/list',
Expand All @@ -226,7 +231,7 @@ angular.module('thehive', ['ngAnimate', 'ngMessages', 'ui.bootstrap', 'ui.router

$httpProvider.interceptors.push(function($rootScope, $q) {
var isApiCall = function(url) {
return url && url.startsWith('/api') && !url.startsWith('/api/stream');
return url && url.startsWith('./api') && !url.startsWith('./api/stream');
};

return {
Expand Down
Loading

0 comments on commit fb66d75

Please sign in to comment.