[Cloud Security] remove unknown vendors (#177090)

## Summary

Summarize your PR. If it involves visual changes include a screenshot or
gif.
This PR removes unknown vendors from the CVSS scores list.
<img width="883" alt="image"
src="57d9c52c-d346-455f-9335-a65ee0886732">

[Quick Wins](https://github.com/elastic/security-team/issues/8690)
This commit is contained in:
Lola 2024-02-20 17:22:47 -05:00 committed by GitHub
parent 5876cac5c1
commit f37d1dd050
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 9 additions and 17 deletions

View file

@ -45,14 +45,7 @@ interface VulnerabilityTabProps {
}
const CVSScore = ({ vectorBaseScore, vendor }: CVSScoreProps) => {
const vendorName =
cvssVendors[vendor] ??
i18n.translate(
'xpack.csp.vulnerabilities.vulnerabilityOverviewTab.cvsScore.unknownVendorName',
{
defaultMessage: 'Unknown vendor',
}
);
const vendorName = cvssVendors[vendor];
const vectorScores = getVectorScoreList(vectorBaseScore);
@ -212,14 +205,16 @@ export const VulnerabilityOverviewTab = ({ vulnerabilityRecord }: VulnerabilityT
? `${vulnerabilityRecord?.package?.name} ${vulnerabilityRecord?.package?.fixed_version}`
: emptyFixesMessageState;
const cvssScores: JSX.Element[] = vulnerability?.cvss
const cvssScores = vulnerability?.cvss
? Object.entries<VectorScoreBase>(vulnerability.cvss).map(
([vendor, vectorScoreBase]: [string, VectorScoreBase]) => {
return (
<EuiFlexItem key={`${vendor}`}>
<CVSScore vectorBaseScore={vectorScoreBase} vendor={vendor} />
</EuiFlexItem>
);
if (cvssVendors[vendor]) {
return (
<EuiFlexItem key={`${vendor}`}>
<CVSScore vectorBaseScore={vectorScoreBase} vendor={vendor} />
</EuiFlexItem>
);
}
}
)
: [];

View file

@ -12017,7 +12017,6 @@
"xpack.csp.vulnerabilities.vulnerabilityFindingFlyout.overviewTabLabel": "Aperçu",
"xpack.csp.vulnerabilities.vulnerabilityFindingFlyout.tableTabLabel": "Tableau",
"xpack.csp.vulnerabilities.vulnerabilityOverviewTab.alertsTitle": "Alertes",
"xpack.csp.vulnerabilities.vulnerabilityOverviewTab.cvsScore.unknownVendorName": "Fournisseur inconnu",
"xpack.csp.vulnerabilities.vulnerabilityOverviewTab.descriptionTitle": "Description",
"xpack.csp.vulnerabilities.vulnerabilityOverviewTab.emptyFixesMessage": "Aucun correctif n'est disponible pour l'instant.",
"xpack.csp.vulnerabilities.vulnerabilityOverviewTab.fixes": "Correctifs",

View file

@ -12031,7 +12031,6 @@
"xpack.csp.vulnerabilities.vulnerabilityFindingFlyout.overviewTabLabel": "概要",
"xpack.csp.vulnerabilities.vulnerabilityFindingFlyout.tableTabLabel": "表",
"xpack.csp.vulnerabilities.vulnerabilityOverviewTab.alertsTitle": "アラート",
"xpack.csp.vulnerabilities.vulnerabilityOverviewTab.cvsScore.unknownVendorName": "不明なベンダー",
"xpack.csp.vulnerabilities.vulnerabilityOverviewTab.descriptionTitle": "説明",
"xpack.csp.vulnerabilities.vulnerabilityOverviewTab.emptyFixesMessage": "まだ利用可能な修正はありません。",
"xpack.csp.vulnerabilities.vulnerabilityOverviewTab.fixes": "修正",

View file

@ -12125,7 +12125,6 @@
"xpack.csp.vulnerabilities.vulnerabilityFindingFlyout.overviewTabLabel": "概览",
"xpack.csp.vulnerabilities.vulnerabilityFindingFlyout.tableTabLabel": "表",
"xpack.csp.vulnerabilities.vulnerabilityOverviewTab.alertsTitle": "告警",
"xpack.csp.vulnerabilities.vulnerabilityOverviewTab.cvsScore.unknownVendorName": "未知供应商",
"xpack.csp.vulnerabilities.vulnerabilityOverviewTab.descriptionTitle": "描述",
"xpack.csp.vulnerabilities.vulnerabilityOverviewTab.emptyFixesMessage": "尚没有修复可用。",
"xpack.csp.vulnerabilities.vulnerabilityOverviewTab.fixes": "修复",