Describe the bug
In case the hosted suppression file is missing on your local machine (for example in the very first run and/or when starting with an empty m2 repo) the hosted suppression file gets never downloaded when you have configured
I think it is intended to download the hosted suppression file even in this case.
There is even a warning message logged
Hosted Suppressions file is empty or missing - attempting to force the update
But the file gets never downloaded.
Version of dependency-check used
I am using the maven plugin in version 8.2.1 but i think the bug is in core (see attached patch).
Log file
INFO] Finished Hint Analyzer (0 seconds)
[DEBUG] Initializing CPE Analyzer
[INFO] Created CPE Index (1 seconds)
[DEBUG] Skipping CPE Analysis for npm
[DEBUG] Settings.getDataFile() - file: '[JAR]/../../dependency-check-data/7.0'
[DEBUG] Settings.getDataFile() - transforming filename
[DEBUG] Settings.getDataFile() - jar file: '/home/jwiesner/.m2/repository/org/owasp/dependency-check-utils/8.2.1'
[DEBUG] Settings.getDataFile() - returning: '/home/jwiesner/.m2/repository/org/owasp/dependency-check-utils/8.2.1/../../dependency-check-data/7.0'
[WARNING] Hosted Suppressions file is empty or missing - attempting to force the update
[DEBUG] Setting: hosted.suppressions.forceupdate='true'
[WARNING] Empty Hosted Suppression file after update, results may contain false positives already resolved by the DependencyCheck project due to failed download of the hosted suppression file
To Reproduce
Steps to reproduce the behavior:
Delete an already downloaded suppression file or start with an empty m2 repo
Configure the maven plugin to use autoUpdate=false and hostedSuppressionsForceUpdate=false
mvn org.owasp:dependency-check-maven:aggregate
Expected behavior
I would expect that the hosted suppression file gets downloaded, stored in the local maven repo and is used for the dependency check.
Additional context
Workaround: setting hostedSuppressionsForceUpdate=true works (with the side effect that hosted suppression file gets loaded for every check).
See attached patch
patch_5662.patch
Describe the bug In case the hosted suppression file is missing on your local machine (for example in the very first run and/or when starting with an empty m2 repo) the hosted suppression file gets never downloaded when you have configured
autoUpdate=false
hostedSuppressionsForceUpdate=false
I think it is intended to download the hosted suppression file even in this case. There is even a warning message logged
But the file gets never downloaded.
Version of dependency-check used I am using the maven plugin in version 8.2.1 but i think the bug is in core (see attached patch).
Log file
To Reproduce Steps to reproduce the behavior:
Expected behavior I would expect that the hosted suppression file gets downloaded, stored in the local maven repo and is used for the dependency check.
Additional context Workaround: setting hostedSuppressionsForceUpdate=true works (with the side effect that hosted suppression file gets loaded for every check). See attached patch patch_5662.patch