Fix CVE doc URL.

This commit is contained in:
Nicolo Maio 2023-10-17 11:03:40 +02:00
parent 41b138f5f7
commit bb6bdf2f7b
6 changed files with 34 additions and 6 deletions

View file

@ -109,4 +109,18 @@ function cve_utils.getCVEscore(cve_id)
end
end
-- **********************************************************
-- Function to retrieve url for CVE doc.
function cve_utils.getDocURL(cve_id, scan_type)
-- IMPORTANT: The retrieved value must match the value in
-- http_src/services/context/ntopng_global_services.js for the 'get_cve_details_url' function.
if (scan_type == 'cve') then
return(string.format("https://nvd.nist.gov/vuln/detail/%s",cve_id))
elseif (scan_type =='openvas') then
return(string.format("https://vulners.com/openvas/OPENVAS:%s",cve_id))
end
end
return cve_utils