Skip to content

Commit fccccd4

Browse files
committed
fix: use client 9.0.2, remove delay, etc.
1 parent 84fd21e commit fccccd4

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

core/src/main/java/org/owasp/dependencycheck/data/update/NvdApiDataSource.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,13 +315,11 @@ private boolean processApi() throws UpdateException {
315315
if (key != null) {
316316
//using a higher delay as the system may not be able to process these faster.
317317
builder.withApiKey(key)
318-
.withDelay(5000)
319318
.withrequestsPerThirtySeconds(settings.getInt(Settings.KEYS.NVD_API_REQUESTS_PER_30_SECONDS_WITH_API_KEY, 50));
320319
} else {
321320
LOGGER.warn("An NVD API Key was not provided - it is highly recommended to use "
322321
+ "an NVD API key as the update can take a VERY long time without an API Key");
323-
builder.withDelay(10000)
324-
.withrequestsPerThirtySeconds(settings.getInt(Settings.KEYS.NVD_API_REQUESTS_PER_30_SECONDS_WITHOUT_API_KEY, 5));
322+
builder.withrequestsPerThirtySeconds(settings.getInt(Settings.KEYS.NVD_API_REQUESTS_PER_30_SECONDS_WITHOUT_API_KEY, 5));
325323
}
326324

327325
final int resultsPerPage = Math.min(settings.getInt(Settings.KEYS.NVD_API_RESULTS_PER_PAGE, RESULTS_PER_PAGE), RESULTS_PER_PAGE);

core/src/main/resources/dependencycheck.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,12 @@ nvd.api.check.validforhours=4
5656
nvd.api.datafeed.validfordays=7
5757
nvd.api.max.retry.count=30
5858
nvd.api.delay=0
59+
60+
# these are the default NVD API request limits - these can be set lower,
61+
# but the client used will not let you exceed these values
5962
nvd.api.requestsperthirtysecondswithoutapikey=5
6063
nvd.api.requestsperthirtysecondswithapikey=50
64+
6165
#nvd.api.datafeed.url=https://example.com/nvd-cache/
6266
#nvd.api.datafeed.user=
6367
#nvd.api.datafeed.password=

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ Copyright (c) 2012 - Jeremy Long
924924
<dependency>
925925
<groupId>io.github.jeremylong</groupId>
926926
<artifactId>open-vulnerability-clients</artifactId>
927-
<version>9.0.1</version>
927+
<version>9.0.2</version>
928928
</dependency>
929929
<dependency>
930930
<groupId>org.anarres.jdiagnostics</groupId>

0 commit comments

Comments
 (0)