@ThreadSafe public class NvdCveUpdater extends Object implements CachedWebDataSource
| Constructor and Description |
|---|
NvdCveUpdater() |
| Modifier and Type | Method and Description |
|---|---|
protected MetaProperties |
getMetaFile(String url)
Downloads the NVD CVE Meta file properties.
|
protected List<NvdCveInfo> |
getUpdatesNeeded()
Determines if the index needs to be updated.
|
protected void |
initializeExecutorServices()
Initialize the executor services for download and processing of the NVD
CVE XML data.
|
boolean |
purge(Engine engine)
Deletes any locally cached data.
|
protected void |
setSettings(Settings settings)
Sets the settings object; this is used during testing.
|
boolean |
update(Engine engine)
Downloads the latest NVD CVE XML file from the web and imports it into
the current CVE Database.
|
public boolean update(Engine engine) throws UpdateException
update in interface CachedWebDataSourceengine - a reference to the dependency-check engineUpdateException - is thrown if there is an error updating the
databaseprotected void initializeExecutorServices()
protected final MetaProperties getMetaFile(String url) throws UpdateException
url - the URL to the NVD CVE JSON fileUpdateException - thrown if the meta file could not be downloadedprotected final List<NvdCveInfo> getUpdatesNeeded() throws UpdateException
UpdateException - Is thrown if there is an issue with the last
updated properties fileprotected void setSettings(Settings settings)
settings - the configured settingspublic boolean purge(Engine engine)
CachedWebDataSourcepurge in interface CachedWebDataSourceengine - a reference to the dependency-check enginetrue if the purge was successful; otherwise
falseCopyright © 2012–2020 OWASP. All rights reserved.