Skip to content

Commit 42de896

Browse files
trasklaurit
andauthored
Add NVD api key to speed up owasp dependency check (#10003)
Co-authored-by: Lauri Tulmin <[email protected]>
1 parent f67f1c3 commit 42de896

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

.github/repository-settings.md

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ for [`dependabot/**/**`](https://github.com/open-telemetry/community/blob/main/d
6969
see [docs](https://docs.gradle.com/enterprise/gradle-plugin/#via_environment_variable)
7070
- `GRADLE_PUBLISH_KEY`
7171
- `GRADLE_PUBLISH_SECRET`
72+
- `NVD_API_KEY` - stored in OpenTelemetry-Java 1Password
7273
- `OPENTELEMETRYBOT_GITHUB_TOKEN` - owned by [@trask](https://github.com/trask)
7374
- `SONATYPE_KEY` - owned by [@trask](https://github.com/trask)
7475
- `SONATYPE_USER` - owned by [@trask](https://github.com/trask)

.github/workflows/owasp-dependency-check-daily.yml

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
- uses: gradle/gradle-build-action@v2
2828
with:
2929
arguments: ":javaagent:dependencyCheckAnalyze"
30+
env:
31+
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
3032

3133
- name: Upload report
3234
if: always()

conventions/src/main/kotlin/otel.java-conventions.gradle.kts

+1
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ dependencyCheck {
415415
skipConfigurations = listOf("errorprone", "checkstyle", "annotationProcessor")
416416
suppressionFile = "buildscripts/dependency-check-suppressions.xml"
417417
failBuildOnCVSS = 7.0f // fail on high or critical CVE
418+
nvd.apiKey = System.getenv("NVD_API_KEY")
418419
}
419420

420421
idea {

0 commit comments

Comments
 (0)