Skip to content

Commit cdd728c

Browse files
Allow scanning of all dependencies
The default vulnerability scan, run with `make scan`, checks only the runtimeClasspath dependencies. This change add a `scan-all` Makefile target that checks all dependencies, including test and plugin dependencies. Signed-off-by: Mark S. Lewis <[email protected]>
1 parent b275bd6 commit cdd728c

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,17 @@ endif
1616

1717
.PHONY: scan
1818
scan: $(osv-scanner)
19+
rm -f fabric-chaincode-shim/gradle.lockfile
1920
./gradlew --quiet :fabric-chaincode-shim:dependencies --write-locks --configuration runtimeClasspath
2021
bin/osv-scanner scan --lockfile=fabric-chaincode-shim/gradle.lockfile
2122

23+
.PHONY: scan-all
24+
scan-all: $(osv-scanner)
25+
rm -f fabric-chaincode-shim/gradle.lockfile
26+
./gradlew --quiet :fabric-chaincode-shim:dependencies --write-locks
27+
bin/osv-scanner scan --lockfile=fabric-chaincode-shim/gradle.lockfile
28+
29+
2230
.PHONY: install-osv-scanner
2331
install-osv-scanner:
2432
mkdir -p '$(bin_dir)'

fabric-chaincode-shim/build.gradle

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@ pmd {
2121

2222
pmdTest.enabled = false
2323

24-
configurations {
25-
runtimeClasspath {
26-
resolutionStrategy.activateDependencyLocking()
27-
}
24+
dependencyLocking {
25+
lockAllConfigurations()
2826
}
2927

3028
tasks.withType(org.gradle.api.tasks.testing.Test) {

0 commit comments

Comments
 (0)