From ed8ad603f88c7a3a40d04feea40d82ccb9d6557b Mon Sep 17 00:00:00 2001 From: Federico Rodriguez Date: Thu, 23 May 2024 17:35:47 +0200 Subject: [PATCH] Change default vulnerabilities tables columns fields (#6703) --- .../common/modules/events-selected-fields.js | 52 +++++-------------- .../dashboards/inventory/config/index.ts | 9 ++-- 2 files changed, 17 insertions(+), 44 deletions(-) diff --git a/plugins/main/public/components/common/modules/events-selected-fields.js b/plugins/main/public/components/common/modules/events-selected-fields.js index ee685c42e7..f0af25b1b0 100644 --- a/plugins/main/public/components/common/modules/events-selected-fields.js +++ b/plugins/main/public/components/common/modules/events-selected-fields.js @@ -16,7 +16,7 @@ export const EventsSelectedFiles = { 'syscheck.event', 'rule.description', 'rule.level', - 'rule.id' + 'rule.id', ], mitre: [ 'agent.name', @@ -24,7 +24,7 @@ export const EventsSelectedFiles = { 'rule.mitre.tactic', 'rule.description', 'rule.level', - 'rule.id' + 'rule.id', ], sca: [ 'data.sca.check.title', @@ -32,18 +32,8 @@ export const EventsSelectedFiles = { 'data.sca.check.result', 'data.sca.policy', ], - general: [ - 'agent.name', - 'rule.description', - 'rule.level', - 'rule.id', - ], - aws: [ - 'data.aws.source', - 'rule.description', - 'rule.level', - 'rule.id', - ], + general: ['agent.name', 'rule.description', 'rule.level', 'rule.id'], + aws: ['data.aws.source', 'rule.description', 'rule.level', 'rule.id'], gcp: [ 'agent.name', 'data.gcp.jsonPayload.vmInstanceName', @@ -52,13 +42,7 @@ export const EventsSelectedFiles = { 'data.gcp.resource.type', 'data.gcp.severity', ], - pm: [ - 'agent.name', - 'data.title', - 'rule.description', - 'rule.level', - 'rule.id', - ], + pm: ['agent.name', 'data.title', 'rule.description', 'rule.level', 'rule.id'], audit: [ 'agent.name', 'data.audit.command', @@ -85,10 +69,9 @@ export const EventsSelectedFiles = { ], vuls: [ 'agent.name', - 'data.vulnerability.package.name', - 'data.vulnerability.cve', 'data.vulnerability.severity', - 'data.vulnerability.status' + 'data.vulnerability.cve', + 'data.vulnerability.package.name', ], virustotal: [ 'agent.name', @@ -118,43 +101,37 @@ export const EventsSelectedFiles = { 'rule.pci_dss', 'rule.description', 'rule.level', - 'rule.id' + 'rule.id', ], gdpr: [ 'agent.name', 'rule.gdpr', 'rule.description', 'rule.level', - 'rule.id' + 'rule.id', ], hipaa: [ 'agent.name', 'rule.hipaa', 'rule.description', 'rule.level', - 'rule.id' + 'rule.id', ], nist: [ 'agent.name', 'rule.nist_800_53', 'rule.description', 'rule.level', - 'rule.id' - ], - tsc: [ - 'agent.name', - 'rule.tsc', - 'rule.description', - 'rule.level', - 'rule.id' + 'rule.id', ], + tsc: ['agent.name', 'rule.tsc', 'rule.description', 'rule.level', 'rule.id'], office: [ 'data.office365.Subscription', 'data.office365.Operation', 'data.office365.UserId', 'data.office365.ClientIP', 'rule.level', - 'rule.id' + 'rule.id', ], github: [ 'agent.id', @@ -163,7 +140,6 @@ export const EventsSelectedFiles = { 'data.github.org', 'rule.description', 'rule.level', - 'rule.id' + 'rule.id', ], - }; diff --git a/plugins/main/public/components/overview/vulnerabilities/dashboards/inventory/config/index.ts b/plugins/main/public/components/overview/vulnerabilities/dashboards/inventory/config/index.ts index 517960b974..c0c9506fbe 100644 --- a/plugins/main/public/components/overview/vulnerabilities/dashboards/inventory/config/index.ts +++ b/plugins/main/public/components/overview/vulnerabilities/dashboards/inventory/config/index.ts @@ -3,9 +3,6 @@ import { EuiDataGridColumn } from '@elastic/eui'; export const MAX_ENTRIES_PER_QUERY = 10000; export const inventoryTableDefaultColumns: EuiDataGridColumn[] = [ - { - id: 'agent.id', - }, { id: 'agent.name', }, @@ -16,12 +13,12 @@ export const inventoryTableDefaultColumns: EuiDataGridColumn[] = [ id: 'package.version', }, { - id: 'vulnerability.severity', + id: 'vulnerability.description', }, { - id: 'vulnerability.id', + id: 'vulnerability.severity', }, { - id: 'vulnerability.score.base', + id: 'vulnerability.id', }, ];