@ThreadSafe public class NpmCPEAnalyzer extends CPEAnalyzer
NVD_SEARCH_BROAD_URL, NVD_SEARCH_URL
Constructor and Description |
---|
NpmCPEAnalyzer() |
Modifier and Type | Method and Description |
---|---|
protected void |
analyzeDependency(Dependency dependency,
Engine engine)
Analyzes a dependency and attempts to determine if there are any CPE
identifiers for this dependency.
|
AnalysisPhase |
getAnalysisPhase()
Returns the analysis phase that this analyzer should run in.
|
protected java.lang.String |
getAnalyzerEnabledSettingKey()
Returns the setting key to determine if the analyzer is enabled.
|
java.lang.String |
getName()
Returns the name of this analyzer.
|
void |
open(CveDB cve)
Opens the data source.
|
buildSearch, closeAnalyzer, collectTerms, determineCPE, determineIdentifiers, getCveDB, getMemoryIndex, main, prepareAnalyzer, searchCPE, setCpeSuppressionAnalyzer, setCveDB, setMemoryIndex
analyze, close, getSettings, initialize, isEnabled, prepare, setEnabled, supportsParallelProcessing
public AnalysisPhase getAnalysisPhase()
getAnalysisPhase
in interface Analyzer
getAnalysisPhase
in class CPEAnalyzer
public java.lang.String getName()
getName
in interface Analyzer
getName
in class CPEAnalyzer
protected java.lang.String getAnalyzerEnabledSettingKey()
Returns the setting key to determine if the analyzer is enabled.
getAnalyzerEnabledSettingKey
in class CPEAnalyzer
public void open(CveDB cve) throws java.io.IOException, DatabaseException
open
in class CPEAnalyzer
cve
- a reference to the NVD CVE databasejava.io.IOException
- when the Lucene directory to be queried does not
exist or is corrupt.DatabaseException
- when the database throws an exception. This
usually occurs when the database is in use by another process.protected void analyzeDependency(Dependency dependency, Engine engine) throws AnalysisException
analyzeDependency
in class CPEAnalyzer
dependency
- The Dependency to analyze.engine
- The analysis engineAnalysisException
- is thrown if there is an issue analyzing the
dependency.Copyright© 2012-21 Jeremy Long. All Rights Reserved.