Skip to content

Commit

Permalink
[Cloud Security] remove unknown vendors (elastic#177090)
Browse files Browse the repository at this point in the history
## 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="https://github.com/elastic/kibana/assets/17135495/57d9c52c-d346-455f-9335-a65ee0886732">

[Quick Wins](elastic/security-team#8690)
  • Loading branch information
Omolola-Akinleye authored Feb 20, 2024
1 parent 5876cac commit f37d1dd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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>
);
}
}
)
: [];
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "修正",
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "修复",
Expand Down

0 comments on commit f37d1dd

Please sign in to comment.