Skip to content

Commit

Permalink
Bump to dependency-check 9.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Jurrie committed Dec 18, 2023
1 parent ef7fa7c commit 89b41ae
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ In order to start the Database Server simply run
docker run -p 3306:3306 stefanneuhaus/dependencycheck-central-mysql
```

#### NVD API key

To have a faster synchronization proces, you should apply for an NVD API key.
Get one [at the NVD website](https://nvd.nist.gov/developers/request-an-api-key).
If you have one, start your Docker container with `-e NVD_API_KEY=<Your API key here>`.

### Analysis clients

All kinds of analysis clients are supported: Gradle, Maven, Ant, Jenkins, CLI. Apply the following changes to your build file:
Expand All @@ -34,7 +40,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'org.owasp:dependency-check-gradle:8.0.0'
classpath 'org.owasp:dependency-check-gradle:9.0.6'
classpath 'com.mysql:mysql-connector-j:8.2.0'
}
}
Expand Down
7 changes: 5 additions & 2 deletions overlays/dependencycheck/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,24 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'org.owasp:dependency-check-gradle:8.0.0'
classpath 'org.owasp:dependency-check-gradle:9.0.6'
classpath 'com.mysql:mysql-connector-j:8.2.0'
}
}

apply plugin: 'org.owasp.dependencycheck'

dependencyCheck {
cveValidForHours = 0
data {
connectionString = "jdbc:mysql://localhost:3306/dependencycheck?useSSL=false&allowPublicKeyRetrieval=true"
driver = "com.mysql.cj.jdbc.Driver"
username = "dc-update"
password = "<DC_UPDATE_PASSWORD>"
}
nvd {
validForHours = 0
apiKey = System.getenv("NVD_API_KEY") ?: ""
}
}


Expand Down
8 changes: 8 additions & 0 deletions overlays/wrapper.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#!/bin/sh

if [ -z "${NVD_API_KEY}" ]; then
echo "--------------------------------------------------------------------------------"
echo " Detected that environment variable NVD_API_KEY was not set."
echo " Please provide an NVD API key! Updates will be very slow without it."
echo " Visit https://nvd.nist.gov/developers/request-an-api-key to get one."
echo "--------------------------------------------------------------------------------"
fi

supercronic /dependencycheck/database-update-schedule &
/usr/local/bin/docker-entrypoint.sh --user=root
2 changes: 1 addition & 1 deletion test/project_uptodate/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'org.owasp:dependency-check-gradle:8.0.0'
classpath 'org.owasp:dependency-check-gradle:9.0.6'
classpath 'com.mysql:mysql-connector-j:8.2.0'
}
}
Expand Down

0 comments on commit 89b41ae

Please sign in to comment.