diff --git a/.github/ISSUE_TEMPLATE/thehive3_bug_report.md b/.github/ISSUE_TEMPLATE/thehive3_bug_report.md index f73685e1cc..f49a423737 100644 --- a/.github/ISSUE_TEMPLATE/thehive3_bug_report.md +++ b/.github/ISSUE_TEMPLATE/thehive3_bug_report.md @@ -16,8 +16,14 @@ Bug | -------------------------- | ------------------------------------- | | OS version (server) | Debian, Ubuntu, CentOS, RedHat, ... | | OS version (client) | XP, Seven, 10, Ubuntu, ... | -| TheHive version / git hash | 3.x, hash of the commit | +| Virtualized Env. | True / False | +| Dedicated RAM | XX GB | +| vCPU | 4 / 8 / 16 / 32 | +| TheHive version / git hash | 4.x, hash of the commit | | Package Type | RPM, DEB, Docker, Binary, From source | +| Database | Cassandra / BerlkelyDB | +| Index type | Lucene / Elasticsearch | +| Attachments storage | Local, NFS, S3, HDFS | | Browser type & version | If applicable | diff --git a/.github/ISSUE_TEMPLATE/thehive4_bug_report.md b/.github/ISSUE_TEMPLATE/thehive4_bug_report.md index 3e158e3a33..19a0214625 100644 --- a/.github/ISSUE_TEMPLATE/thehive4_bug_report.md +++ b/.github/ISSUE_TEMPLATE/thehive4_bug_report.md @@ -16,8 +16,14 @@ Bug | -------------------------- | ------------------------------------- | | OS version (server) | Debian, Ubuntu, CentOS, RedHat, ... | | OS version (client) | XP, Seven, 10, Ubuntu, ... | +| Virtualized Env. | True / False | +| Dedicated RAM | XX GB | +| vCPU | 4 / 8 / 16 / 32 | | TheHive version / git hash | 4.x, hash of the commit | | Package Type | RPM, DEB, Docker, Binary, From source | +| Database | Cassandra / BerlkelyDB | +| Index type | Lucene / Elasticsearch | +| Attachments storage | Local, NFS, S3, HDFS | | Browser type & version | If applicable | diff --git a/.github/ISSUE_TEMPLATE/thehive4_question.md b/.github/ISSUE_TEMPLATE/thehive4_question.md index a551433c07..3cab78c3e0 100644 --- a/.github/ISSUE_TEMPLATE/thehive4_question.md +++ b/.github/ISSUE_TEMPLATE/thehive4_question.md @@ -13,13 +13,19 @@ Question ### Work Environment -| Question | Answer -|---------------------------|-------------------- -| OS version (server) | Debian, Ubuntu, CentOS, RedHat, ... -| OS version (client) | XP, Seven, 10, Ubuntu, ... -| TheHive version / git hash | 4.x, hash of the commit -| Package Type | RPM, DEB, Docker, Binary, From source -| Browser type & version | If applicable +| Question | Answer | +| -------------------------- | ------------------------------------- | +| OS version (server) | Debian, Ubuntu, CentOS, RedHat, ... | +| OS version (client) | XP, Seven, 10, Ubuntu, ... | +| Virtualized Env. | True / False | +| Dedicated RAM | XX GB | +| vCPU | 4 / 8 / 16 / 32 | +| TheHive version / git hash | 4.x, hash of the commit | +| Package Type | RPM, DEB, Docker, Binary, From source | +| Database | Cassandra / BerlkelyDB | +| Index type | Lucene / Elasticsearch | +| Attachments storage | Local, NFS, S3, HDFS | +| Browser type & version | If applicable | ### Question diff --git a/CHANGELOG.md b/CHANGELOG.md index eb8360bf07..03615d5be2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Change Log +## [4.1.4](https://github.com/TheHive-Project/TheHive/milestone/73) (2021-04-15) + +**Implemented enhancements:** + +- [Feature Request] Sort case templates in alert Import drop down menu [\#1956](https://github.com/TheHive-Project/TheHive/issues/1956) +- [Enhancement] Make alert deletion more robust [\#1967](https://github.com/TheHive-Project/TheHive/issues/1967) + +**Fixed bugs:** + +- [Bug] Alert counter refresh not working [\#1911](https://github.com/TheHive-Project/TheHive/issues/1911) +- [Bug] Enabled or Disabled Taxonomies doesn't work [\#1957](https://github.com/TheHive-Project/TheHive/issues/1957) +- [Bug] TheHive 4.1.3-1 Task in Case is not visible [\#1964](https://github.com/TheHive-Project/TheHive/issues/1964) +- [Bug] Aggregation on custom fields provides incorect result (again) [\#1965](https://github.com/TheHive-Project/TheHive/issues/1965) +- [Bug] TheHive startup times out if schema evolution is long [\#1966](https://github.com/TheHive-Project/TheHive/issues/1966) +- [Bug] Default analyst rol cant add TTPs [\#1968](https://github.com/TheHive-Project/TheHive/issues/1968) +- [Bug] Links section should not be empty in Observables details view [\#1972](https://github.com/TheHive-Project/TheHive/issues/1972) +- [Bug] Deleting a shared rule case for org2 - deleting observables (sharing to org2) from the org1. [\#1973](https://github.com/TheHive-Project/TheHive/issues/1973) +- [Bug] AddTagToArtifact operation not working in 4.1.3 [\#1974](https://github.com/TheHive-Project/TheHive/issues/1974) + ## [4.1.3](https://github.com/TheHive-Project/TheHive/milestone/72) (2021-04-12) **Implemented enhancements:** diff --git a/ScalliGraph b/ScalliGraph index 78de3a32ac..1a8a32c679 160000 --- a/ScalliGraph +++ b/ScalliGraph @@ -1 +1 @@ -Subproject commit 78de3a32ac7d9d09142eff2dd5b4c0d44147067b +Subproject commit 1a8a32c679a02dc57b59a46cf41c88525f1546c6 diff --git a/build.sbt b/build.sbt index cf1d470605..97bf2e5b5b 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ import Dependencies._ import com.typesafe.sbt.packager.Keys.bashScriptDefines import org.thp.ghcl.Milestone -val thehiveVersion = "4.1.3-1" +val thehiveVersion = "4.1.4-1" val scala212 = "2.12.13" val scala213 = "2.13.1" val supportedScalaVersions = List(scala212, scala213) diff --git a/conf/logback.xml b/conf/logback.xml index d8072baa3e..81ebc5d266 100644 --- a/conf/logback.xml +++ b/conf/logback.xml @@ -37,6 +37,7 @@ + diff --git a/frontend/app/scripts/controllers/RootCtrl.js b/frontend/app/scripts/controllers/RootCtrl.js index 6abb174e2a..f7a82c3edc 100644 --- a/frontend/app/scripts/controllers/RootCtrl.js +++ b/frontend/app/scripts/controllers/RootCtrl.js @@ -106,7 +106,6 @@ angular.module('theHiveControllers').controller('RootCtrl', name: 'unread-alert-count' } }, - guard: UtilsSrv.hasAddDeleteEvents, onUpdate: function (data) { $scope.unreadAlertCount = data; } diff --git a/frontend/app/scripts/controllers/admin/taxonomy/TaxonomyListCtrl.js b/frontend/app/scripts/controllers/admin/taxonomy/TaxonomyListCtrl.js index 9ff31b9ae4..f64f83bfcb 100644 --- a/frontend/app/scripts/controllers/admin/taxonomy/TaxonomyListCtrl.js +++ b/frontend/app/scripts/controllers/admin/taxonomy/TaxonomyListCtrl.js @@ -6,10 +6,43 @@ .controller('TaxonomyDialogCtrl', TaxonomyDialogCtrl) .controller('TaxonomyImportCtrl', TaxonomyImportCtrl); - function TaxonomyListCtrl($scope, $uibModal, PaginatedQuerySrv, FilteringSrv, TaxonomySrv, NotificationSrv, ModalSrv, appConfig) { + function TaxonomyListCtrl($scope, $uibModal, PaginatedQuerySrv, FilteringSrv, TaxonomySrv, NotificationSrv, ModalSrv, QuerySrv, appConfig) { var self = this; this.appConfig = appConfig; + this.allTaxonomyCount = null; + + self.$onInit = function () { + self.filtering = new FilteringSrv('taxonomy', 'taxonomy.list', { + version: 'v1', + defaults: { + showFilters: true, + showStats: false, + pageSize: 15, + sort: ['+namespace'] + }, + defaultFilter: [] + }); + + self.filtering.initContext('list') + .then(function () { + self.load(); + + $scope.$watch('$vm.list.pageSize', function (newValue) { + self.filtering.setPageSize(newValue); + }); + }); + + QuerySrv.count( + 'v1', + [{ '_name': 'listTaxonomy' }], + { + name: 'all-taxonomy' + }) + .then(function (total) { + self.allTaxonomyCount = total; + }); + }; self.load = function () { this.loading = true; @@ -152,27 +185,6 @@ this.search(); }; - self.$onInit = function () { - self.filtering = new FilteringSrv('taxonomy', 'taxonomy.list', { - version: 'v1', - defaults: { - showFilters: true, - showStats: false, - pageSize: 15, - sort: ['+namespace'] - }, - defaultFilter: [] - }); - - self.filtering.initContext('list') - .then(function () { - self.load(); - - $scope.$watch('$vm.list.pageSize', function (newValue) { - self.filtering.setPageSize(newValue); - }); - }); - }; } function TaxonomyDialogCtrl($uibModalInstance, TaxonomySrv, NotificationSrv, taxonomy) { diff --git a/frontend/app/scripts/controllers/alert/AlertListCtrl.js b/frontend/app/scripts/controllers/alert/AlertListCtrl.js index c53e33f3da..ef698f5404 100755 --- a/frontend/app/scripts/controllers/alert/AlertListCtrl.js +++ b/frontend/app/scripts/controllers/alert/AlertListCtrl.js @@ -262,11 +262,10 @@ self.menu.markAsUnread = temp.length === 1 && temp[0] === true; // TODO nadouani: don't rely on alert status - self.menu.createNewCase = temp.indexOf('Imported') === -1; - self.menu.mergeInCase = temp.indexOf('Imported') === -1; - - temp = _.without(_.uniq(_.pluck(self.selection, 'case')), null, undefined); + temp = _.without(_.uniq(_.pluck(self.selection, 'caseId')), null, undefined); + self.menu.createNewCase = temp.length === 0; + self.menu.mergeInCase = temp.length === 0; self.menu.delete = temp.length === 0; }; diff --git a/frontend/app/scripts/services/api/ProfileSrv.js b/frontend/app/scripts/services/api/ProfileSrv.js index 3a1becdfac..1523daa2ac 100644 --- a/frontend/app/scripts/services/api/ProfileSrv.js +++ b/frontend/app/scripts/services/api/ProfileSrv.js @@ -1,7 +1,7 @@ -(function() { +(function () { 'use strict'; angular.module('theHiveServices') - .service('ProfileSrv', function($http) { + .service('ProfileSrv', function ($http) { var self = this; var baseUrl = './api/profile'; @@ -46,6 +46,7 @@ 'manageShare', 'manageObservable', 'manageTask', + 'manageProcedure', 'manageAction', 'manageAnalyse', 'accessTheHiveFS' @@ -59,6 +60,7 @@ manageShare: 'Manage sharing', manageObservable: 'Manage observables', manageTask: 'Manage tasks', + manageProcedure: 'Manage TTPs', manageAction: 'Run Cortex responders', manageAnalyse: 'Run Cortex analyzer', accessTheHiveFS: 'Access to TheHiveFS service' @@ -66,32 +68,34 @@ } }; - this.list = function() { - return $http.get(baseUrl, {params: { - range: 'all' - }}); + this.list = function () { + return $http.get(baseUrl, { + params: { + range: 'all' + } + }); }; - this.get = function(name) { + this.get = function (name) { return $http.get(baseUrl + '/' + name); }; - this.map = function() { + this.map = function () { return self.list() - .then(function(response) { + .then(function (response) { return _.indexBy(response.data, 'name'); }); }; - this.create = function(profile) { + this.create = function (profile) { return $http.post(baseUrl, profile); }; - this.update = function(id, profile) { + this.update = function (id, profile) { return $http.patch(baseUrl + '/' + id, profile); }; - this.remove = function(id) { + this.remove = function (id) { return $http.delete(baseUrl + '/' + id); }; }); diff --git a/frontend/app/scripts/services/api/TaxonomyCacheSrv.js b/frontend/app/scripts/services/api/TaxonomyCacheSrv.js index b7d861be36..c3abfe94bc 100644 --- a/frontend/app/scripts/services/api/TaxonomyCacheSrv.js +++ b/frontend/app/scripts/services/api/TaxonomyCacheSrv.js @@ -11,11 +11,12 @@ return QuerySrv.call('v1', [ { _name: 'listTaxonomy' } ], { - name: 'list-taxonomies' - }, { - name: 'filter', - _field: 'enabled', - _value: true + name: 'list-taxonomies-cache', + filter: { + name: 'filter', + _field: 'enabled', + _value: true + } }); }; diff --git a/frontend/app/views/partials/admin/taxonomy/list.html b/frontend/app/views/partials/admin/taxonomy/list.html index f8aa93d385..240e44ef53 100644 --- a/frontend/app/views/partials/admin/taxonomy/list.html +++ b/frontend/app/views/partials/admin/taxonomy/list.html @@ -2,18 +2,20 @@
-

List of taxonomies

+ + +
-
+
-
@@ -52,7 +54,8 @@

List of taxonomies

- + List of taxonomies diff --git a/frontend/app/views/partials/alert/event.dialog.html b/frontend/app/views/partials/alert/event.dialog.html index d5e950e1f9..64c2171363 100644 --- a/frontend/app/views/partials/alert/event.dialog.html +++ b/frontend/app/views/partials/alert/event.dialog.html @@ -1,6 +1,7 @@ -
@@ -28,7 +30,8 @@

Tactic - + @@ -36,7 +39,8 @@

Technique - + @@ -45,7 +49,8 @@

Occur Date - + @@ -55,29 +60,36 @@

-
+
- + {{$vm.tactics[proc.tactic].label}} - +
- {{proc.patternId}} - {{proc.extraData.patternParent.name}}:{{proc.extraData.pattern.name}} + {{proc.patternId}} - + {{proc.extraData.patternParent.name}}:{{proc.extraData.pattern.name}} - +
- {{proc.patternId}} - {{proc.extraData.pattern.name}} + {{proc.patternId}} - + {{proc.extraData.pattern.name}} - +
@@ -86,11 +98,13 @@

--> @@ -100,35 +114,44 @@

- / + /
- {{proc._createdAt | shortDate}} + {{proc._createdAt | shortDate}}
- {{(proc._updatedAt | shortDate) || '-'}} + {{(proc._updatedAt | shortDate) || '-'}}
-
- +
+ +
+
+ {{(proc.occurDate | shortDate) || '-'}}
-
- +
+ +
-
+
+
+ Not Specified +
diff --git a/frontend/app/views/partials/case/procedures/toolbar.html b/frontend/app/views/partials/case/procedures/toolbar.html index 5cf4cdb69c..763089d138 100644 --- a/frontend/app/views/partials/case/procedures/toolbar.html +++ b/frontend/app/views/partials/case/procedures/toolbar.html @@ -2,7 +2,7 @@