File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,9 +22,8 @@ private admin repo.
2222
2323- ` GPG_PASSWORD ` - stored in OpenTelemetry-Java 1Password
2424- ` GPG_PRIVATE_KEY ` - stored in OpenTelemetry-Java 1Password
25- - ` NVD_API_KEY ` - stored in OpenTelemetry-Java 1Password
26- - Generated at < https://nvd.nist.gov/developers/request-an-api-key >
27- - Key is associated with [ @trask ] ( https://github.com/trask ) 's gmail address
25+ - ` SONATYPE_OSS_INDEX_USER ` - owned by [ @trask ] ( https://github.com/trask )
26+ - ` SONATYPE_OSS_INDEX_PASSWORD ` - owned by [ @trask ] ( https://github.com/trask )
2827- ` SONATYPE_KEY ` - owned by [ @trask ] ( https://github.com/trask )
2928- ` SONATYPE_USER ` - owned by [ @trask ] ( https://github.com/trask )
3029
Original file line number Diff line number Diff line change 11# the benefit of this over renovate is that this also analyzes transitive dependencies
22# while renovate (at least currently) only analyzes top-level dependencies
3- name : OWASP dependency check (daily)
3+ name : OSS Index dependency audit (daily)
44
55on :
66 schedule :
@@ -22,22 +22,22 @@ jobs:
2222 distribution : temurin
2323 java-version : 21
2424
25- - name : Increase gradle daemon heap size
26- run : |
27- sed -i "s/org.gradle.jvmargs=/org.gradle.jvmargs=-Xmx3g /" gradle.properties
28-
2925 - uses : gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
3026
31- - run : ./gradlew dependencyCheckAnalyze
27+ - run : ./gradlew ossIndexAudit
28+ id : audit
29+ continue-on-error : true
3230 env :
33- NVD_API_KEY : ${{ secrets.NVD_API_KEY }}
31+ SONATYPE_OSS_INDEX_USER : ${{ secrets.SONATYPE_OSS_INDEX_USER }}
32+ SONATYPE_OSS_INDEX_PASSWORD : ${{ secrets.SONATYPE_OSS_INDEX_PASSWORD }}
3433 DEVELOCITY_ACCESS_KEY : ${{ secrets.DEVELOCITY_ACCESS_KEY }}
3534
36- - name : Upload report
37- if : always()
38- uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
39- with :
40- path : " **/build/reports"
35+ - name : Print vulnerability report
36+ if : steps.audit.outcome == 'failure'
37+ run : |
38+ echo "=== OSS Index Vulnerability Report ==="
39+ cat oss-index-cyclonedx-bom.json
40+ exit 1
4141
4242 workflow-notification :
4343 permissions :
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ dependencies {
1515 implementation(" com.diffplug.spotless:com.diffplug.spotless.gradle.plugin:8.3.0" )
1616 implementation(" net.ltgt.errorprone:net.ltgt.errorprone.gradle.plugin:5.1.0" )
1717 implementation(" net.ltgt.nullaway:net.ltgt.nullaway.gradle.plugin:3.0.0" )
18- implementation(" org.owasp.dependencycheck:org.owasp.dependencycheck. gradle.plugin:12.2.0 " )
18+ implementation(" org.sonatype. gradle.plugins:scan-gradle- plugin:3.1.4 " )
1919 implementation(" ru.vyarus.animalsniffer:ru.vyarus.animalsniffer.gradle.plugin:2.0.1" )
2020 implementation(" com.gradle.develocity:com.gradle.develocity.gradle.plugin:4.3.2" )
2121 implementation(" me.champeau.gradle.japicmp:me.champeau.gradle.japicmp.gradle.plugin:0.4.6" )
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ plugins {
88 id(" otel.errorprone-conventions" )
99 id(" otel.spotless-conventions" )
1010 id(" otel.japicmp-conventions" )
11- id(" org.owasp.dependencycheck " )
11+ id(" org.sonatype.gradle.plugins.scan " )
1212}
1313
1414val otelJava = extensions.create<OtelJavaExtension >(" otelJava" )
@@ -217,10 +217,8 @@ afterEvaluate {
217217 }
218218}
219219
220- dependencyCheck {
221- scanConfigurations = mutableListOf (" runtimeClasspath" )
222- suppressionFile = " buildscripts/dependency-check-suppressions.xml"
223- failBuildOnCVSS = 7.0f // fail on high or critical CVE
224- nvd.apiKey = System .getenv(" NVD_API_KEY" )
225- nvd.delay = 3500 // until next dependency check release (https://github.com/jeremylong/DependencyCheck/pull/6333)
220+ ossIndexAudit {
221+ username = System .getenv(" SONATYPE_OSS_INDEX_USER" ) ? : " "
222+ password = System .getenv(" SONATYPE_OSS_INDEX_PASSWORD" ) ? : " "
223+ outputFormat = org.sonatype.gradle.plugins.scan.ossindex.OutputFormat .JSON_CYCLONE_DX_1_4
226224}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -80,8 +80,3 @@ configurations {
8080 }
8181 }
8282}
83-
84- // Skip OWASP dependencyCheck task on test module
85- dependencyCheck {
86- skip = true
87- }
You can’t perform that action at this time.
0 commit comments