Skip to content

Commit a33f938

Browse files
committed
feat: include again the report plugin updated and with doc
1 parent 7a3d1c7 commit a33f938

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,26 @@ kube-linter --config api/kubernetes/.kube-linter.yaml lint api/kubernetes/helm-c
359359
kube-linter --config api/kubernetes/.kube-linter.yaml lint api/kubernetes/csm-argo
360360
```
361361

362+
#### Vulnerability report
363+
364+
To generate a report of publicly disclosed vulnerabilities in the dependencies
365+
add your API key for the National Vulnerability Database (https://nvd.nist.gov/)
366+
as a property available to gradle. If you don't have a key get one from
367+
here: https://nvd.nist.gov/developers/request-an-api-key. Add your key in your
368+
`~/.gradle/gradle.properties` file (create the file if it does not exist)
369+
370+
```properties
371+
NVD_API_key=[key]
372+
```
373+
374+
Then run the dependency check task which can take about 10 minutes:
375+
376+
```shell
377+
./gradlew dependencyCheckAggregate
378+
```
379+
380+
an html report will be generated under `/build/reports`
381+
362382
## License
363383

364384
Copyright 2021 Cosmo Tech

build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ plugins {
3030
id("com.diffplug.spotless") version "6.25.0"
3131
id("org.springframework.boot") version "3.4.1" apply false
3232
id("project-report")
33+
id("org.owasp.dependencycheck") version "12.0.0"
3334
id("com.github.jk1.dependency-license-report") version "2.9"
3435
id("org.jetbrains.kotlinx.kover") version "0.7.4"
3536
id("io.gitlab.arturbosch.detekt") version "1.23.7"
@@ -81,6 +82,12 @@ mkdir(configBuildDir)
8182

8283
val hardCodedLicensesReportPath = "project-licenses-for-check-license-task.json"
8384

85+
dependencyCheck{
86+
nvd{
87+
apiKey = System.getenv("NVD_API_key")
88+
}
89+
}
90+
8491
licenseReport {
8592
outputDir = licenseReportDir
8693
allowedLicensesFile =
@@ -102,6 +109,7 @@ allprojects {
102109
apply(plugin = "org.jetbrains.kotlin.jvm")
103110
apply(plugin = "io.gitlab.arturbosch.detekt")
104111
apply(plugin = "project-report")
112+
apply(plugin = "org.owasp.dependencycheck")
105113

106114
java {
107115
targetCompatibility = JavaVersion.VERSION_21

0 commit comments

Comments
 (0)