@ThreadSafe public class AssemblyAnalyzer extends AbstractFileTypeAnalyzer
| Modifier and Type | Field and Description |
|---|---|
static String |
DEPENDENCY_ECOSYSTEM
A descriptor for the type of dependencies processed or added by this
analyzer.
|
| Constructor and Description |
|---|
AssemblyAnalyzer() |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
addMatchingValues(List<String> packages,
String value,
Dependency dep,
EvidenceType type)
Cycles through the collection of class name information to see if parts
of the package names are contained in the provided value.
|
void |
analyzeDependency(Dependency dependency,
Engine engine)
Performs the analysis on a single Dependency.
|
protected List<String> |
buildArgumentList()
Builds the beginnings of a List for ProcessBuilder
|
void |
closeAnalyzer()
Removes resources used from the local file system.
|
AnalysisPhase |
getAnalysisPhase()
Returns the phase this analyzer runs under.
|
protected String |
getAnalyzerEnabledSettingKey()
Returns the key used in the properties file to reference the analyzer's
enabled property.
|
protected FileFilter |
getFileFilter()
Returns the
FileFilter used to determine which files are
to be analyzed. |
String |
getName()
Gets this analyzer's name.
|
void |
prepareFileTypeAnalyzer(Engine engine)
Initialize the analyzer.
|
accept, getFilesMatched, newHashSet, prepareAnalyzer, setFilesMatchedanalyze, close, 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
protected List<String> buildArgumentList()
public void analyzeDependency(Dependency dependency, Engine engine) throws AnalysisException
analyzeDependency in class AbstractAnalyzerdependency - the dependency to analyzeengine - the engine to perform the analysis underAnalysisException - if anything goes sidewayspublic void prepareFileTypeAnalyzer(Engine engine) throws InitializationException
prepareFileTypeAnalyzer in class AbstractFileTypeAnalyzerengine - a reference to the dependency-check engineInitializationException - thrown if anything goes wrongpublic void closeAnalyzer()
throws Exception
closeAnalyzer in class AbstractAnalyzerException - thrown if there is a problem closing the analyzerprotected FileFilter getFileFilter()
AbstractFileTypeAnalyzer
Returns the FileFilter used to determine which files are
to be analyzed. An example would be an analyzer that inspected Java jar
files. Implementors may use
FileFilterBuilder.
If the analyzer returns null it will not cause additional files to be analyzed, but will be executed against every file loaded.
getFileFilter in class AbstractFileTypeAnalyzerpublic String getName()
public AnalysisPhase getAnalysisPhase()
protected String getAnalyzerEnabledSettingKey()
getAnalyzerEnabledSettingKey in class AbstractAnalyzerprotected static void addMatchingValues(List<String> packages, String value, Dependency dep, EvidenceType type)
packages - a collection of class name informationvalue - the value to check to see if it contains a package namedep - the dependency to add new entries tootype - the type of evidence (vendor, product, or version)Copyright © 2012–2020 OWASP. All rights reserved.