diff --git a/docs/index.html b/docs/index.html index fd9d3e2592..e8ba354253 100644 --- a/docs/index.html +++ b/docs/index.html @@ -3,25 +3,25 @@ - CVE Intelligence + CVE PoC Hub
-

Top KEV by EPSS percentile

+

KEV with high EPSS

-

High EPSS not in KEV

+

EPSS standouts (outside KEV)

diff --git a/docs/logic.js b/docs/logic.js index 05d63b88c6..62b5c2241d 100644 --- a/docs/logic.js +++ b/docs/logic.js @@ -132,7 +132,7 @@ document.addEventListener('DOMContentLoaded', () => { if (val !== '') { controls.displayResults(); - currentSet = window.controls.doSearch(val, window.dataset); + currentSet = window.controls.doSearch(val, window.dataset || []); if (currentSet.length < totalLimit) { window.controls.setColor(colorUpdate, currentSet.length === 0 ? 'no-results' : 'results-found'); @@ -150,13 +150,24 @@ document.addEventListener('DOMContentLoaded', () => { } } - fetch('../CVE_list.json') - .then(res => res.json()) + fetch('/CVE_list.json') + .then(res => { + if (!res.ok) { + throw new Error(`Failed to load CVE list (${res.status})`); + } + return res.json(); + }) .then(data => { - window.dataset = data; + window.dataset = Array.isArray(data) ? data : []; currentSet = window.dataset; window.controls.updateResults(resultsTable, window.dataset); doSearch({ type: 'none' }); + }) + .catch(err => { + console.error(err); + window.dataset = []; + noResults.textContent = 'Unable to load CVE list'; + noResults.style.display = ''; }); form.addEventListener('submit', doSearch); diff --git a/docs/search/index.html b/docs/search/index.html index 2391f76376..30749eaed5 100644 --- a/docs/search/index.html +++ b/docs/search/index.html @@ -10,9 +10,9 @@