From 1a7e3fa45c73ad2c1750d9a47ce0a86f98c1cd56 Mon Sep 17 00:00:00 2001 From: Baodi Shi Date: Mon, 15 Jun 2026 17:06:32 +0800 Subject: [PATCH] Fix cves --- .github/workflows/trivy.yaml | 30 +++++++++++++ image/Dockerfile | 3 ++ pom.xml | 82 +++++++++++++++++++++++++++++++++--- 3 files changed, 109 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/trivy.yaml diff --git a/.github/workflows/trivy.yaml b/.github/workflows/trivy.yaml new file mode 100644 index 00000000..efb446bc --- /dev/null +++ b/.github/workflows/trivy.yaml @@ -0,0 +1,30 @@ +name: Trivy Scan +on: + workflow_dispatch: + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + name: Scan CVEs + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Run Trivy vulnerability scanner in fs mode + uses: aquasecurity/trivy-action@v0.35.0 + with: + scan-type: 'fs' + scan-ref: './' + severity: 'CRITICAL,HIGH' + exit-code: '1' + format: table + scanners: "vuln" + args: --timeout 10m + env: + TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db + TRIVY_JAVA_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-java-db diff --git a/image/Dockerfile b/image/Dockerfile index aa9ce43e..8d3c0456 100644 --- a/image/Dockerfile +++ b/image/Dockerfile @@ -19,4 +19,7 @@ ARG PULSAR_VERSION FROM streamnative/pulsar-functions-java-runner:${PULSAR_VERSION} +USER root +RUN apk upgrade --no-cache +USER $UID COPY --chown=$UID:$GID target/*.nar /pulsar/connectors/ diff --git a/pom.xml b/pom.xml index 2110051d..58f102b8 100644 --- a/pom.xml +++ b/pom.xml @@ -48,23 +48,23 @@ 2.18.6 2.18.6 1.18.42 - 4.2.0.6 + 4.2.1.1 4.0.4.2 1.12.0 3.3.6 - 1.13.1 + 1.15.2 1.12.788 2.32.28 2.3.1 2.13.2 1.28.0 - 2.17.1 + 2.25.4 2.4.9 3.25.5 ${protobuf3.version} 1.75.0 ${grpc.version} - 1.2.22 + 1.2.30 4.13.1 @@ -87,8 +87,21 @@ 2.0 1.2.24 5.4.0 - 4.1.133.Final - 0.17.0 + 4.1.135.Final + 0.23.0 + + + 1.5.4 + 1.1.10.4 + 9.37.4 + 3.6.0 + 1.11.0 + 32.0.0-jre + 2.15.0 + 1.62.0 + 4.5.27 + 2.15.0 + 6.3.0 @@ -325,6 +338,63 @@ ${libthrift.version} + + + org.codehaus.jettison + jettison + ${jettison.version} + + + org.xerial.snappy + snappy-java + ${snappy-java.version} + + + com.nimbusds + nimbus-jose-jwt + ${nimbus-jose-jwt.version} + + + dnsjava + dnsjava + ${dnsjava.version} + + + commons-beanutils + commons-beanutils + ${commons-beanutils.version} + + + com.google.guava + guava + ${guava.version} + + + org.apache.commons + commons-configuration2 + ${commons-configuration2.version} + + + io.opentelemetry + opentelemetry-api + ${opentelemetry.version} + + + io.vertx + vertx-core + ${vertx.version} + + + org.asynchttpclient + async-http-client + ${async-http-client.version} + + + com.squareup.wire + wire-runtime + ${wire.version} + +