@ThreadSafe public class NodePackageAnalyzer extends AbstractNpmAnalyzer
| Modifier and Type | Field and Description |
|---|---|
static String |
DEPENDENCY_ECOSYSTEM
A descriptor for the type of dependencies processed or added by this
analyzer.
|
static String |
PACKAGE_JSON
The file name to scan.
|
static String |
PACKAGE_LOCK_JSON
The file name to scan.
|
static String |
SHRINKWRAP_JSON
The file name to scan.
|
NPM_DEPENDENCY_ECOSYSTEM| Constructor and Description |
|---|
NodePackageAnalyzer() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
analyzeDependency(Dependency dependency,
Engine engine)
Analyzes a given dependency.
|
AnalysisPhase |
getAnalysisPhase()
Returns the phase that the analyzer is intended to run in.
|
protected String |
getAnalyzerEnabledSettingKey()
Returns the key used in the properties file to reference the enabled
property for the analyzer.
|
protected FileFilter |
getFileFilter()
Returns the FileFilter
|
String |
getName()
Returns the name of the analyzer.
|
protected void |
prepareFileTypeAnalyzer(Engine engine)
Performs validation on the configuration to ensure that the correct
analyzers are in place.
|
accept, createDependency, findDependency, gatherEvidence, processPackage, processPackage, shouldProcessgetFilesMatched, newHashSet, prepareAnalyzer, setFilesMatchedanalyze, close, closeAnalyzer, getSettings, initialize, isEnabled, prepare, setEnabled, supportsParallelProcessingclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitanalyze, close, initialize, isEnabled, prepare, supportsParallelProcessingpublic static final String DEPENDENCY_ECOSYSTEM
public static final String PACKAGE_JSON
public static final String PACKAGE_LOCK_JSON
public static final String SHRINKWRAP_JSON
protected FileFilter getFileFilter()
getFileFilter in class AbstractFileTypeAnalyzerprotected void prepareFileTypeAnalyzer(Engine engine) throws InitializationException
prepareFileTypeAnalyzer in class AbstractFileTypeAnalyzerengine - the dependency-check engineInitializationException - thrown if there is a configuration errorpublic String getName()
public AnalysisPhase getAnalysisPhase()
protected String getAnalyzerEnabledSettingKey()
getAnalyzerEnabledSettingKey in class AbstractAnalyzerprotected void analyzeDependency(Dependency dependency, Engine engine) throws AnalysisException
AbstractAnalyzeranalyzeDependency in class AbstractAnalyzerdependency - the dependency to analyzeengine - the engine scanningAnalysisException - thrown if there is an analysis exceptionCopyright © 2012–2020 OWASP. All rights reserved.