summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/meta/cve-update-db-native.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/meta/cve-update-db-native.bb')
-rw-r--r--meta/recipes-core/meta/cve-update-db-native.bb4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/recipes-core/meta/cve-update-db-native.bb b/meta/recipes-core/meta/cve-update-db-native.bb
index 59e7d7dc2c..355ee2a2a3 100644
--- a/meta/recipes-core/meta/cve-update-db-native.bb
+++ b/meta/recipes-core/meta/cve-update-db-native.bb
@@ -19,6 +19,7 @@ CVE_DB_UPDATE_INTERVAL ?= "86400"
19 19
20# Timeout for blocking socket operations, such as the connection attempt. 20# Timeout for blocking socket operations, such as the connection attempt.
21CVE_SOCKET_TIMEOUT ?= "60" 21CVE_SOCKET_TIMEOUT ?= "60"
22NVDCVE_URL ?= "https://nvd.nist.gov/feeds/json/cve/1.1/nvdcve-1.1-"
22 23
23python () { 24python () {
24 if not bb.data.inherits_class("cve-check", d): 25 if not bb.data.inherits_class("cve-check", d):
@@ -36,7 +37,6 @@ python do_fetch() {
36 37
37 bb.utils.export_proxies(d) 38 bb.utils.export_proxies(d)
38 39
39 BASE_URL = "https://nvd.nist.gov/feeds/json/cve/1.1/nvdcve-1.1-"
40 YEAR_START = 2002 40 YEAR_START = 2002
41 41
42 db_file = d.getVar("CVE_CHECK_DB_FILE") 42 db_file = d.getVar("CVE_CHECK_DB_FILE")
@@ -76,7 +76,7 @@ python do_fetch() {
76 total_years = date.today().year + 1 - YEAR_START 76 total_years = date.today().year + 1 - YEAR_START
77 for i, year in enumerate(range(YEAR_START, date.today().year + 1)): 77 for i, year in enumerate(range(YEAR_START, date.today().year + 1)):
78 ph.update((float(i + 1) / total_years) * 100) 78 ph.update((float(i + 1) / total_years) * 100)
79 year_url = BASE_URL + str(year) 79 year_url = (d.getVar('NVDCVE_URL')) + str(year)
80 meta_url = year_url + ".meta" 80 meta_url = year_url + ".meta"
81 json_url = year_url + ".json.gz" 81 json_url = year_url + ".json.gz"
82 82