Skip to content

Commit 9289364

Browse files
Configure NVD API key for dependency check plugin (#841)
- Add nvdApiKey configuration to OWASP dependency-check-maven plugin - Configure retry settings and API delay for better performance - Update GitHub Actions workflow to pass NVD_API_KEY secret - Resolves warning about missing NVD API key and improves scan performance Without this, release shows a warning: An NVD API Key was not provided - it is highly recommended to use an NVD API key as the update can take a VERY long time without an API Key
1 parent 4d420f2 commit 9289364

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
gpg-passphrase: GPG_PASSPHRASE
3131

3232
- name: Publish to the Maven Central Repository
33-
run: mvn -Prelease --batch-mode deploy
33+
run: mvn -Prelease --batch-mode deploy -Dnvd.api.key=${{ secrets.NVD_API_KEY }}
3434
env:
3535
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
3636
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}

pom.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,9 @@
372372
This helps us identify and address significant security risks early in the development process.
373373
-->
374374
<failBuildOnCVSS>7</failBuildOnCVSS>
375+
<nvdApiKey>${nvd.api.key}</nvdApiKey>
376+
<nvdMaxRetryCount>10</nvdMaxRetryCount>
377+
<nvdApiDelay>4000</nvdApiDelay>
375378
</configuration>
376379
<executions>
377380
<execution>

0 commit comments

Comments
 (0)