From 85f4451ed6bbfa29ca5dbc083b685862a5d841d4 Mon Sep 17 00:00:00 2001 From: Ian Yenien Serrano <63758389+yenienserrano@users.noreply.github.com> Date: Mon, 19 Feb 2024 16:05:36 +0100 Subject: [PATCH 1/2] Replace discover Github (#6291) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Replace discover * Add changelog --------- Co-authored-by: Julio César Biset <43619595+jbiset@users.noreply.github.com> --- CHANGELOG.md | 2 +- .../common/modules/modules-defaults.js | 3 ++- .../github-panel/events/github-columns.tsx | 25 +++++++++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 plugins/main/public/components/overview/github-panel/events/github-columns.tsx diff --git a/CHANGELOG.md b/CHANGELOG.md index 6269a5808f..ed9da8a9ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,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) [#6275](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6275) [#6287](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6287) +- 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) [#6291](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6291) [#6275](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6275) [#6287](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6287) - Develop logic of a new index for the fim module [#6227](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6227) - Allow editing groups for an agent from Endpoints Summary [#6250](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6250) diff --git a/plugins/main/public/components/common/modules/modules-defaults.js b/plugins/main/public/components/common/modules/modules-defaults.js index e660068c50..3d882abaf8 100644 --- a/plugins/main/public/components/common/modules/modules-defaults.js +++ b/plugins/main/public/components/common/modules/modules-defaults.js @@ -32,6 +32,7 @@ import { amazonWebServicesColumns } from '../../overview/amazon-web-services/eve import { office365Columns } from '../../overview/office-panel/events/office-365-columns'; import { fileIntegrityMonitoringColumns } from '../../overview/fim/events/file-integrity-monitoring-columns'; import { configurationAssessmentColumns } from '../../agents/sca/events/configuration-assessment-columns'; +import { githubColumns } from '../../overview/github-panel/events/github-columns'; const DashboardTab = { id: 'dashboard', @@ -182,7 +183,7 @@ export const ModulesDefaults = { buttons: [ButtonModuleExploreAgent], component: GitHubPanel, }, - EventsTab, + renderDiscoverTab(DEFAULT_INDEX_PATTERN, githubColumns), ], availableFor: ['manager', 'agent'], }, diff --git a/plugins/main/public/components/overview/github-panel/events/github-columns.tsx b/plugins/main/public/components/overview/github-panel/events/github-columns.tsx new file mode 100644 index 0000000000..28e0db7a4f --- /dev/null +++ b/plugins/main/public/components/overview/github-panel/events/github-columns.tsx @@ -0,0 +1,25 @@ +import { tDataGridColumn } from '../../../common/data-grid'; + +export const githubColumns: tDataGridColumn[] = [ + { + id: 'agent.id', + }, + { + id: 'data.github.repo', + }, + { + id: 'data.github.actor', + }, + { + id: 'data.github.org', + }, + { + id: 'rule.description', + }, + { + id: 'rule.level', + }, + { + id: 'rule.id', + }, +]; From e70033f8d7c8ad9a8d70fca7d9ae16ae0ffa88cc Mon Sep 17 00:00:00 2001 From: JuanGarriuz Date: Mon, 19 Feb 2024 21:35:14 +0100 Subject: [PATCH 2/2] Replace discover PCI DSS, GDPR, HIPAA, TSC and NIST 800-53 modules (#6297) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * replace discover * add DashboardTab * Add changelog * remove discover from security operations less it hygiene * Update CHANGELOG --------- Co-authored-by: Julio César Biset <43619595+jbiset@users.noreply.github.com> Co-authored-by: Maximiliano Ibarra <6089438+Machi3mfl@users.noreply.github.com> Co-authored-by: Maximiliano --- CHANGELOG.md | 2 +- .../common/modules/modules-defaults.js | 19 ++++++++++++------- .../overview/gdpr/events/gdpr-columns.tsx | 19 +++++++++++++++++++ .../overview/hipaa/events/hipaa-columns.tsx | 19 +++++++++++++++++++ .../overview/nist/events/nist-columns.tsx | 19 +++++++++++++++++++ .../overview/pci/events/pci-columns.tsx | 19 +++++++++++++++++++ .../overview/tsc/events/tsc-columns.tsx | 19 +++++++++++++++++++ 7 files changed, 108 insertions(+), 8 deletions(-) create mode 100644 plugins/main/public/components/overview/gdpr/events/gdpr-columns.tsx create mode 100644 plugins/main/public/components/overview/hipaa/events/hipaa-columns.tsx create mode 100644 plugins/main/public/components/overview/nist/events/nist-columns.tsx create mode 100644 plugins/main/public/components/overview/pci/events/pci-columns.tsx create mode 100644 plugins/main/public/components/overview/tsc/events/tsc-columns.tsx diff --git a/CHANGELOG.md b/CHANGELOG.md index ed9da8a9ac..c842e169d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,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) [#6291](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6291) [#6275](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6275) [#6287](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6287) +- 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) [#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) [#6287](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6287) [#6291](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6287) - Develop logic of a new index for the fim module [#6227](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6227) - Allow editing groups for an agent from Endpoints Summary [#6250](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6250) diff --git a/plugins/main/public/components/common/modules/modules-defaults.js b/plugins/main/public/components/common/modules/modules-defaults.js index 3d882abaf8..1aa0a53574 100644 --- a/plugins/main/public/components/common/modules/modules-defaults.js +++ b/plugins/main/public/components/common/modules/modules-defaults.js @@ -32,6 +32,11 @@ import { amazonWebServicesColumns } from '../../overview/amazon-web-services/eve import { office365Columns } from '../../overview/office-panel/events/office-365-columns'; import { fileIntegrityMonitoringColumns } from '../../overview/fim/events/file-integrity-monitoring-columns'; import { configurationAssessmentColumns } from '../../agents/sca/events/configuration-assessment-columns'; +import { pciColumns } from '../../overview/pci/events/pci-columns'; +import { hipaaColumns } from '../../overview/hipaa/events/hipaa-columns'; +import { nistColumns } from '../../overview/nist/events/nist-columns'; +import { gdprColumns } from '../../overview/gdpr/events/gdpr-columns'; +import { tscColumns } from '../../overview/tsc/events/tsc-columns'; import { githubColumns } from '../../overview/github-panel/events/github-columns'; const DashboardTab = { @@ -61,7 +66,7 @@ const EventsTab = { component: Events, }; -const RegulatoryComplianceTabs = [ +const RegulatoryComplianceTabs = columns => [ DashboardTab, { id: 'inventory', @@ -69,7 +74,7 @@ const RegulatoryComplianceTabs = [ buttons: [ButtonModuleExploreAgent], component: ComplianceTable, }, - EventsTab, + renderDiscoverTab(DEFAULT_INDEX_PATTERN, columns), ]; export const ModulesDefaults = { @@ -262,27 +267,27 @@ export const ModulesDefaults = { }, pci: { init: 'dashboard', - tabs: RegulatoryComplianceTabs, + tabs: RegulatoryComplianceTabs(pciColumns), availableFor: ['manager', 'agent'], }, hipaa: { init: 'dashboard', - tabs: RegulatoryComplianceTabs, + tabs: RegulatoryComplianceTabs(hipaaColumns), availableFor: ['manager', 'agent'], }, nist: { init: 'dashboard', - tabs: RegulatoryComplianceTabs, + tabs: RegulatoryComplianceTabs(nistColumns), availableFor: ['manager', 'agent'], }, gdpr: { init: 'dashboard', - tabs: RegulatoryComplianceTabs, + tabs: RegulatoryComplianceTabs(gdprColumns), availableFor: ['manager', 'agent'], }, tsc: { init: 'dashboard', - tabs: RegulatoryComplianceTabs, + tabs: RegulatoryComplianceTabs(tscColumns), availableFor: ['manager', 'agent'], }, syscollector: { diff --git a/plugins/main/public/components/overview/gdpr/events/gdpr-columns.tsx b/plugins/main/public/components/overview/gdpr/events/gdpr-columns.tsx new file mode 100644 index 0000000000..f02c3d9464 --- /dev/null +++ b/plugins/main/public/components/overview/gdpr/events/gdpr-columns.tsx @@ -0,0 +1,19 @@ +import { tDataGridColumn } from '../../../common/data-grid'; + +export const gdprColumns: tDataGridColumn[] = [ + { + id: 'agent.name', + }, + { + id: 'rule.gdpr', + }, + { + id: 'rule.description', + }, + { + id: 'rule.level', + }, + { + id: 'rule.id', + }, +]; diff --git a/plugins/main/public/components/overview/hipaa/events/hipaa-columns.tsx b/plugins/main/public/components/overview/hipaa/events/hipaa-columns.tsx new file mode 100644 index 0000000000..9a31860eec --- /dev/null +++ b/plugins/main/public/components/overview/hipaa/events/hipaa-columns.tsx @@ -0,0 +1,19 @@ +import { tDataGridColumn } from '../../../common/data-grid'; + +export const hipaaColumns: tDataGridColumn[] = [ + { + id: 'agent.name', + }, + { + id: 'rule.hipaa', + }, + { + id: 'rule.description', + }, + { + id: 'rule.level', + }, + { + id: 'rule.id', + }, +]; diff --git a/plugins/main/public/components/overview/nist/events/nist-columns.tsx b/plugins/main/public/components/overview/nist/events/nist-columns.tsx new file mode 100644 index 0000000000..55ca628416 --- /dev/null +++ b/plugins/main/public/components/overview/nist/events/nist-columns.tsx @@ -0,0 +1,19 @@ +import { tDataGridColumn } from '../../../common/data-grid'; + +export const nistColumns: tDataGridColumn[] = [ + { + id: 'agent.name', + }, + { + id: 'rule.nist_800_53', + }, + { + id: 'rule.description', + }, + { + id: 'rule.level', + }, + { + id: 'rule.id', + }, +]; diff --git a/plugins/main/public/components/overview/pci/events/pci-columns.tsx b/plugins/main/public/components/overview/pci/events/pci-columns.tsx new file mode 100644 index 0000000000..374705cefe --- /dev/null +++ b/plugins/main/public/components/overview/pci/events/pci-columns.tsx @@ -0,0 +1,19 @@ +import { tDataGridColumn } from '../../../common/data-grid'; + +export const pciColumns: tDataGridColumn[] = [ + { + id: 'agent.name', + }, + { + id: 'rule.pci_dss', + }, + { + id: 'rule.description', + }, + { + id: 'rule.level', + }, + { + id: 'rule.id', + }, +]; diff --git a/plugins/main/public/components/overview/tsc/events/tsc-columns.tsx b/plugins/main/public/components/overview/tsc/events/tsc-columns.tsx new file mode 100644 index 0000000000..d67fb46b41 --- /dev/null +++ b/plugins/main/public/components/overview/tsc/events/tsc-columns.tsx @@ -0,0 +1,19 @@ +import { tDataGridColumn } from '../../../common/data-grid'; + +export const tscColumns: tDataGridColumn[] = [ + { + id: 'agent.name', + }, + { + id: 'rule.tsc', + }, + { + id: 'rule.description', + }, + { + id: 'rule.level', + }, + { + id: 'rule.id', + }, +];