Skip to content

Commit

Permalink
Merge branch 'release/4.1.4' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Apr 15, 2021
2 parents df2b128 + 7935ff5 commit fb221af
Show file tree
Hide file tree
Showing 33 changed files with 350 additions and 218 deletions.
8 changes: 7 additions & 1 deletion .github/ISSUE_TEMPLATE/thehive3_bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |


Expand Down
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/thehive4_bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |


Expand Down
20 changes: 13 additions & 7 deletions .github/ISSUE_TEMPLATE/thehive4_question.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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:**
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions conf/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<!-- do not set the following logger to TRACE -->
<logger name="org.thp.scalligraph.traversal" level="INFO"/>
<logger name="org.reflections8.Reflections" level="ERROR" />
<logger name="org.janusgraph.graphdb.database.management.ManagementLogger" level="OFF"/>
<logger name="org.janusgraph.graphdb.database.IndexSerializer" level="ERROR"/>

<logger name="org.thp.scalligraph.models" level="INFO"/>
Expand Down
1 change: 0 additions & 1 deletion frontend/app/scripts/controllers/RootCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ angular.module('theHiveControllers').controller('RootCtrl',
name: 'unread-alert-count'
}
},
guard: UtilsSrv.hasAddDeleteEvents,
onUpdate: function (data) {
$scope.unreadAlertCount = data;
}
Expand Down
56 changes: 34 additions & 22 deletions frontend/app/scripts/controllers/admin/taxonomy/TaxonomyListCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down
7 changes: 3 additions & 4 deletions frontend/app/scripts/controllers/alert/AlertListCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down
28 changes: 16 additions & 12 deletions frontend/app/scripts/services/api/ProfileSrv.js
Original file line number Diff line number Diff line change
@@ -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';

Expand Down Expand Up @@ -46,6 +46,7 @@
'manageShare',
'manageObservable',
'manageTask',
'manageProcedure',
'manageAction',
'manageAnalyse',
'accessTheHiveFS'
Expand All @@ -59,39 +60,42 @@
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'
}
}
};

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);
};
});
Expand Down
11 changes: 6 additions & 5 deletions frontend/app/scripts/services/api/TaxonomyCacheSrv.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
});
};

Expand Down
21 changes: 13 additions & 8 deletions frontend/app/views/partials/admin/taxonomy/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,20 @@
<div class="col-md-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">List of taxonomies</h3>
<!-- <h3 class="box-title">List of taxonomies</h3> -->
<datalist-header title="List of taxonomies" list="$vm.list" total="$vm.allTaxonomyCount">
</datalist-header>
</div>
<div class="box-body">
<div ng-include="'views/partials/admin/taxonomy/list/toolbar.html'"></div>

<div class="mt-xs filter-panel" ng-include="'views/partials/admin/taxonomy/list/filters.html'" ng-show="$vm.filtering.context.showFilters"></div>
<div class="mt-xs filter-panel" ng-include="'views/partials/admin/taxonomy/list/filters.html'"
ng-show="$vm.filtering.context.showFilters"></div>

<div class="row mt-xs">
<div class="col-md-12 clearfix">

<filters-preview filters="$vm.filtering.context.filters"
on-clear-item="$vm.removeFilter(field)"
<filters-preview filters="$vm.filtering.context.filters" on-clear-item="$vm.removeFilter(field)"
on-clear-all="$vm.clearFilters()"></filters-preview>
</div>
</div>
Expand Down Expand Up @@ -52,7 +54,8 @@ <h3 class="box-title">List of taxonomies</h3>
<tbody>
<tr ng-repeat="taxonomy in $vm.list.values">
<td>
<span class="clickable" ng-click="$vm.addFilterValue('enabled', !!taxonomy.extraData.enabled)">
<span class="clickable"
ng-click="$vm.addFilterValue('enabled', !!taxonomy.extraData.enabled)">
<i class="fa" ng-class="{
true: 'text-tlp-green fa-circle',
false: 'text-tlp-red fa-circle',
Expand All @@ -75,7 +78,7 @@ <h3 class="box-title">List of taxonomies</h3>
</td>
<td class="clearfix">
<div class="pull-right">
<a class="btn btn-icon btn-clear" href ng-click="$vm.toggleActive(taxonomy)"
<a class="btn btn-icon btn-clear" href ng-click="$vm.toggleActive(taxonomy)"
uib-tooltip="{{!!taxonomy.extraData.enabled ? 'Disable taxonomy' : 'Enable taxonomy'}}">

<i class="fa" ng-class="{
Expand All @@ -84,11 +87,13 @@ <h3 class="box-title">List of taxonomies</h3>
}[!!taxonomy.extraData.enabled]"></i>
</a>

<a class="btn btn-icon btn-clear" href ng-click="$vm.show(taxonomy)" uib-tooltip="Edit taxonomy">
<a class="btn btn-icon btn-clear" href ng-click="$vm.show(taxonomy)"
uib-tooltip="Edit taxonomy">
<i class="text-primary fa fa-search"></i>
</a>

<a class="btn btn-icon btn-clear" href ng-click="$vm.remove(taxonomy)" uib-tooltip="Delete taxonomy">
<a class="btn btn-icon btn-clear" href ng-click="$vm.remove(taxonomy)"
uib-tooltip="Delete taxonomy">
<i class="text-danger fa fa-trash"></i>
</a>
</div>
Expand Down
Loading

0 comments on commit fb221af

Please sign in to comment.