Skip to content

Commit 857ed21

Browse files
authored
Update dependency-check to 9.0.10 (#691)
Leverage NVD Api Key from GH organization secrets
1 parent 039f56a commit 857ed21

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/maven.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on: [push, pull_request]
44

55
jobs:
66
build:
7+
name: ${{ matrix.isMainBuildEnv && 'Primary Build' || 'Secondary Build' }}
78
strategy:
89
matrix:
910
os: [ubuntu-latest, windows-latest, macOS-latest]
@@ -38,19 +39,23 @@ jobs:
3839
- name: Build and Analyse with Maven
3940
if: github.ref != 'refs/heads/develop' && matrix.isMainBuildEnv
4041
env:
42+
# NVD API key used by dependency-check
43+
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
4144
# SonarCloud access token should be generated from https://sonarcloud.io/account/security/
4245
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
4346
# Needed to get some information about the pull request, if any
4447
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45-
run: mvn -e -B -V -Pintegration-tests clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=Netcentric_accesscontroltool -Dsonar.organization=netcentric -Dsonar.host.url=https://sonarcloud.io -Pdependency-check,coverage-report
48+
run: mvn -e -B -V clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=Netcentric_accesscontroltool -Dsonar.organization=netcentric -Dsonar.host.url=https://sonarcloud.io -DnvdApiKeyEnvironmentVariable=NVD_API_KEY -Pdependency-check,coverage-report,integration-tests
4649

4750
- name: Build, Analyse and Deploy with Maven
4851
if: github.ref == 'refs/heads/develop' && matrix.isMainBuildEnv
4952
env:
53+
# NVD API key used by dependency-check
54+
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
5055
MAVEN_USERNAME: ${{ secrets.OSSRH_TOKEN_USER }}
5156
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN_PASSWORD }}
5257
# SonarCloud access token should be generated from https://sonarcloud.io/account/security/
5358
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
5459
# Needed to get some information about the pull request, if any
5560
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56-
run: mvn -e -B -V -Pintegration-tests clean deploy org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=Netcentric_accesscontroltool -Dsonar.organization=netcentric -Dsonar.host.url=https://sonarcloud.io -Pdependency-check,coverage-report
61+
run: mvn -e -B -V clean deploy org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=Netcentric_accesscontroltool -Dsonar.organization=netcentric -Dsonar.host.url=https://sonarcloud.io -DnvdApiKeyEnvironmentVariable=NVD_API_KEY -Pdependency-check,coverage-report,integration-tests

pom.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,9 +420,8 @@
420420
<plugin>
421421
<groupId>org.owasp</groupId>
422422
<artifactId>dependency-check-maven</artifactId>
423-
<version>8.1.0</version>
423+
<version>9.0.10</version>
424424
<configuration>
425-
<cveValidForHours>24</cveValidForHours>
426425
<failBuildOnCVSS>11</failBuildOnCVSS>
427426
<skipProvidedScope>true</skipProvidedScope>
428427
<skipSystemScope>true</skipSystemScope>

0 commit comments

Comments
 (0)