Skip to content

Commit ba5aa3e

Browse files
Updated owasp gradle plugin to 12.0.2 (#103)
1 parent 206e0d4 commit ba5aa3e

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

Diff for: gradle/libs.versions.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ protobuf = { group = "com.google.protobuf", name = "protobuf-gradle-plugin", ver
1616
licenses = { group = "com.github.jk1.dependency-license-report", name = "com.github.jk1.dependency-license-report.gradle.plugin", version = "2.8" }
1717
download = { group = "de.undercouch.download", name = "de.undercouch.download.gradle.plugin", version = "5.6.0" }
1818
git-properties = { group = "com.gorylenko.gradle-git-properties", name = "gradle-git-properties", version = "2.4.2" }
19-
owasp = { group = "org.owasp", name = "dependency-check-gradle", version = "10.0.4" }
19+
owasp = { group = "org.owasp", name = "dependency-check-gradle", version = "12.0.2" }
2020
junit-bom = { group = "org.junit", name = "junit-bom", version = "5.11.4" }
2121
junit-parameters = { group = "org.junit.jupiter", name = "junit-jupiter-params" }
2222
junit-launcher = { group = "org.junit.platform", name = "junit-platform-launcher" }

Diff for: plugin/src/main/kotlin/com/exactpro/th2/gradle/BaseTh2Plugin.kt

+14-7
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ class BaseTh2Plugin : Plugin<Project> {
9494
nugetconfEnabled = false
9595
nodeEnabled = false
9696

97-
knownExploitedURL = project.findProperty("analyzersKnownExploitedURL") as? String
97+
kev.apply {
98+
url = project.findProperty("analyzersKnownExploitedURL") as? String
99+
}
98100
}
99101
}
100102
}
@@ -106,13 +108,18 @@ class BaseTh2Plugin : Plugin<Project> {
106108
project.findProperty(TH2_LICENCE_LICENSE_NORMALIZER_BUNDLE_PATH_PROP)?.toString()?.let(::File)
107109

108110
if (licenseNormalizerBundlePath == null) {
109-
licenseNormalizerBundlePath = project.layout.buildDirectory.asFile.get().resolve("license-normalizer-bundle.json")
111+
licenseNormalizerBundlePath =
112+
project.layout.buildDirectory.asFile
113+
.get()
114+
.resolve("license-normalizer-bundle.json")
110115
if (!licenseNormalizerBundlePath.exists()) {
111-
DownloadAction(project).apply {
112-
src("$BASE_EXTERNAL_CONFIGURATION_URL/license-compliance/gradle-license-report/license-normalizer-bundle.json")
113-
dest(licenseNormalizerBundlePath)
114-
overwrite(false)
115-
}.execute().get()
116+
DownloadAction(project)
117+
.apply {
118+
src("$BASE_EXTERNAL_CONFIGURATION_URL/license-compliance/gradle-license-report/license-normalizer-bundle.json")
119+
dest(licenseNormalizerBundlePath)
120+
overwrite(false)
121+
}.execute()
122+
.get()
116123
}
117124
}
118125

Diff for: plugin/src/test/kotlin/com/exactpro/th2/gradle/BaseTh2PluginTest.kt

+3-2
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ internal class BaseTh2PluginTest {
109109
{
110110
assertEquals(
111111
analyzersKnownExploitedURL,
112-
analyzers.knownExploitedURL,
112+
analyzers.kev.url,
113113
"unexpected dependencyCheck.analyzers.knownExploitedURL",
114114
)
115115
},
@@ -142,6 +142,7 @@ internal class BaseTh2PluginTest {
142142
assertNotNull(bom, "bom not found in the $configuration configuration")
143143
}
144144

145+
@Suppress("unused")
145146
private fun requiredPlugins() = listOf("java", "java-library", "org.jetbrains.kotlin.jvm")
146147

147148
private fun assertDependencyCheck(extension: DependencyCheckExtension) =
@@ -169,7 +170,7 @@ internal class BaseTh2PluginTest {
169170
{ assertFalse(extension.assemblyEnabled, "unexpected analyzers.assemblyEnabled") },
170171
{ assertFalse(extension.nugetconfEnabled, "unexpected analyzers.nugetconfEnabled") },
171172
{ assertFalse(extension.nodeEnabled, "unexpected analyzers.nodeEnabled") },
172-
{ assertNull(extension.knownExploitedURL, "unexpected analyzers.knownExploitedURL") },
173+
{ assertNull(extension.kev.url, "unexpected analyzers.knownExploitedURL") },
173174
)
174175

175176
private fun assertNvd(extension: NvdExtension) =

0 commit comments

Comments
 (0)