Skip to content

Commit 140b90a

Browse files
authored
fix: ensure working hostedSuppressions/RetireJS forceUpdate & correct cache validForHours checks (#8494)
Signed-off-by: Chad Wilson <29788154+chadlwilson@users.noreply.github.com>
1 parent 5b8a493 commit 140b90a

35 files changed

Lines changed: 1218 additions & 418 deletions

File tree

ant/src/main/java/org/owasp/dependencycheck/taskdefs/Update.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
import org.apache.tools.ant.BuildException;
2121
import org.apache.tools.ant.Project;
2222
import org.owasp.dependencycheck.Engine;
23+
import org.owasp.dependencycheck.ant.logging.AntTaskHolder;
2324
import org.owasp.dependencycheck.data.nvdcve.DatabaseException;
2425
import org.owasp.dependencycheck.data.update.exception.UpdateException;
2526
import org.owasp.dependencycheck.utils.Downloader;
2627
import org.owasp.dependencycheck.utils.InvalidSettingException;
2728
import org.owasp.dependencycheck.utils.Settings;
28-
import org.owasp.dependencycheck.ant.logging.AntTaskHolder;
2929

3030
/**
3131
* An Ant task definition to execute dependency-check update. This will download
@@ -203,7 +203,7 @@ public class Update extends Purge {
203203
*/
204204
private Boolean hostedSuppressionsForceUpdate;
205205
/**
206-
* Whether the hosted suppressions file will be used. Defaults to true.
206+
* Whether the hosted suppressions will be updated from the configured URL. Defaults to true.
207207
*/
208208
private Boolean hostedSuppressionsEnabled;
209209
/**

ant/src/site/markdown/config-update.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ The following properties can be configured in the plugin. However, they are less
5050
| connectionString | The connection string used to connect to the database. See using a [database server](../data/database.html). | &nbsp; |
5151
| databaseUser | The username used when connecting to the database. | &nbsp; |
5252
| databasePassword | The password used when connecting to the database. | &nbsp; |
53-
| hostedSuppressionsEnabled | Whether the hosted suppression file will be used. | true |
53+
| hostedSuppressionsEnabled | Whether the hosted suppressions will be updated from the configured URL. | true |
5454
| hostedSuppressionsUrl | The URL to a mirrored copy of the hosted suppressions file for internet-constrained environments | https://dependency-check.github.io/DependencyCheck/suppressions/publishedSuppressions.xml |
5555
| hostedSuppressionsUser | The user for a Basic-auth-protected mirrored copy of the hosted suppressions file for internet-constrained environments | &nbsp; |
5656
| hostedSuppressionsPassword | The password/token for a Basic-auth-protected mirrored copy of the hosted suppressions file for internet-constrained environments | &nbsp; |

ant/src/site/markdown/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ The following properties can be configured in the plugin. However, they are less
166166
| connectionString | The connection string used to connect to the database. See using a [database server](../data/database.html). | &nbsp; |
167167
| databaseUser | The username used when connecting to the database. | &nbsp; |
168168
| databasePassword | The password used when connecting to the database. | &nbsp; |
169-
| hostedSuppressionsEnabled | Whether the hosted suppression file will be used. | true |
169+
| hostedSuppressionsEnabled | Whether the hosted suppressions will be updated from the configured URL. | true |
170170
| hostedSuppressionsUrl | The URL to a mirrored copy of the hosted suppressions file for internet-constrained environments | https://dependency-check.github.io/DependencyCheck/suppressions/publishedSuppressions.xml |
171171
| hostedSuppressionsUser | The user for a Basic-auth-protected mirrored copy of the hosted suppressions file for internet-constrained environments | &nbsp; |
172172
| hostedSuppressionsPassword | The password/token for a Basic-auth-protected mirrored copy of the hosted suppressions file for internet-constrained environments | &nbsp; |

cli/src/main/java/org/owasp/dependencycheck/CliParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ private void addAdvancedOptions(final Options options) {
547547
.addOption(newOption(ARGUMENT.ENABLE_NEXUS, "Enable the Nexus Analyzer."))
548548
.addOption(newOption(ARGUMENT.ARTIFACTORY_ENABLED, "Whether the Artifactory Analyzer should be enabled."))
549549
.addOption(newOption(ARGUMENT.PURGE_NVD, "Purges the local NVD data cache"))
550-
.addOption(newOption(ARGUMENT.DISABLE_HOSTED_SUPPRESSIONS, "Disable the usage of the hosted suppressions file"))
550+
.addOption(newOption(ARGUMENT.DISABLE_HOSTED_SUPPRESSIONS, "Disable retrieval of the hosted suppressions from the configured URL."))
551551
.addOption(newOption(ARGUMENT.HOSTED_SUPPRESSIONS_FORCEUPDATE, "Force the hosted suppressions file to update even"
552552
+ " if autoupdate is disabled"))
553553
.addOption(newOptionWithArg(ARGUMENT.HOSTED_SUPPRESSIONS_VALID_FOR_HOURS, "hours",

cli/src/site/markdown/arguments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Advanced Options
134134
| | \-\-dbUser | \<user\> | The username used to connect to the database. | &nbsp; |
135135
| \-d | \-\-data | \<path\> | The location of the data directory used to store persistent data. | /usr/local/var/dependencycheck if installed through brew (→ [formula](https://github.com/Homebrew/homebrew-core/blob/master/Formula/d/dependency-check.rb#L29)). Otherwise, the data directory is created inside the install directory i.e. as a sibling to the `<install-dir>/bin`, `<install-dir>/lib` directories. |
136136
| | \-\-purge | | Delete the local copy of the NVD. This is used to force a refresh of the data. | &nbsp; |
137-
| | \-\-disableHostedSuppressions | | Whether the usage of the hosted suppressions file will be disabled. | false |
137+
| | \-\-disableHostedSuppressions | | Disable retrieval of the hosted suppressions from the configured URL. | false |
138138
| | \-\-hostedSuppressionsForceUpdate | | Whether the hosted suppressions file will update regardless of the `noupdate` argument. | false |
139139
| | \-\-hostedSuppressionsValidForHours | \<hours\> | The number of hours to wait before checking for new updates of the hosted suppressions file | 2 |
140140
| | \-\-hostedSuppressionsUrl | \<url\> | The URL to a mirrored copy of the hosted suppressions file for internet-constrained environments | https://dependency-check.github.io/DependencyCheck/suppressions/publishedSuppressions.xml |

0 commit comments

Comments
 (0)