From 307c8e3cdb26c466406199fa5dd49525b33c1f47 Mon Sep 17 00:00:00 2001 From: "chantal.kelm" Date: Thu, 18 Jul 2024 12:37:03 -0300 Subject: [PATCH 1/3] fix some links in the threat hunting dashboard table do not redirect or have no links --- .../common/wazuh-discover/render-columns.tsx | 42 ++++++++++++------- .../events/threat-hunting-columns.tsx | 12 ++++-- 2 files changed, 36 insertions(+), 18 deletions(-) diff --git a/plugins/main/public/components/common/wazuh-discover/render-columns.tsx b/plugins/main/public/components/common/wazuh-discover/render-columns.tsx index b3e4de94c9..0d89157864 100644 --- a/plugins/main/public/components/common/wazuh-discover/render-columns.tsx +++ b/plugins/main/public/components/common/wazuh-discover/render-columns.tsx @@ -3,26 +3,23 @@ import { EuiLink } from '@elastic/eui'; import { tDataGridRenderColumn } from '../data-grid'; import { getCore } from '../../../kibana-services'; import { RedirectAppLinks } from '../../../../../../src/plugins/opensearch_dashboards_react/public'; -import { endpointSummary, rules } from '../../../utils/applications'; -import { formatUIDate } from '../../../react-services'; +import { + endpointSummary, + rules, + mitreAttack, +} from '../../../utils/applications'; import NavigationService from '../../../react-services/navigation-service'; export const MAX_ENTRIES_PER_QUERY = 10000; -const navigateTo = (ev, section, params) => { - NavigationService.getInstance().navigateToModule(ev, section, params); -}; - -const renderMitreTechnique = (technique: string) => ( +const renderMitreTechnique = technique => ( - navigateTo(e, 'overview', { - tab: 'mitre', - tabView: 'intelligence', - tabRedirect: 'techniques', - idToRedirect: technique, - }) - } + onClick={e => { + e.preventDefault(); + NavigationService.getInstance().navigateToApp(mitreAttack.id, { + path: `#/overview?tab=mitre&tabView=intelligence&tabRedirect=techniques&idToRedirect=${technique}`, + }); + }} > {technique} @@ -86,4 +83,19 @@ export const wzDiscoverRenderColumns: tDataGridRenderColumn[] = [
{renderMitreTechnique(value)}
), }, + { + id: 'rule.mitre_techniques', + render: value => + Array.isArray(value) ? ( +
+ {value?.map((technique, index) => ( +
+ {renderMitreTechnique(technique)} +
+ ))} +
+ ) : ( +
{renderMitreTechnique(value)}
+ ), + }, ]; diff --git a/plugins/main/public/components/overview/threat-hunting/events/threat-hunting-columns.tsx b/plugins/main/public/components/overview/threat-hunting/events/threat-hunting-columns.tsx index 87bda4ea92..e09379cae6 100644 --- a/plugins/main/public/components/overview/threat-hunting/events/threat-hunting-columns.tsx +++ b/plugins/main/public/components/overview/threat-hunting/events/threat-hunting-columns.tsx @@ -11,10 +11,10 @@ export const threatHuntingTableDefaultColumns: tDataGridColumn[] = [ id: 'timestamp', }, { - id: 'agent.id' + id: 'agent.id', }, { - id: 'agent.name' + id: 'agent.name', }, { id: 'rule.mitre.id', @@ -22,6 +22,9 @@ export const threatHuntingTableDefaultColumns: tDataGridColumn[] = [ { id: 'rule.mitre.tactic', }, + { + id: 'rule.mitre_technique', + }, { id: 'rule.description', }, @@ -29,7 +32,7 @@ export const threatHuntingTableDefaultColumns: tDataGridColumn[] = [ id: 'rule.level', }, { - id: 'rule.id' + id: 'rule.id', }, ]; @@ -46,6 +49,9 @@ export const threatHuntingTableAgentColumns: EuiDataGridColumn[] = [ { id: 'rule.mitre.tactic', }, + { + id: 'rule.mitre_technique', + }, { id: 'rule.description', }, From 843d4935ff7136b5694bdb5d8800df3b895a8b0c Mon Sep 17 00:00:00 2001 From: "chantal.kelm" Date: Thu, 18 Jul 2024 13:14:24 -0300 Subject: [PATCH 2/3] update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8635e4b88b..f5c5df2270 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,7 @@ All notable changes to the Wazuh app project will be documented in this file. ### Changed -- Removed embedded discover [#6120](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6120) [#6235](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6235) [#6254](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6254) [#6285](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6285) [#6288](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6288) [#6290](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6290) [#6289](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6289) [#6286](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6286) [#6275](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6275) [#6287](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6287) [#6297](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6297) [#6291](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6287) [#6459](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6459) [#6434](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6434) [#6504](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6504) [#6649](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6649) [#6506](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6506) [#6537](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6537) [#6528](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6528) [#6675](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6675) [#6674](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6674) [#6558](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6558) [#6685](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6685) [#6691](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6691) [#6712](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6712) [#6734](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6734) [#6746](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6746) [#6752](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6752) [#6753](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6753) [#6756](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6756) [#6771](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6771) [#6792](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6792) +- Removed embedded discover [#6120](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6120) [#6235](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6235) [#6254](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6254) [#6285](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6285) [#6288](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6288) [#6290](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6290) [#6289](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6289) [#6286](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6286) [#6275](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6275) [#6287](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6287) [#6297](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6297) [#6291](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6287) [#6459](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6459) [#6434](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6434) [#6504](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6504) [#6649](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6649) [#6506](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6506) [#6537](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6537) [#6528](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6528) [#6675](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6675) [#6674](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6674) [#6558](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6558) [#6685](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6685) [#6691](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6691) [#6712](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6712) [#6734](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6734) [#6746](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6746) [#6752](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6752) [#6753](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6753) [#6756](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6756) [#6771](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6771) [#6792](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6792) [#6845](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6845) - Allow editing groups for an agent from Endpoints Summary [#6250](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6250) - Change how the configuration is managed in the backend side [#6337](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6337) [#6519](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6519) [#6573](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6573) - Change the view of API is down and check connection to Server APIs application [#6337](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6337) From 52c7401e5eed4257ae954c19d2ac889f8a416be8 Mon Sep 17 00:00:00 2001 From: "chantal.kelm" Date: Fri, 19 Jul 2024 13:42:50 -0300 Subject: [PATCH 3/3] use RedirectAppLinks in threat hunting --- .../common/wazuh-discover/render-columns.tsx | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/plugins/main/public/components/common/wazuh-discover/render-columns.tsx b/plugins/main/public/components/common/wazuh-discover/render-columns.tsx index 0d89157864..3a69ec65ca 100644 --- a/plugins/main/public/components/common/wazuh-discover/render-columns.tsx +++ b/plugins/main/public/components/common/wazuh-discover/render-columns.tsx @@ -13,16 +13,15 @@ import NavigationService from '../../../react-services/navigation-service'; export const MAX_ENTRIES_PER_QUERY = 10000; const renderMitreTechnique = technique => ( - { - e.preventDefault(); - NavigationService.getInstance().navigateToApp(mitreAttack.id, { + + - {technique} - + })} + > + {technique} + + ); export const wzDiscoverRenderColumns: tDataGridRenderColumn[] = [