Class AbstractSuppressionAnalyzer
- java.lang.Object
- 
- org.owasp.dependencycheck.analyzer.AbstractAnalyzer
- 
- org.owasp.dependencycheck.analyzer.AbstractSuppressionAnalyzer
 
 
- 
- All Implemented Interfaces:
- Analyzer
 - Direct Known Subclasses:
- CpeSuppressionAnalyzer,- VulnerabilitySuppressionAnalyzer
 
 @ThreadSafe public abstract class AbstractSuppressionAnalyzer extends AbstractAnalyzer Abstract base suppression analyzer that contains methods for parsing the suppression XML file.- Author:
- Jeremy Long
 
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringSUPPRESSION_OBJECT_KEYThe key used to store and retrieve the suppression files.
 - 
Constructor SummaryConstructors Constructor Description AbstractSuppressionAnalyzer()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidanalyzeDependency(Dependency dependency, Engine engine)Analyzes a given dependency.static intgetRuleCount(Engine engine)Returns the number of suppression rules currently loaded in the engine.java.util.Set<java.lang.String>getSupportedExtensions()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 org.owasp.dependencycheck.analyzer.AbstractAnalyzeranalyze, close, closeAnalyzer, getAnalyzerEnabledSettingKey, getSettings, initialize, isEnabled, prepare, setEnabled, supportsParallelProcessing
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.owasp.dependencycheck.analyzer.AnalyzergetAnalysisPhase, getName
 
- 
 
- 
- 
- 
Field Detail- 
SUPPRESSION_OBJECT_KEYpublic static final java.lang.String SUPPRESSION_OBJECT_KEY The key used to store and retrieve the suppression files.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getSupportedExtensionspublic java.util.Set<java.lang.String> getSupportedExtensions() Returns a list of file EXTENSIONS supported by this analyzer.- Returns:
- a list of file EXTENSIONS supported by this analyzer.
 
 - 
prepareAnalyzerpublic void prepareAnalyzer(Engine engine) throws InitializationException The prepare method loads the suppression XML file.- Overrides:
- prepareAnalyzerin class- AbstractAnalyzer
- Parameters:
- engine- a reference the dependency-check engine
- Throws:
- InitializationException- thrown if there is an exception
 
 - 
analyzeDependencyprotected void analyzeDependency(Dependency dependency, Engine engine) throws AnalysisException 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 class- AbstractAnalyzer
- Parameters:
- dependency- the dependency to analyze
- engine- the engine scanning
- Throws:
- AnalysisException- thrown if there is an analysis exception
 
 - 
getRuleCountpublic static int getRuleCount(Engine engine) 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
 
 
- 
 
-