From b0a25bd5aac41d9cc3af3b43391c9da7c5e6ec82 Mon Sep 17 00:00:00 2001 From: Paulo Henrique Date: Tue, 17 Dec 2024 16:58:12 -0300 Subject: [PATCH 1/3] misconfigurations palette --- .../public/src/constants/component_constants.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/solutions/security/packages/kbn-cloud-security-posture/public/src/constants/component_constants.ts b/x-pack/solutions/security/packages/kbn-cloud-security-posture/public/src/constants/component_constants.ts index 3e22fdea80666..0d605ba6edb74 100644 --- a/x-pack/solutions/security/packages/kbn-cloud-security-posture/public/src/constants/component_constants.ts +++ b/x-pack/solutions/security/packages/kbn-cloud-security-posture/public/src/constants/component_constants.ts @@ -7,8 +7,8 @@ import { euiThemeVars } from '@kbn/ui-theme'; export const statusColors = { - passed: euiThemeVars.euiColorSuccess, - failed: euiThemeVars.euiColorVis9, + passed: '#00bfb3', + failed: '#e7664c', unknown: euiThemeVars.euiColorLightShade, }; From 17a08c4811d475289448c1cc81c31d9b8971b13b Mon Sep 17 00:00:00 2001 From: Paulo Henrique Date: Tue, 17 Dec 2024 16:58:38 -0300 Subject: [PATCH 2/3] vulnerabilities palette --- .../src/utils/get_vulnerability_colors.ts | 34 +++++++++++++------ 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/x-pack/solutions/security/packages/kbn-cloud-security-posture/public/src/utils/get_vulnerability_colors.ts b/x-pack/solutions/security/packages/kbn-cloud-security-posture/public/src/utils/get_vulnerability_colors.ts index 54bcb357137b7..2642130476537 100644 --- a/x-pack/solutions/security/packages/kbn-cloud-security-posture/public/src/utils/get_vulnerability_colors.ts +++ b/x-pack/solutions/security/packages/kbn-cloud-security-posture/public/src/utils/get_vulnerability_colors.ts @@ -5,33 +5,47 @@ * 2.0. */ -import { euiThemeVars } from '@kbn/ui-theme'; import type { VulnSeverity } from '@kbn/cloud-security-posture-common'; import { VULNERABILITIES_SEVERITY } from '@kbn/cloud-security-posture-common'; +const VULNERABILITY_SEVERITY_COLOR_PALETTE = { + critical: '#BD271E', + high: '#FF7E62', + medium: '#F1D86F', + low: '#54B399', + unknown: '#aaa', +}; + +const VULNERABILITY_SCORE_COLOR_PALETTE = { + critical: '#BD271E', + high: '#ae6445', + medium: '#928e6e', + low: '#54B399', +}; + export const getCvsScoreColor = (score: number): string | undefined => { if (score <= 4) { - return euiThemeVars.euiColorVis0; // low severity + return VULNERABILITY_SCORE_COLOR_PALETTE.low; } else if (score >= 4 && score <= 7) { - return euiThemeVars.euiColorVis7; // medium severity + return VULNERABILITY_SCORE_COLOR_PALETTE.medium; } else if (score >= 7 && score <= 9) { - return euiThemeVars.euiColorVis9; // high severity + return VULNERABILITY_SCORE_COLOR_PALETTE.high; } else if (score >= 9) { - return euiThemeVars.euiColorDanger; // critical severity + return VULNERABILITY_SCORE_COLOR_PALETTE.critical; } }; export const getSeverityStatusColor = (severity: VulnSeverity): string => { switch (severity) { case VULNERABILITIES_SEVERITY.LOW: - return euiThemeVars.euiColorVis0; + return VULNERABILITY_SEVERITY_COLOR_PALETTE.low; case VULNERABILITIES_SEVERITY.MEDIUM: - return euiThemeVars.euiColorVis5_behindText; + return VULNERABILITY_SEVERITY_COLOR_PALETTE.medium; case VULNERABILITIES_SEVERITY.HIGH: - return euiThemeVars.euiColorVis9_behindText; + return VULNERABILITY_SEVERITY_COLOR_PALETTE.high; case VULNERABILITIES_SEVERITY.CRITICAL: - return euiThemeVars.euiColorDanger; + return VULNERABILITY_SEVERITY_COLOR_PALETTE.critical; default: - return '#aaa'; + return VULNERABILITY_SEVERITY_COLOR_PALETTE.unknown; } }; From ad5a216489f36a7f51d9b610025a0667a7547065 Mon Sep 17 00:00:00 2001 From: Paulo Henrique Date: Tue, 17 Dec 2024 18:09:07 -0300 Subject: [PATCH 3/3] pushing updated color --- .../public/src/utils/get_vulnerability_colors.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/solutions/security/packages/kbn-cloud-security-posture/public/src/utils/get_vulnerability_colors.ts b/x-pack/solutions/security/packages/kbn-cloud-security-posture/public/src/utils/get_vulnerability_colors.ts index 2642130476537..8ecb2b2a6fc03 100644 --- a/x-pack/solutions/security/packages/kbn-cloud-security-posture/public/src/utils/get_vulnerability_colors.ts +++ b/x-pack/solutions/security/packages/kbn-cloud-security-posture/public/src/utils/get_vulnerability_colors.ts @@ -18,8 +18,8 @@ const VULNERABILITY_SEVERITY_COLOR_PALETTE = { const VULNERABILITY_SCORE_COLOR_PALETTE = { critical: '#BD271E', - high: '#ae6445', - medium: '#928e6e', + high: '#DA8B45', + medium: '#D6BF57', low: '#54B399', };