Skip to content

Commit

Permalink
Merge branch 'release/2.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Oct 9, 2018
2 parents bc11d5c + df782be commit 2a980e9
Show file tree
Hide file tree
Showing 17 changed files with 81 additions and 57 deletions.
20 changes: 18 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Change Log

## [2.1.1](https://github.com/TheHive-Project/Cortex/tree/2.1.1) (2018-10-09)

[Full Changelog](https://github.com/TheHive-Project/Cortex/compare/2.1.0...2.1.1)

**Implemented enhancements:**

- Change Debian dependencies [\#141](https://github.com/TheHive-Project/Cortex/issues/141)
- Allow Cortex to use a custom root context [\#140](https://github.com/TheHive-Project/Cortex/issues/140)
- Publish stable versions in beta package channels [\#138](https://github.com/TheHive-Project/Cortex/issues/138)

**Fixed bugs:**

- Fix Cache column in analyzers admin page [\#139](https://github.com/TheHive-Project/Cortex/issues/139)
- RPM update replace configuration file [\#137](https://github.com/TheHive-Project/Cortex/issues/137)
- Console output should not be logged in syslog [\#136](https://github.com/TheHive-Project/Cortex/issues/136)

## [2.1.0](https://github.com/TheHive-Project/Cortex/tree/2.1.0) (2018-09-25)
[Full Changelog](https://github.com/TheHive-Project/Cortex/compare/2.1.0-RC1...2.1.0)

Expand All @@ -10,10 +26,10 @@

**Fixed bugs:**

- Temporary files are not removed at the end of job [\#129](https://github.com/TheHive-Project/Cortex/issues/129)
- MISP fails to run analyzers [\#128](https://github.com/TheHive-Project/Cortex/issues/128)
- MISP API fails [\#109](https://github.com/TheHive-Project/Cortex/issues/109)
- File\_Info issue [\#53](https://github.com/TheHive-Project/Cortex/issues/53)
- Temporary files are not removed at the end of job [\#129](https://github.com/TheHive-Project/Cortex/issues/129)
- MISP fails to run analyzers [\#128](https://github.com/TheHive-Project/Cortex/issues/128)

**Merged pull requests:**

Expand Down
13 changes: 13 additions & 0 deletions app/org/thp/cortex/controllers/Home.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.thp.cortex.controllers

import play.api.Configuration
import play.api.mvc.{ AbstractController, Action, AnyContent, ControllerComponents }

import javax.inject.{ Inject, Singleton }

@Singleton
class Home @Inject() (configuration: Configuration, components: ControllerComponents) extends AbstractController(components) {
def redirect: Action[AnyContent] = Action {
Redirect(configuration.get[String]("play.http.context").stripSuffix("/") + "/index.html")
}
}
4 changes: 2 additions & 2 deletions app/org/thp/cortex/controllers/JobCtrl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ class JobCtrl @Inject() (
val query = request.body.getValue("query").fold[QueryDef](deleteFilter)(q and(q.as[QueryDef], deleteFilter))
val range = request.body.getString("range")
val sort = request.body.getStrings("sort").getOrElse(Nil)
val (users, total) = jobSrv.findForUser(request.userId, query, range, sort)
renderer.toOutput(OK, users, total)
val (jobs, total) = jobSrv.findForUser(request.userId, query, range, sort)
renderer.toOutput(OK, jobs, total)

}

Expand Down
2 changes: 1 addition & 1 deletion conf/routes
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# ~~~~


GET / controllers.Default.redirect(to = "/index.html")
GET / org.thp.cortex.controllers.Home.redirect
GET /api/health org.thp.cortex.controllers.StatusCtrl.health
GET /api/logout org.thp.cortex.controllers.AuthenticationCtrl.logout()
POST /api/login org.thp.cortex.controllers.AuthenticationCtrl.login()
Expand Down
2 changes: 1 addition & 1 deletion debian.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Common._

version in Debian := getVersion(version.value) + '-' + getRelease(version.value)
debianPackageDependencies += "openjdk-8-jre-headless"
debianPackageDependencies += "java8-runtime | java8-runtime-headless"
maintainerScripts in Debian := maintainerScriptsFromDirectory(
baseDirectory.value / "package" / "debian",
Seq(DebianConstants.Postinst, DebianConstants.Prerm, DebianConstants.Postrm)
Expand Down
2 changes: 1 addition & 1 deletion docker/cortex/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
- thread_pool.search.queue_size=100000
- thread_pool.bulk.queue_size=100000
cortex:
image: certbdf/cortex:latest
image: thehiveproject/cortex:latest
depends_on:
- elasticsearch
ports:
Expand Down
4 changes: 2 additions & 2 deletions package/cortex.service
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ ExecStart=/opt/cortex/bin/cortex \
-Dlogger.file=/etc/cortex/logback.xml \
-Dpidfile.path=/dev/null

StandardOutput=journal
StandardError=inherit
StandardOutput=null
StandardError=null

# Specifies the maximum file descriptor number that can be opened by this process
LimitNOFILE=65536
Expand Down
34 changes: 28 additions & 6 deletions project/Bintray.scala
Original file line number Diff line number Diff line change
Expand Up @@ -69,34 +69,56 @@ object Bintray extends AutoPlugin {

publishDebian in ThisBuild := {
if ((version in ThisBuild).value.endsWith("-SNAPSHOT")) sys.error("Snapshot version can't be released")
val repositoryName = if (version.value.contains('-')) "debian-beta" else "debian-stable"
val file = (debianSign in Debian).value
val bintrayCredentials = bintrayEnsureCredentials.value
btPublish(file.getName,
file,
bintrayEnsureCredentials.value,
bintrayCredentials,
bintrayOrganization.value,
repositoryName,
"debian-beta",
bintrayPackage.value,
version.value,
sLog.value,
"deb_distribution" "any",
"deb_component" "main",
"deb_architecture" "all"
)
if (!version.value.contains('-'))
btPublish(file.getName,
file,
bintrayCredentials,
bintrayOrganization.value,
"debian-stable",
bintrayPackage.value,
version.value,
sLog.value,
"deb_distribution" "any",
"deb_component" "main",
"deb_architecture" "all"
)
},

publishRpm in ThisBuild := {
if ((version in ThisBuild).value.endsWith("-SNAPSHOT")) sys.error("Snapshot version can't be released")
val repositoryName = if (version.value.contains('-')) "rpm-beta" else "rpm-stable"
val file = (packageBin in Rpm).value
val bintrayCredentials = bintrayEnsureCredentials.value
btPublish(file.getName,
file,
bintrayEnsureCredentials.value,
bintrayCredentials,
bintrayOrganization.value,
repositoryName,
"rpm-beta",
bintrayPackage.value,
(version in Rpm).value + '-' + (rpmRelease in Rpm).value,
sLog.value)
if (!version.value.contains('-'))
btPublish(file.getName,
file,
bintrayCredentials,
bintrayOrganization.value,
"rpm-stable",
bintrayPackage.value,
(version in Rpm).value + '-' + (rpmRelease in Rpm).value,
sLog.value)
}
)

Expand Down
29 changes: 0 additions & 29 deletions project/BuildSettings.scala

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 @@ -17,6 +17,6 @@ object Dependencies {

val reflections = "org.reflections" % "reflections" % "0.9.11"
val zip4j = "net.lingala.zip4j" % "zip4j" % "1.3.2"
val elastic4play = "org.thehive-project" %% "elastic4play" % "1.6.2"
val elastic4play = "org.thehive-project" %% "elastic4play" % "1.6.3"
}

1 change: 1 addition & 0 deletions rpm.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ maintainerScripts in Rpm := maintainerScriptsFromDirectory(
baseDirectory.value / "package" / "rpm",
Seq(RpmConstants.Pre, RpmConstants.Preun, RpmConstants.Postun)
)
linuxPackageMappings in Rpm := configWithNoReplace((linuxPackageMappings in Rpm).value)
linuxPackageSymlinks in Rpm := Nil
rpmPrefix := Some(defaultLinuxInstallLocation.value)
linuxEtcDefaultTemplate in Rpm := (baseDirectory.value / "package" / "etc_default_cortex").asURL
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 := "2.1.0"
version in ThisBuild := "2.1.1"
4 changes: 2 additions & 2 deletions www/config/webpack/environments/development.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
let webpack = require('webpack');

module.exports = function(_path) {
module.exports = function (_path) {
return {
context: _path,
devtool: 'source-map',
Expand All @@ -15,4 +15,4 @@ module.exports = function(_path) {
},
plugins: [new webpack.HotModuleReplacementPlugin()]
};
};
};
6 changes: 3 additions & 3 deletions www/config/webpack/environments/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
let CleanWebpackPlugin = require('clean-webpack-plugin');
let webpack = require('webpack');

module.exports = function(_path) {
module.exports = function (_path) {
return {
context: _path,
devtool: 'source-map',
output: {
publicPath: '/',
publicPath: './',
filename: '[name].[chunkhash].js'
},
plugins: [
Expand All @@ -23,4 +23,4 @@ module.exports = function(_path) {
})
]
};
};
};
2 changes: 1 addition & 1 deletion www/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cortex",
"version": "2.1.0",
"version": "2.1.1",
"description": "A powerfull observable analysis engine",
"license": "AGPL-v3",
"homepage": "https://github.com/TheHive-Project/Cortex",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ <h4 class="media-heading">
<span ng-show="!$ctrl.activeAnalyzers[def].rate || !$ctrl.activeAnalyzers[def].rateUnit" class="label label-lg label-default">None</span>
</div>
<div class="flex-col flex-w-100 text-center vertical centered" ng-if="$ctrl.activeAnalyzers[def]">
<span ng-show="$ctrl.activeAnalyzers[def].jobCache === undefined" class="label label-lg label-default">Default</span>
<span ng-show="$ctrl.activeAnalyzers[def].jobCache === null" class="label label-lg label-default">Default</span>
<span ng-show="$ctrl.activeAnalyzers[def].jobCache !== null" class="label label-lg label-primary">{{$ctrl.activeAnalyzers[def].jobCache}} Minutes</span>
</div>
Expand Down
10 changes: 5 additions & 5 deletions www/src/tpl-index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<title>Cortex</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="icon" type="image/png" href="favicon-196x196.png" sizes="196x196" />
<link rel="icon" type="image/png" href="favicon-96x96.png" sizes="96x96" />
<link rel="icon" type="image/png" href="favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="favicon-16x16.png" sizes="16x16" />
<link rel="icon" type="image/png" href="favicon-128x128.png" sizes="128x128" />
<link rel="icon" type="image/png" href="./favicon-196x196.png" sizes="196x196" />
<link rel="icon" type="image/png" href="./favicon-96x96.png" sizes="96x96" />
<link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
<link rel="icon" type="image/png" href="./favicon-128x128.png" sizes="128x128" />
<!-- <link rel="shortcut icon" type="image/x-icon" href="favicon.ico"> -->
<% for(var i=0; i < htmlWebpackPlugin.files.css; i++) { %>
<link href="<%= htmlWebpackPlugin.files.css[i] %>" rel="stylesheet">
Expand Down

0 comments on commit 2a980e9

Please sign in to comment.