Skip to content

Commit e8740df

Browse files
committed
[build] read NVD apikey from property
Provide the apikey property on the command line in github action Run github action to check depndencies on develop-6.x.x (the base branch for this).
1 parent 40f6c7d commit e8740df

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

.github/workflows/ci-test.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
timeout-minutes: 60
2121
dependencies:
2222
name: Dependency checks
23-
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/develop' }}
23+
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/develop-6.x.x' }}
2424
runs-on: ubuntu-latest
2525
steps:
2626
- uses: actions/checkout@v4
@@ -30,9 +30,7 @@ jobs:
3030
java-version: ${{ env.DEV_JDK }}
3131
cache: 'maven'
3232
- name: OWASP dependency check
33-
env:
34-
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
35-
run: mvn -V -B dependency-check:check
33+
run: mvn -V -B dependency-check:check -DnvdApiKey=${{ secrets.NVD_API_KEY }}
3634
timeout-minutes: 60
3735
test:
3836
name: ${{ matrix.os }} Test

exist-parent/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@
573573
<artifactId>dependency-check-maven</artifactId>
574574
<version>10.0.3</version>
575575
<configuration>
576-
<nvdApiKey>cb452226-8de1-4d27-9032-7c9b8741c880</nvdApiKey>
576+
<nvdApiKey>${nvdApiKey}</nvdApiKey>
577577
<!-- The OSS Index Server (https://ossindex.sonatype.org) can sometimes be flaky -->
578578
<ossIndexWarnOnlyOnRemoteErrors>true</ossIndexWarnOnlyOnRemoteErrors>
579579

0 commit comments

Comments
 (0)