Class ComposerLockAnalyzer
java.lang.Object
org.owasp.dependencycheck.analyzer.AbstractAnalyzer
org.owasp.dependencycheck.analyzer.AbstractFileTypeAnalyzer
org.owasp.dependencycheck.analyzer.ComposerLockAnalyzer
- All Implemented Interfaces:
FileFilter, Analyzer, FileTypeAnalyzer
Used to analyze a composer.lock file for a composer PHP app.
- Author:
- colezlaw
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringA descriptor for the type of dependencies processed or added by this analyzer. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidanalyzeDependency(Dependency dependency, Engine engine) Entry point for the analyzer.Returns the phase this analyzer should run under.protected StringGets the key to determine whether the analyzer is enabled.protected FileFilterReturns the FileFilter.getName()Returns the analyzer's name.protected voidprepareFileTypeAnalyzer(Engine engine) Initializes the analyzer.Methods inherited from class AbstractFileTypeAnalyzer
accept, getFilesMatched, newHashSet, prepareAnalyzer, setFilesMatchedMethods inherited from class AbstractAnalyzer
analyze, close, closeAnalyzer, getSettings, initialize, isEnabled, prepare, setEnabled, supportsParallelProcessingMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Analyzer
analyze, close, initialize, isEnabled, prepare, supportsParallelProcessing
-
Field Details
-
DEPENDENCY_ECOSYSTEM
A descriptor for the type of dependencies processed or added by this analyzer.- See Also:
-
-
Constructor Details
-
ComposerLockAnalyzer
public ComposerLockAnalyzer()
-
-
Method Details
-
getFileFilter
Returns the FileFilter.- Specified by:
getFileFilterin classAbstractFileTypeAnalyzer- Returns:
- the FileFilter
-
prepareFileTypeAnalyzer
Initializes the analyzer.- Specified by:
prepareFileTypeAnalyzerin classAbstractFileTypeAnalyzer- Parameters:
engine- a reference to the dependency-check engine- Throws:
InitializationException- thrown if an exception occurs getting an instance of SHA1
-
analyzeDependency
Entry point for the analyzer.- Specified by:
analyzeDependencyin classAbstractAnalyzer- Parameters:
dependency- the dependency to analyzeengine- the engine scanning- Throws:
AnalysisException- if there's a failure during analysis
-
getAnalyzerEnabledSettingKey
Gets the key to determine whether the analyzer is enabled.- Specified by:
getAnalyzerEnabledSettingKeyin classAbstractAnalyzer- Returns:
- the key specifying whether the analyzer is enabled
-
getName
-
getAnalysisPhase
Returns the phase this analyzer should run under.- Returns:
- the analysis phase
-