From 5271ebc424150c098dddcf7e0e6a07f281b3ee47 Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Mon, 27 Jul 2020 17:33:31 +0000 Subject: [PATCH 1/2] fix: monkey/monkey_island/cc/ui/package.json & monkey/monkey_island/cc/ui/package-lock.json to reduce vulnerabilities The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-MARKED-584281 --- monkey/monkey_island/cc/ui/package-lock.json | 6 +++--- monkey/monkey_island/cc/ui/package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/monkey/monkey_island/cc/ui/package-lock.json b/monkey/monkey_island/cc/ui/package-lock.json index d555e10e5..ab78673b9 100644 --- a/monkey/monkey_island/cc/ui/package-lock.json +++ b/monkey/monkey_island/cc/ui/package-lock.json @@ -8220,9 +8220,9 @@ } }, "marked": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.8.2.tgz", - "integrity": "sha512-EGwzEeCcLniFX51DhTpmTom+dSA/MG/OBUDjnWtHbEnjAH180VzUeAw+oE4+Zv+CoYBWyRlYOTR0N8SO9R1PVw==" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/marked/-/marked-1.1.1.tgz", + "integrity": "sha512-mJzT8D2yPxoPh7h0UXkB+dBj4FykPJ2OIfxAWeIHrvoHDkFxukV/29QxoFQoPM6RLEwhIFdJpmKBlqVM3s2ZIw==" }, "mathml-tag-names": { "version": "2.1.3", diff --git a/monkey/monkey_island/cc/ui/package.json b/monkey/monkey_island/cc/ui/package.json index a7c3f359a..cdab06af6 100644 --- a/monkey/monkey_island/cc/ui/package.json +++ b/monkey/monkey_island/cc/ui/package.json @@ -75,7 +75,7 @@ "filepond": "^4.18.0", "jwt-decode": "^2.2.0", "lodash": "^4.17.15", - "marked": "^0.8.2", + "marked": "^1.1.1", "normalize.css": "^8.0.0", "npm": "^6.14.6", "pluralize": "^7.0.0", From ac21aca70d87b3f5595450e145ba7fdc3a1c9cf9 Mon Sep 17 00:00:00 2001 From: Shay Nehmad Date: Tue, 28 Jul 2020 12:33:20 +0300 Subject: [PATCH 2/2] Tested upgrade + small UI bugfix --- .travis.yml | 2 +- .../report-components/zerotrust/FindingsTable.js | 8 ++------ .../report-components/zerotrust/PrinciplesStatusTable.js | 8 ++------ 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 62bec4fd2..d1178458b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -83,7 +83,7 @@ script: - cd monkey_island/cc/ui - npm ci # See https://docs.npmjs.com/cli/ci.html - eslint ./src --quiet # Test for errors -- JS_WARNINGS_AMOUNT_UPPER_LIMIT=25 +- JS_WARNINGS_AMOUNT_UPPER_LIMIT=28 - eslint ./src --max-warnings $JS_WARNINGS_AMOUNT_UPPER_LIMIT # Test for max warnings # Build documentation diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/FindingsTable.js b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/FindingsTable.js index 5c99b4866..f83921dae 100644 --- a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/FindingsTable.js +++ b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/FindingsTable.js @@ -18,13 +18,11 @@ const columns = [ { Header: 'Events', id: 'events', accessor: x => { - const comp = ; - comp.displayName = 'EventsButton_' + x.finding_id; - return comp; }, maxWidth: EVENTS_COLUMN_MAX_WIDTH }, @@ -36,9 +34,7 @@ const columns = [ const pillarLabels = pillars.map((pillar) => ); - const comp =
{pillarLabels}
; - comp.displayName = 'PillarsLabels'; - return comp; + return
{pillarLabels}
; }, maxWidth: PILLARS_COLUMN_MAX_WIDTH, style: {'whiteSpace': 'unset'} diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/PrinciplesStatusTable.js b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/PrinciplesStatusTable.js index 6771747e0..6b1d22f6f 100644 --- a/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/PrinciplesStatusTable.js +++ b/monkey/monkey_island/cc/ui/src/components/report-components/zerotrust/PrinciplesStatusTable.js @@ -13,9 +13,7 @@ const columns = [ { Header: 'Status', id: 'status', accessor: x => { - const comp = ; - comp.displayName = 'StatusLabel'; - return comp; + return ; }, maxWidth: MAX_WIDTH_STATUS_COLUMN }, @@ -27,9 +25,7 @@ const columns = [ Header: 'Monkey Tests', id: 'tests', style: {'whiteSpace': 'unset'}, // This enables word wrap accessor: x => { - const comp = ; - comp.displayName = 'TestsStatus'; - return comp; + return ; } } ]