Class HostedSuppressionsDataSource
java.lang.Object
org.owasp.dependencycheck.data.update.LocalDataSource
org.owasp.dependencycheck.data.update.HostedSuppressionsDataSource
- All Implemented Interfaces:
CachedWebDataSource
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe default URL to the Hosted Suppressions file. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull StringfalsePositivesDueTo(String reason) booleanDeletes any locally cached data.booleanMakes a best effort to download the current Hosted suppressions file if configured to do so.voidupdateUnhandled(Engine engine) Updates the current Hosted Suppressions file if configured to do so; failing if it cannot be done@NonNull FileMethods inherited from class LocalDataSource
getLastUpdated, isStale, saveLastUpdated
-
Field Details
-
DEFAULT_SUPPRESSIONS_URL
The default URL to the Hosted Suppressions file.- See Also:
-
-
Constructor Details
-
HostedSuppressionsDataSource
public HostedSuppressionsDataSource()
-
-
Method Details
-
update
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
-
updateUnhandled
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 suppressionsUpdateException- if the remote update failed for any reason
-
validatedRepoFile
- Throws:
IOException
-
purge
Description copied from interface:CachedWebDataSourceDeletes any locally cached data.- Parameters:
engine- a reference to the dependency-check engine- Returns:
trueif the purge was successful; otherwisefalse
-