Skip to content

Commit

Permalink
Implement embeddable dashboard on PCI DSS (#6504)
Browse files Browse the repository at this point in the history
* feat(PCI DSS): replace the dashboard on PCI DSS application

* fix: fix ids dashboards panels

* fix: fix ids dashboards panels

* fix: add id to visualizations

* rename(pci): rename dashboard files

* fix(pcidss): fix dashboards

* feat(pci-dss): use data source on Dashboard and Events tabs

* remove(pci-dss): replace local NoDataResults and loading indicator by generic ones

* fix(pci-dss): render of all or agent dashboard

* feat(pci-dss): partial implementation of the usage of datasource on the Controls tab

* fix(pci): remove comment

* fix(pci): add date range to Dashboard query

* remove(pci): visualizations on server side

* feat(pci-dss): replace table on flyout details of Controls tab

* fix(pci-dss): fix redirection to other applications from Controls tab

* fix(pci-dss): replace label to agent.name column on the COntrols flyout

* remove(pci-dss): unused import

* feat(pci-dss): hide filter control on the search bar of dashboard

* feat(pci-dss): hide filter control on the search bar of controls

* fix(pci-dss): missing controlledBy variable

* fix(compliance): missing date picker on the Controls tab

* feat(pci-dss): move sample data warning on the dashboard

* fix(sample-data): remove effect dependencies and minor fix on link

* fix(regulatory-compliance): fix missing selected requirement on the flyout of Controls tab

* changelog: add pull request entry
  • Loading branch information
Desvelao authored May 7, 2024
1 parent 6fef597 commit e4fbb24
Show file tree
Hide file tree
Showing 18 changed files with 1,948 additions and 1,703 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,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) [#6287](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6287) [#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)
- 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) [#6287](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6287) [#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)
- 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)
- 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)
Expand Down
3 changes: 3 additions & 0 deletions plugins/main/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ export const DATA_SOURCE_FILTER_CONTROLLED_EXCLUDE_SERVER =
'hidden-exclude-server';
export const DATA_SOURCE_FILTER_CONTROLLED_PINNED_AGENT = 'pinned-agent';
export const DATA_SOURCE_FILTER_CONTROLLED_CLUSTER_MANAGER = 'cluster-manager';
export const DATA_SOURCE_FILTER_CONTROLLED_REGULATORY_COMPLIANCE_REQUIREMENT =
'hidden-regulatory-compliance-requirement';
export const DATA_SOURCE_FILTER_CONTROLLED_PCI_DSS_EXIST = 'pci-dss-exist';
export const DATA_SOURCE_FILTER_CONTROLLED_VULNERABILITIES_RULE_GROUP =
'vulnerabilities-rule-group';
export const DATA_SOURCE_FILTER_CONTROLLED_DOCKER_RULE_GROUP =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export * from './alerts-malware-detection';
export * from './alerts-aws';
export * from './vulnerabilities';
export * from './mitre-attack';
export * from './pci-dss';
export * from './virustotal';

export * from './alerts-google-cloud';
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { tFilter } from '../../../index';
import { DATA_SOURCE_FILTER_CONTROLLED_PCI_DSS_EXIST } from '../../../../../../../common/constants';
import { AlertsDataSource } from '../alerts-data-source';

const KEY_EXIST = 'rule.pci_dss';

export class AlertsPCIDSSDataSource extends AlertsDataSource {
constructor(id: string, title: string) {
super(id, title);
}

private getFilterExist() {
return [
{
meta: {
index: this.id,
negate: false,
disabled: false,
alias: null,
type: 'exists',
key: KEY_EXIST,
value: 'exists',
params: {
query: null,
type: 'phrase',
},
controlledBy: DATA_SOURCE_FILTER_CONTROLLED_PCI_DSS_EXIST,
},
exists: {
field: KEY_EXIST,
},
$state: {
store: 'appState',
},
} as tFilter,
];
}

getFixedFilters(): tFilter[] {
return [...this.getFilterExist(), ...super.getFixedFilters()];
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './alerts-pci-dss-data-source';
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,15 @@ import { mitreAttackColumns } from '../../overview/mitre/events/mitre-attack-col
import { virustotalColumns } from '../../overview/virustotal/events/virustotal-columns';
import { malwareDetectionColumns } from '../../overview/malware-detection/events/malware-detection-columns';
import { WAZUH_VULNERABILITIES_PATTERN } from '../../../../common/constants';
import { DashboardPCIDSS } from '../../overview/pci/dashboards/dashboard';
import { DashboardDocker } from '../../overview/docker/dashboards';
import { DashboardMalwareDetection } from '../../overview/malware-detection/dashboard';
import { DashboardFIM } from '../../overview/fim/dashboard/dashboard';
import { MitreAttackDataSource } from '../data-source/pattern/alerts/mitre-attack/mitre-attack-data-source';
import {
AlertsDockerDataSource,
AlertsDataSource,
AlertsPCIDSSDataSource,
AlertsVulnerabilitiesDataSource,
AlertsAWSDataSource,
VirusTotalDataSource,
Expand Down Expand Up @@ -339,7 +341,26 @@ export const ModulesDefaults = {
},
pci: {
init: 'dashboard',
tabs: RegulatoryComplianceTabs(pciColumns),
tabs: [
{
id: 'dashboard',
name: 'Dashboard',
buttons: [ButtonModuleExploreAgent, ButtonModuleGenerateReport],
component: DashboardPCIDSS,
},
{
id: 'inventory',
name: 'Controls',
buttons: [ButtonModuleExploreAgent],
component: props => (
<ComplianceTable {...props} DataSource={AlertsPCIDSSDataSource} />
),
},
renderDiscoverTab({
tableColumns: pciColumns,
DataSource: AlertsPCIDSSDataSource,
}),
],
availableFor: ['manager', 'agent'],
},
hipaa: {
Expand Down
Loading

0 comments on commit e4fbb24

Please sign in to comment.