π A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!
Vue awesomedashboarddockerhomelabhomepagemitnodejsorganizationproductivitypwaself-hostedstartpagevue
π¨ Small lint fixes to cve widget
Alicia Sykesa674e21927c8
diff --git a/docs/widgets.md b/docs/widgets.mdindex 2bf68612..68788ddc 100644--- a/docs/widgets.md+++ b/docs/widgets.md@@ -641,8 +641,8 @@ Docs: https://nvd.nist.gov/developers/vulnerabilities--- | --- | --- | ---**`cveTag`** | `string` | _Optional_ | This parameter returns only the CVE records that include the provided cveTag. Options are **disputed**, **unsupported-when-assigned** or **exclusively-hosted-service****`limit`** | `number` | _Optional_ | The number of results to fetch. Can be between `5` and `30`, defaults to `5`-**`cvssV2Severity`** | `number` | _Optional_ | This parameter returns only the CVEs that match the provided CVSSv2 qualitative severity rating. Options are **LOW**, **MEDIUM**, **HIGH** or **CRITICAL**-**`cvssV3Severity`** | `boolean` | _Optional_ | This parameter returns only the CVEs that match the provided CVSSv3 qualitative severity rating. Options are **LOW**, **MEDIUM**, **HIGH** or **CRITICAL**+**`cvssV2Severity`** | `string` | _Optional_ | This parameter returns only the CVEs that match the provided CVSSv2 qualitative severity rating. Options are **LOW**, **MEDIUM**, **HIGH** or **CRITICAL**+**`cvssV3Severity`** | `string` | _Optional_ | This parameter returns only the CVEs that match the provided CVSSv3 qualitative severity rating. Options are **LOW**, **MEDIUM**, **HIGH** or **CRITICAL****`cvssV4Severity`** | `string` | _Optional_ | This parameter returns only the CVEs that match the provided CVSSv4 qualitative severity rating. Options are **LOW**, **MEDIUM**, **HIGH** or **CRITICAL****`keywordSearch`** | `string` | _Optional_ | This parameter returns only the CVEs where a word or phrase is found in the current descriptiondiff --git a/src/components/Widgets/CveVulnerabilities.vue b/src/components/Widgets/CveVulnerabilities.vueindex 921950d5..3e54e016 100644--- a/src/components/Widgets/CveVulnerabilities.vue+++ b/src/components/Widgets/CveVulnerabilities.vue@@ -40,11 +40,6 @@ export default {formatDescription(description) {return truncateStr(description, 350);},- formatExploitCount(numExploits) {- if (!numExploits) return 'Number of exploits not known';- if (numExploits === '0') return 'No published exploits';- return `${numExploits} known exploit${numExploits !== '1' ? 's' : ''}`;- },},computed: {endpointTotal() {@@ -100,7 +95,7 @@ export default {return url;},- /* Make GET request to CoinGecko API endpoint */+ /* Make GET request to NIST NVD API endpoint */fetchData() {this.defaultTimeout = 12000;this.makeRequest(this.endpointTotal)@@ -131,27 +126,27 @@ export default {}if (metrics.cvssMetricV40 !== undefined) {for (let i = 0; i < metrics.cvssMetricV40.length; i += 1) {- if (metrics.cvssMetricV40[i].cvssData !== undefined &&- metrics.cvssMetricV40[i].cvssData.baseSeverity !== undefined &&- metrics.cvssMetricV40[i].cvssData.baseSeverity !== '') {+ if (metrics.cvssMetricV40[i].cvssData !== undefined+ && metrics.cvssMetricV40[i].cvssData.baseSeverity !== undefined+ && metrics.cvssMetricV40[i].cvssData.baseSeverity !== '') {return metrics.cvssMetricV40[i].cvssData.baseSeverity;}}}if (metrics.cvssMetricV31 !== undefined) {for (let i = 0; i < metrics.cvssMetricV31.length; i += 1) {- if (metrics.cvssMetricV31[i].cvssData !== undefined &&- metrics.cvssMetricV31[i].cvssData.baseSeverity !== undefined &&- metrics.cvssMetricV31[i].cvssData.baseSeverity !== '') {+ if (metrics.cvssMetricV31[i].cvssData !== undefined+ && metrics.cvssMetricV31[i].cvssData.baseSeverity !== undefined+ && metrics.cvssMetricV31[i].cvssData.baseSeverity !== '') {return metrics.cvssMetricV31[i].cvssData.baseSeverity;}}}if (metrics.cvssMetricV30 !== undefined) {for (let i = 0; i < metrics.cvssMetricV30.length; i += 1) {- if (metrics.cvssMetricV30[i].cvssData !== undefined &&- metrics.cvssMetricV30[i].cvssData.baseSeverity !== undefined &&- metrics.cvssMetricV30[i].cvssData.baseSeverity !== '') {+ if (metrics.cvssMetricV30[i].cvssData !== undefined+ && metrics.cvssMetricV30[i].cvssData.baseSeverity !== undefined+ && metrics.cvssMetricV30[i].cvssData.baseSeverity !== '') {return metrics.cvssMetricV30[i].cvssData.baseSeverity;}}@@ -198,12 +193,6 @@ export default {&.bg-red { background: var(--danger); }&.bg-blue { background: var(--info); }&.bg-grey { background: var(--neutral); }- &.fg-green { color: var(--success); }- &.fg-yellow { color: var(--warning); }- &.fg-orange { color: var(--error); }- &.fg-red { color: var(--danger); }- &.fg-blue { color: var(--info); }- &.fg-grey { color: var(--neutral); }}a.upper {display: flex;@@ -212,9 +201,9 @@ export default {text-decoration: none;}.score {- font-size: 1.1rem;+ font-size: 1rem;font-weight: bold;- padding: 0.45rem 0.25rem 0.25rem 0.25rem;+ padding: 0.25rem 0.5rem;margin-right: 0.5rem;border-radius: 30px;font-family: var(--font-monospace);@@ -233,14 +222,6 @@ export default {opacity: var(--dimming-factor);padding-right: 0.5rem;}- .exploit-count {- display: none;- font-size: 0.8rem;- margin: 0;- padding-left: 0.5rem;- opacity: var(--dimming-factor);- border-left: 1px solid var(--widget-text-color);- }.seperator {font-size: 0.8rem;margin: 0;@@ -261,7 +242,7 @@ export default {}&:hover {.date { display: none; }- .exploit-count, .last-updated { display: inline; }+ .last-updated { display: inline; }}}}diff --git a/user-data/conf.yml b/user-data/conf.ymlindex 5f0b012a..39704d19 100644--- a/user-data/conf.yml+++ b/user-data/conf.yml@@ -44,4 +44,11 @@ sections:description: Get help with Dashy, raise a bug, or get in contacturl: https://github.com/Lissy93/dashy/blob/master/.github/SUPPORT.mdicon: far fa-hands-helping-\ No newline at end of file+ widgets:+ - type: cve-vulnerabilities+ options:+ sortBy: publish-date+ productId: 28125+ hasExploit: false+ minScore: 5+ limit: 30