Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement embeddable dashboard on NIST 800-53 #6515

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions plugins/main/common/constants.ts
Expand Up @@ -230,6 +230,8 @@ export const DATA_SOURCE_FILTER_CONTROLLED_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_NIST_800_53_EXIST =
'nist-800-53-rule-exist';
export const DATA_SOURCE_FILTER_CONTROLLED_GDPR_EXIST = 'gdpr-rule-exist';
export const DATA_SOURCE_FILTER_CONTROLLED_HIPAA_EXIST = 'hipaa-rule-exist';
export const DATA_SOURCE_FILTER_CONTROLLED_DOCKER_RULE_GROUP =
Expand Down
@@ -0,0 +1,42 @@
import { tFilter } from '../../../index';
import { DATA_SOURCE_FILTER_CONTROLLED_NIST_800_53_EXIST } from '../../../../../../../common/constants';
import { AlertsDataSource } from '../alerts-data-source';

const KEY_EXIST = 'rule.nist_800_53';

export class AlertsNIST80053DataSource 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_NIST_800_53_EXIST,
},
exists: {
field: KEY_EXIST,
},
$state: {
store: 'appState',
},
} as tFilter,
];
}

getFixedFilters(): tFilter[] {
return [...this.getFilterExist(), ...super.getFixedFilters()];
}
}
@@ -0,0 +1 @@
export * from './alerts-nist-800-53-data-source';
Expand Up @@ -5,6 +5,7 @@ export * from './alerts-hipaa';
export * from './alerts-docker';
export * from './alerts-virustotal';
export * from './alerts-malware-detection';
export * from './alerts-nist-800-53';
export * from './alerts-aws';
export * from './vulnerabilities';
export * from './mitre-attack';
Expand Down
Expand Up @@ -54,6 +54,7 @@ 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 { DashboardNIST80053 } from '../../overview/nist/dashboards/dashboard';
import { DashboardHIPAA } from '../../overview/hipaa/dashboards/dashboard';
import {
AlertsDockerDataSource,
Expand All @@ -65,6 +66,7 @@ import {
AlertsGoogleCloudDataSource,
AlertsMalwareDetectionDataSource,
AlertsFIMDataSource,
AlertsNIST80053DataSource,
MitreAttackDataSource,
AlertsGDPRDataSource,
AlertsConfigurationAssessmentDataSource,
Expand Down Expand Up @@ -397,7 +399,26 @@ export const ModulesDefaults = {
},
nist: {
init: 'dashboard',
tabs: RegulatoryComplianceTabs(nistColumns),
tabs: [
{
id: 'dashboard',
name: 'Dashboard',
buttons: [ButtonModuleExploreAgent, ButtonModuleGenerateReport],
component: DashboardNIST80053,
},
{
id: 'inventory',
name: 'Controls',
buttons: [ButtonModuleExploreAgent],
component: props => (
<ComplianceTable {...props} DataSource={AlertsNIST80053DataSource} />
),
},
renderDiscoverTab({
tableColumns: nistColumns,
DataSource: AlertsNIST80053DataSource,
}),
],
availableFor: ['manager', 'agent'],
},
gdpr: {
Expand Down