From d9afa90c421c0a12ae8adecd657e48880c9b0ea4 Mon Sep 17 00:00:00 2001
From: Amit Galitzky <amgalitz@amazon.com>
Date: Mon, 25 Nov 2024 11:39:01 -0800
Subject: [PATCH] updating several dependencies (#1368)

Signed-off-by: Amit Galitzky <amgalitz@amazon.com>
---
 .github/workflows/benchmark.yml                | 11 +++++------
 .github/workflows/link-check-workflow.yml      |  3 ---
 .github/workflows/long_running.yml             | 11 +++++------
 .github/workflows/maven-publish.yml            |  7 ++-----
 .../workflows/test_build_multi_platform.yml    | 15 +++++++--------
 .github/workflows/test_bwc.yml                 | 11 +++++------
 build.gradle                                   | 18 +++++++++---------
 7 files changed, 33 insertions(+), 43 deletions(-)

diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml
index ff77bf71e..76b2380a3 100644
--- a/.github/workflows/benchmark.yml
+++ b/.github/workflows/benchmark.yml
@@ -7,9 +7,6 @@ on:
     branches:
       - "*"
 
-env:
-  ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
-
 jobs:
   Get-CI-Image-Tag:
     uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main
@@ -34,17 +31,19 @@ jobs:
       # this image tag is subject to change as more dependencies and updates will arrive over time
       image: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }}
       # need to switch to root so that github actions can install runner binary on container without permission issues.
-      options: --user root
+      options: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-options }}
 
     steps:
+      - name: Run start commands
+        run: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-command }}
       - name: Setup Java
-        uses: actions/setup-java@v3
+        uses: actions/setup-java@v4
         with:
           distribution: 'temurin'
           java-version: 21
 
       - name: Checkout AD
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
 
       - name: Build and Run Tests
         run: |
diff --git a/.github/workflows/link-check-workflow.yml b/.github/workflows/link-check-workflow.yml
index 7abf60367..6387a0791 100644
--- a/.github/workflows/link-check-workflow.yml
+++ b/.github/workflows/link-check-workflow.yml
@@ -5,9 +5,6 @@ on:
   pull_request:
     branches: [main]
 
-env:
-  ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
-
 jobs:
   linkchecker:
     runs-on: ubuntu-latest
diff --git a/.github/workflows/long_running.yml b/.github/workflows/long_running.yml
index e808b76d1..a83e560e7 100644
--- a/.github/workflows/long_running.yml
+++ b/.github/workflows/long_running.yml
@@ -7,9 +7,6 @@ on:
     branches:
       - "*"
 
-env:
-  ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
-
 jobs:
   Get-CI-Image-Tag:
     uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main
@@ -34,17 +31,19 @@ jobs:
       # this image tag is subject to change as more dependencies and updates will arrive over time
       image: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }}
       # need to switch to root so that github actions can install runner binary on container without permission issues.
-      options: --user root
+      options: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-options }}
 
     steps:
+      - name: Run start commands
+        run: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-command }}
       - name: Setup Java
-        uses: actions/setup-java@v3
+        uses: actions/setup-java@v4
         with:
           distribution: 'temurin'
           java-version: 21
 
       - name: Checkout AD
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
 
       - name: Build and Run Tests
         run: |
diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml
index 5dc045134..e7872b981 100644
--- a/.github/workflows/maven-publish.yml
+++ b/.github/workflows/maven-publish.yml
@@ -8,9 +8,6 @@ on:
         - '1.*'
         - '2.*'
 
-env:
-  ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
-
 jobs:
   build-and-publish-snapshots:
     strategy:
@@ -23,12 +20,12 @@ jobs:
       contents: write
 
     steps:
-      - uses: actions/setup-java@v3
+      - uses: actions/setup-java@v4
         with:
           distribution: temurin # Temurin is a distribution of adoptium
           java-version: 17
       - uses: actions/checkout@v4
-      - uses: aws-actions/configure-aws-credentials@v4.0.1
+      - uses: aws-actions/configure-aws-credentials@v4
         with:
           role-to-assume: ${{ secrets.PUBLISH_SNAPSHOTS_ROLE }}
           aws-region: us-east-1
diff --git a/.github/workflows/test_build_multi_platform.yml b/.github/workflows/test_build_multi_platform.yml
index 97ddd34c9..bd2e82867 100644
--- a/.github/workflows/test_build_multi_platform.yml
+++ b/.github/workflows/test_build_multi_platform.yml
@@ -7,9 +7,6 @@ on:
     branches:
       - "*"
 
-env:
-  ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
-
 jobs:
   Get-CI-Image-Tag:
     uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main
@@ -40,7 +37,7 @@ jobs:
       JENKINS_URL: build.ci.opensearch.org
     steps:
       - name: Setup Java ${{ matrix.java }}
-        uses: actions/setup-java@v3
+        uses: actions/setup-java@v4
         with:
           distribution: 'temurin'
           java-version: ${{ matrix.java }}
@@ -70,20 +67,22 @@ jobs:
       # this image tag is subject to change as more dependencies and updates will arrive over time
       image: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }}
       # need to switch to root so that github actions can install runner binary on container without permission issues.
-      options: --user root
+      options: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-options }}
 
     env:
       JENKINS_URL: build.ci.opensearch.org
 
     steps:
+      - name: Run start commands
+        run: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-command }}
       - name: Setup Java ${{ matrix.java }}
-        uses: actions/setup-java@v3
+        uses: actions/setup-java@v4
         with:
           distribution: 'temurin'
           java-version: ${{ matrix.java }}
 
       - name: Checkout AD
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
 
       - name: Assemble / build / mavenlocal / integTest
         run: |
@@ -107,7 +106,7 @@ jobs:
 
     steps:
       - name: Setup Java ${{ matrix.java }}
-        uses: actions/setup-java@v3
+        uses: actions/setup-java@v4
         with:
           distribution: 'temurin'
           java-version: ${{ matrix.java }}
diff --git a/.github/workflows/test_bwc.yml b/.github/workflows/test_bwc.yml
index 31ef6a7c6..9a573eefc 100644
--- a/.github/workflows/test_bwc.yml
+++ b/.github/workflows/test_bwc.yml
@@ -7,9 +7,6 @@ on:
     branches:
       - "*"
 
-env:
-  ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
-
 jobs:
   Get-CI-Image-Tag:
     uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main
@@ -30,18 +27,20 @@ jobs:
       # this image tag is subject to change as more dependencies and updates will arrive over time
       image: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }}
       # need to switch to root so that github actions can install runner binary on container without permission issues.
-      options: --user root
+      options: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-options }}
 
     steps:
+      - name: Run start commands
+        run: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-command }}
       - name: Setup Java ${{ matrix.java }}
-        uses: actions/setup-java@v3
+        uses: actions/setup-java@v4
         with:
           distribution: 'temurin'
           java-version: ${{ matrix.java }}
 
       # anomaly-detection
       - name: Checkout AD
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
 
       - name: Assemble anomaly-detection
         run: |
diff --git a/build.gradle b/build.gradle
index be34172d6..3ccb40abb 100644
--- a/build.gradle
+++ b/build.gradle
@@ -142,20 +142,20 @@ dependencies {
 
 
     implementation "org.jacoco:org.jacoco.agent:0.8.12"
-    implementation ("org.jacoco:org.jacoco.ant:0.8.11") {
+    implementation ("org.jacoco:org.jacoco.ant:0.8.12") {
         exclude group: 'org.ow2.asm', module: 'asm-commons'
         exclude group: 'org.ow2.asm', module: 'asm'
         exclude group: 'org.ow2.asm', module: 'asm-tree'
     }
 
     // used for output encoding of config descriptions
-    implementation group: 'org.owasp.encoder' , name: 'encoder', version: '1.2.3'
+    implementation group: 'org.owasp.encoder' , name: 'encoder', version: '1.3.1'
 
     testImplementation group: 'pl.pragmatists', name: 'JUnitParams', version: '1.1.1'
-    testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.14.1'
+    testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.14.2'
     testImplementation group: 'org.objenesis', name: 'objenesis', version: '3.3'
-    testImplementation group: 'net.bytebuddy', name: 'byte-buddy', version: '1.14.9'
-    testImplementation group: 'net.bytebuddy', name: 'byte-buddy-agent', version: '1.14.9'
+    testImplementation group: 'net.bytebuddy', name: 'byte-buddy', version: '1.15.10'
+    testImplementation group: 'net.bytebuddy', name: 'byte-buddy-agent', version: '1.15.10'
     testCompileOnly 'org.apiguardian:apiguardian-api:1.1.2'
     // jupiter is required to run unit tests not inherited from OpenSearchTestCase (e.g., PreviousValueImputerTests)
     testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.2'
@@ -186,7 +186,7 @@ allprojects {
     version = "${opensearch_build}"
 
     plugins.withId('jacoco') {
-        jacoco.toolVersion = '0.8.11'
+        jacoco.toolVersion = '0.8.12'
     }
 }
 
@@ -218,10 +218,10 @@ configurations.all {
         force "org.apache.httpcomponents.client5:httpclient5:${versions.httpclient5}"
         force "commons-codec:commons-codec:${versions.commonscodec}"
 
-        force "org.mockito:mockito-core:5.14.1"
+        force "org.mockito:mockito-core:5.14.2"
         force "org.objenesis:objenesis:3.3"
-        force "net.bytebuddy:byte-buddy:1.14.9"
-        force "net.bytebuddy:byte-buddy-agent:1.14.9"
+        force "net.bytebuddy:byte-buddy:1.15.10"
+        force "net.bytebuddy:byte-buddy-agent:1.15.10"
         force "com.google.code.gson:gson:2.8.9"
         force "junit:junit:4.13.2"