Repository: ImFlog/schema-registry-plugin (kotlin)

Issue:
address critical vulnerabilities
problematic packages:

`org.apache.mina:mina-core < 2.2.4`

Pull request:
Fixes #209

Patch:
diff --git a/.github/workflows/main_build.yml b/.github/workflows/main_build.yml
index ed11b94..257dba4 100644
--- a/.github/workflows/main_build.yml
+++ b/.github/workflows/main_build.yml
@@ -24,7 +24,9 @@ jobs:
         with:
           distribution: "temurin"
           java-version: "8"
-          cache: "gradle"
+      - uses: "gradle/actions/setup-gradle@v4"
+        with:
+          dependency-graph: "generate-and-submit"
       - name: "Build with Gradle"
         env:
           KAFKA_VERSION: ${{ matrix.kafka_version }}
diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml
index 550df60..fbeb3a1 100644
--- a/.github/workflows/pr_build.yml
+++ b/.github/workflows/pr_build.yml
@@ -13,6 +13,6 @@ jobs:
         with:
           distribution: "temurin"
           java-version: "8"
-          cache: "gradle"
+      - uses: "gradle/actions/setup-gradle@v4"
       - name: "Build with Gradle"
         run: "./gradlew integrationTest --stacktrace"
\ No newline at end of file
diff --git a/build.gradle.kts b/build.gradle.kts
index ed9ba43..0045e59 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,3 +1,4 @@
+import org.jetbrains.kotlin.gradle.dsl.JvmTarget
 import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
 
 group = "com.github.imflog"
@@ -15,42 +16,35 @@ repositories {
 }
 
 // Dependencies versions
-val confluentVersion = "7.6.0"
-val avroVersion = "1.11.2"
-val wireVersion = "4.9.1"
 dependencies {
     implementation(gradleApi())
-    implementation("io.confluent", "kafka-schema-registry", confluentVersion) {
+    implementation("io.confluent:kafka-schema-registry:7.9.0") {
         exclude("org.slf4j", "slf4j-log4j12")
     }
-    // Protobuf schema parser
-    implementation("com.squareup.wire", "wire-schema", wireVersion)
 }
 
 tasks.withType<KotlinCompile>().configureEach {
-    kotlinOptions {
-        jvmTarget = "1.8"
-        freeCompilerArgs = listOf(
-            "-Xself-upper-bound-inference"
-        )
+    compilerOptions {
+        jvmTarget.set(JvmTarget.JVM_1_8)
     }
 }
 
+tasks.withType<JavaCompile> {
+    options.release.set(8) // Set Java 8 compatibility
+}
+
 java {
     withSourcesJar()
 }
 
 // Unit tests
-val junitVersion = "5.7.2"
-val mockkVersion = "1.11.0"
-val assertJVersion = "3.20.2"
 dependencies {
     testImplementation(gradleTestKit())
-    testImplementation("org.junit.jupiter", "junit-jupiter-api", junitVersion)
-    testImplementation("org.junit.jupiter", "junit-jupiter-engine", junitVersion)
-    testImplementation("org.junit.jupiter", "junit-jupiter-params", junitVersion)
-    testImplementation("org.assertj", "assertj-core", assertJVersion)
-    testImplementation("io.mockk", "mockk", mockkVersion)
+    testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.2")
+    testImplementation("org.junit.jupiter:junit-jupiter-engine:5.7.2")
+    testImplementation("org.junit.jupiter:junit-jupiter-params:5.7.2")
+    testImplementation("org.assertj:assertj-core:3.27.3")
+    testImplementation("io.mockk:mockk:1.14.0")
 }
 
 tasks.withType<Test> {
@@ -70,13 +64,15 @@ val integrationImplementation: Configuration by configurations.getting {
     )
 }
 
-configurations["integrationImplementation"].extendsFrom(configurations.runtimeOnly.get())
+configurations["integrationImplementation"].extendsFrom(
+    configurations.runtimeOnly.get(),
+    configurations.testRuntimeOnly.get(),
+    configurations.testCompileClasspath.get()
+)
 
-val wiremockVersion = "2.28.1"
-val testContainersVersion = "1.17.6"
 dependencies {
-    integrationImplementation("com.github.tomakehurst", "wiremock-jre8", wiremockVersion)
-    integrationImplementation("org.testcontainers", "kafka", testContainersVersion)
+    integrationImplementation("com.github.tomakehurst:wiremock-jre8:2.35.1")
+    integrationImplementation("org.testcontainers:kafka:1.20.6")
 }
 
 task<Test>("integrationTest") {


Test patch:
diff --git a/src/integration/kotlin/com/github/imflog/schema/registry/utils/KafkaTestContainersUtils.kt b/src/integration/kotlin/com/github/imflog/schema/registry/utils/KafkaTestContainersUtils.kt
index 48f6dbb..4fbbc01 100644
--- a/src/integration/kotlin/com/github/imflog/schema/registry/utils/KafkaTestContainersUtils.kt
+++ b/src/integration/kotlin/com/github/imflog/schema/registry/utils/KafkaTestContainersUtils.kt
@@ -4,8 +4,6 @@ import io.confluent.kafka.schemaregistry.avro.AvroSchemaProvider
 import io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient
 import io.confluent.kafka.schemaregistry.json.JsonSchemaProvider
 import io.confluent.kafka.schemaregistry.protobuf.ProtobufSchemaProvider
-import org.junit.jupiter.api.AfterAll
-import org.junit.jupiter.api.BeforeAll
 import org.testcontainers.containers.GenericContainer
 import org.testcontainers.containers.KafkaContainer
 import org.testcontainers.containers.Network
@@ -84,4 +82,4 @@ abstract class KafkaTestContainersUtils {
             mapOf<String, Any>()
         )
     }
-}
+}
\ No newline at end of file