-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Cloud Security] [Vulnerabilities] Custom renderers for Group by Reso…
…urce, Cloud account and CVE (#174950) ## Summary It closes #169052, #169048 and [#172197](#172197) This PR adds the following changes to the Findings -> Vulnerabilities page: - Added Severity mapping component to all Vulnerabilities grouping - Added Cloud account grouping to the Vulnerabilities default groups (groups by `cloud.account.name`) - Added CVE grouping to the Vulnerabilities default groups (groups by `vulnerability.id`) It also introduced the following changes: - Added utility to retrieve cloud providers names from a cloud provider abbreviation (aws, azure, gcp) - Added component to retrieve cloud provider icons from a cloud provider abbreviation (aws, azure, gcp) - Fixed Benchmarks page was displaying `Google Cloud Provider` for GCP instead of `Google Cloud Platform`. - Added / Updated FTR tests for vulnerability grouping ## Screenshots ![image](https://github.com/elastic/kibana/assets/19270322/cb79fc81-1b0d-4ce2-a456-af270390b1c9) <img width="1498" alt="image" src="https://github.com/elastic/kibana/assets/19270322/245d6c06-67bd-429b-963f-ddc67cca5af4"> <img width="1509" alt="image" src="https://github.com/elastic/kibana/assets/19270322/028be6e4-3543-4fd8-8bee-f23535aec7b8"> <img width="1501" alt="image" src="https://github.com/elastic/kibana/assets/19270322/c691f8b8-fca5-4d65-a182-ca26448a7ede"> <img width="1502" alt="image" src="https://github.com/elastic/kibana/assets/19270322/caa4fe29-a542-4e33-b609-be50d29f6e37"> ## Recording https://github.com/elastic/kibana/assets/19270322/2e8d2c9d-2e3c-459c-a9e5-29f046b9ed9e
- Loading branch information
Showing
12 changed files
with
328 additions
and
219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
x-pack/plugins/cloud_security_posture/public/components/cloud_provider_icon.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { EuiIcon, EuiToolTip, IconSize } from '@elastic/eui'; | ||
import { CSSInterpolation } from '@emotion/serialize'; | ||
import { getCloudProviderNameFromAbbreviation } from '../../common/utils/helpers'; | ||
import googleCloudLogo from '../assets/icons/google_cloud_logo.svg'; | ||
|
||
interface Props { | ||
cloudProvider: string; | ||
style?: CSSInterpolation; | ||
size?: IconSize; | ||
} | ||
|
||
const getCloudProviderIcon = (cloudProvider: string) => { | ||
switch (cloudProvider) { | ||
case 'azure': | ||
return 'logoAzure'; | ||
case 'aws': | ||
return 'logoAWS'; | ||
case 'gcp': | ||
return googleCloudLogo; | ||
default: | ||
return undefined; | ||
} | ||
}; | ||
|
||
export const CloudProviderIcon = ({ cloudProvider, size, style }: Props) => { | ||
const iconType = getCloudProviderIcon(cloudProvider); | ||
|
||
if (!iconType) { | ||
return null; | ||
} | ||
|
||
const name = getCloudProviderNameFromAbbreviation(cloudProvider); | ||
|
||
return ( | ||
<EuiToolTip content={name}> | ||
<EuiIcon type={iconType} size={size || 'xl'} css={style} /> | ||
</EuiToolTip> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
174 changes: 0 additions & 174 deletions
174
...rity_posture/public/pages/vulnerabilities/hooks/use_latest_vulnerabilities_by_resource.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.