diff --git a/src/web/pages/cves/__tests__/detailspage.jsx b/src/web/pages/cves/__tests__/detailspage.jsx
index 430aad73a6..e0858ec2ca 100644
--- a/src/web/pages/cves/__tests__/detailspage.jsx
+++ b/src/web/pages/cves/__tests__/detailspage.jsx
@@ -48,6 +48,10 @@ const entity_v2 = Cve.fromElement({
'An information disclosure issue was addressed with improved state management. This issue is fixed in macOS Catalina 10.15.6, watchOS 6.2.8. A malicious application may disclose restricted memory.',
products: 'cpe:/o:apple:mac_os_x:10.15.5 cpe:/o:apple:watchos:6.2.8',
nvts: '',
+ epss: {
+ score: 0.5,
+ percentile: 0.75,
+ },
cert: {
cert_ref: {
_type: 'CERT-Bund',
@@ -170,6 +174,9 @@ describe('CVE Detailspage tests', () => {
,
);
+ expect(baseElement).toHaveTextContent('Score0.50000');
+ expect(baseElement).toHaveTextContent('Percentile0.75000');
+
const links = baseElement.querySelectorAll('a');
const icons = getAllByTestId('svg-icon');
diff --git a/src/web/pages/cves/__tests__/listpage.jsx b/src/web/pages/cves/__tests__/listpage.jsx
index 053ae56bdd..5b04e60198 100644
--- a/src/web/pages/cves/__tests__/listpage.jsx
+++ b/src/web/pages/cves/__tests__/listpage.jsx
@@ -42,6 +42,10 @@ const cve = Cve.fromElement({
severity: '9.3',
description: 'foo bar baz',
usage_type: 'cve',
+ epss: {
+ score: 0.5,
+ percentile: 0.75,
+ },
});
const reloadInterval = -1;
@@ -193,11 +197,13 @@ describe('CvesPage tests', () => {
const row = baseElement.querySelectorAll('tr');
- expect(row[1]).toHaveTextContent('CVE-2020-9992');
- expect(row[1]).toHaveTextContent('foo bar baz');
- expect(row[1]).toHaveTextContent('Thu, Oct 22, 2020 9:15 PM CESTA');
- expect(row[1]).toHaveTextContent('AV:N/AC:M/Au:N/C:C/I:C/A:C');
- expect(row[1]).toHaveTextContent('9.3 (High)');
+ expect(row[2]).toHaveTextContent('CVE-2020-9992');
+ expect(row[2]).toHaveTextContent('foo bar baz');
+ expect(row[2]).toHaveTextContent('Thu, Oct 22, 2020 9:15 PM CESTA');
+ expect(row[2]).toHaveTextContent('AV:N/AC:M/Au:N/C:C/I:C/A:C');
+ expect(row[2]).toHaveTextContent('9.3 (High)');
+ expect(row[2]).toHaveTextContent('0.50000');
+ expect(row[2]).toHaveTextContent('0.75000');
});
test('should allow to bulk action on page contents', async () => {
diff --git a/src/web/pages/cves/details.jsx b/src/web/pages/cves/details.jsx
index c6c4a7e55a..2898564d5e 100644
--- a/src/web/pages/cves/details.jsx
+++ b/src/web/pages/cves/details.jsx
@@ -53,7 +53,7 @@ const CVSS_PROPS = {
};
const CveDetails = ({entity}) => {
- const {cvssBaseVector, description, references = [], severity} = entity;
+ const {cvssBaseVector, description, references = [], severity, epss} = entity;
return (
@@ -97,6 +97,23 @@ const CveDetails = ({entity}) => {
+ {isDefined(epss) && (
+
+
+
+
+ {_('Score')}
+ {epss.score.toFixed(5)}
+
+
+ {_('Percentile')}
+ {epss.percentile.toFixed(5)}
+
+
+
+
+ )}
+
{references.length > 0 && (
diff --git a/src/web/pages/cves/row.jsx b/src/web/pages/cves/row.jsx
index 64be99fb7d..696f7f9879 100644
--- a/src/web/pages/cves/row.jsx
+++ b/src/web/pages/cves/row.jsx
@@ -18,6 +18,8 @@
import React from 'react';
+import {_} from 'gmp/locale/lang';
+
import {shorten} from 'gmp/utils/string';
import SeverityBar from 'web/components/bar/severitybar';
@@ -35,6 +37,7 @@ import EntitiesActions from 'web/entities/actions';
import {RowDetailsToggle} from 'web/entities/row';
import PropTypes from 'web/utils/proptypes';
+import {isNumber} from "gmp/utils/identity";
const Row = ({
actionsComponent: ActionsComponent = EntitiesActions,
@@ -64,6 +67,12 @@ const Row = ({
+
+ {isNumber(entity?.epss?.score) ? entity.epss?.score.toFixed(5) : _("N/A")}
+
+
+ {isNumber(entity?.epss?.percentile) ? entity.epss?.percentile.toFixed(5) : _("N/A")}
+
);
diff --git a/src/web/pages/cves/table.jsx b/src/web/pages/cves/table.jsx
index de640306e6..3bcce860a0 100644
--- a/src/web/pages/cves/table.jsx
+++ b/src/web/pages/cves/table.jsx
@@ -32,6 +32,7 @@ import TableRow from 'web/components/table/row';
import CveDetails from './details';
import CveRow from './row';
+import {isDefined} from "gmp/utils/identity.js";
const Header = ({
actionsColumn,
@@ -45,6 +46,7 @@ const Header = ({
- {actionsColumn}
+
+ {"EPSS"}
+
+ {isDefined(actionsColumn) ? (
+ actionsColumn
+ ) : (
+
+ {_('Actions')}
+
+ )}
+
+
+
+
);