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 Details

    • SUPPRESSION_OBJECT_KEY

      public static final String SUPPRESSION_OBJECT_KEY
      The key used to store and retrieve the suppression files.
      See Also:
  • Constructor Details

    • AbstractSuppressionAnalyzer

      public AbstractSuppressionAnalyzer()
  • Method Details

    • getSupportedExtensions

      public Set<String> getSupportedExtensions()
      Returns a list of file EXTENSIONS supported by this analyzer.
      Returns:
      a list of file EXTENSIONS supported by this analyzer.
    • prepareAnalyzer

      public void prepareAnalyzer(Engine engine) throws InitializationException
      The prepare method loads the suppression XML file.
      Overrides:
      prepareAnalyzer in class AbstractAnalyzer
      Parameters:
      engine - a reference the dependency-check engine
      Throws:
      InitializationException - thrown if there is an exception
    • analyzeDependency

      protected void analyzeDependency(Dependency dependency, Engine engine) throws AnalysisException
      Description copied from class: AbstractAnalyzer
      Analyzes 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:
      analyzeDependency in class AbstractAnalyzer
      Parameters:
      dependency - the dependency to analyze
      engine - the engine scanning
      Throws:
      AnalysisException - thrown if there is an analysis exception
    • getRuleCount

      public 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