Class AbstractSuppressionAnalyzer
java.lang.Object
org.owasp.dependencycheck.analyzer.AbstractAnalyzer
org.owasp.dependencycheck.analyzer.AbstractSuppressionAnalyzer
- All Implemented Interfaces:
Analyzer
- Direct Known Subclasses:
CpeSuppressionAnalyzer, VulnerabilitySuppressionAnalyzer
Abstract base suppression analyzer that contains methods for parsing the
suppression XML file.
- Author:
- Jeremy Long
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe key used to store and retrieve the suppression files. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidanalyzeDependency(Dependency dependency, Engine engine) Analyzes a given dependency.static intgetRuleCount(Engine engine) Returns the number of suppression rules currently loaded in the engine.Returns a list of file EXTENSIONS supported by this analyzer.voidprepareAnalyzer(Engine engine) The prepare method loads the suppression XML file.Methods inherited from class AbstractAnalyzer
analyze, close, closeAnalyzer, getAnalyzerEnabledSettingKey, 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
getAnalysisPhase, getName
-
Field Details
-
SUPPRESSION_OBJECT_KEY
The key used to store and retrieve the suppression files.- See Also:
-
-
Constructor Details
-
AbstractSuppressionAnalyzer
public AbstractSuppressionAnalyzer()
-
-
Method Details
-
getSupportedExtensions
-
prepareAnalyzer
The prepare method loads the suppression XML file.- Overrides:
prepareAnalyzerin classAbstractAnalyzer- Parameters:
engine- a reference the dependency-check engine- Throws:
InitializationException- thrown if there is an exception
-
analyzeDependency
Description copied from class:AbstractAnalyzerAnalyzes a given dependency. If the dependency is an archive, such as a WAR or EAR, the contents are extracted, scanned, and added to the list of dependencies within the engine.- Specified by:
analyzeDependencyin classAbstractAnalyzer- Parameters:
dependency- the dependency to analyzeengine- the engine scanning- Throws:
AnalysisException- thrown if there is an analysis exception
-
getRuleCount
Returns the number of suppression rules currently loaded in the engine.- Parameters:
engine- a reference to the ODC engine- Returns:
- the count of rules loaded
-