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
      Makes a best effort to download the current Hosted suppressions file if configured to do so.
      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 only if the update encountered fatal configuration errors
    • falsePositivesDueTo

      public static @NonNull String falsePositivesDueTo(String reason)
    • updateUnhandled

      public void updateUnhandled(Engine engine) throws IOException, UpdateException
      Updates the current Hosted Suppressions file if configured to do so; failing if it cannot be done
      Parameters:
      engine - a reference to the ODC Engine
      Throws:
      IOException - if there is an error determining the local location to cache hosted suppressions
      UpdateException - if the remote update failed for any reason
    • validatedRepoFile

      public @NonNull File validatedRepoFile() throws IOException
      Throws:
      IOException
    • 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