Class HostedSuppressionsDataSource

java.lang.Object
org.owasp.dependencycheck.data.update.LocalDataSource
org.owasp.dependencycheck.data.update.HostedSuppressionsDataSource
All Implemented Interfaces:
CachedWebDataSource

public class HostedSuppressionsDataSource extends LocalDataSource
  • Field Details

    • DEFAULT_SUPPRESSIONS_URL

      public static final String DEFAULT_SUPPRESSIONS_URL
      The default URL to the Hosted Suppressions file.
      See Also:
  • Constructor Details

    • HostedSuppressionsDataSource

      public HostedSuppressionsDataSource()
  • Method Details

    • update

      public boolean update(Engine engine) throws UpdateException
      Downloads the current Hosted suppressions file.
      Parameters:
      engine - a reference to the ODC Engine
      Returns:
      returns false as no updates are made to the database, just web resources cached locally
      Throws:
      UpdateException - thrown if the update encountered fatal errors
    • shouldUpdate

      protected boolean shouldUpdate(File repo) throws NumberFormatException
      Determines if the we should update the Hosted Suppressions file.
      Parameters:
      repo - the Hosted Suppressions file.
      Returns:
      true if an update to the Hosted Suppressions file should be performed; otherwise false
      Throws:
      NumberFormatException - thrown if an invalid value is contained in the database properties
    • purge

      public boolean purge(Engine engine)
      Description copied from interface: CachedWebDataSource
      Deletes any locally cached data.
      Parameters:
      engine - a reference to the dependency-check engine
      Returns:
      true if the purge was successful; otherwise false