From 9caaa6a5a6e3c729ca2100118e66e795646fc57a Mon Sep 17 00:00:00 2001 From: lilai Date: Mon, 30 Dec 2024 19:25:49 +0800 Subject: [PATCH] resolve cve of third party dependencies Signed-off-by: lilai --- pom.xml | 13 +++++++++--- .../sermant-agentcore-implement/pom.xml | 2 +- sermant-backend/pom.xml | 11 +++++++--- sermant-package/pom.xml | 2 +- .../flowcontrol-plugin/pom.xml | 2 -- .../dubbo-registry-service/pom.xml | 6 ------ .../dubbo/registry/RegistryServiceTest.java | 20 +++++++++++++++++-- .../sermant-service-registry/pom.xml | 3 +-- .../springboot-registry-service/pom.xml | 1 - .../tag-transmission-grpc-plugin/pom.xml | 2 +- 10 files changed, 40 insertions(+), 22 deletions(-) diff --git a/pom.xml b/pom.xml index 4f9acc467e..7350ac21b0 100644 --- a/pom.xml +++ b/pom.xml @@ -1,5 +1,5 @@ + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 io.sermant sermant @@ -43,8 +43,8 @@ 4.5.13 4.4.13 1.5.1 - 4.1.108.Final - 3.19.6 + 4.1.115.Final + 3.25.5 1.2.83 1.4.01 2.12.1 @@ -55,6 +55,7 @@ 2.7 0.8.11 0.16.0 + 32.1.3-jre 1.7.35 2.17.2 @@ -298,6 +299,11 @@ frontend-maven-plugin ${frontend.plugin.version} + + com.google.guava + guava + ${guava.version} + @@ -313,6 +319,7 @@ sermant-backend sermant-injector report + sermant-package diff --git a/sermant-agentcore/sermant-agentcore-implement/pom.xml b/sermant-agentcore/sermant-agentcore-implement/pom.xml index 5970467654..0eb544e93c 100644 --- a/sermant-agentcore/sermant-agentcore-implement/pom.xml +++ b/sermant-agentcore/sermant-agentcore-implement/pom.xml @@ -55,7 +55,7 @@ 3.0.1 3.3.2 1.6.7 - 2.1.2 + 2.3.3 2.13.4.2 0.1.32 1.9.5 diff --git a/sermant-backend/pom.xml b/sermant-backend/pom.xml index 8311f7bb9f..f1051f3c1c 100644 --- a/sermant-backend/pom.xml +++ b/sermant-backend/pom.xml @@ -15,8 +15,8 @@ 1.8 2.7.18 UTF-8 - 4.1.108.Final - 3.19.6 + 4.1.115.Final + 3.25.5 1.18.22 1.2.83 2.6 @@ -32,7 +32,7 @@ 1.8.4 9.0.95 5.3.39 - 2.2.1 + 2.3.3 ${project.basedir}/src/main/webapp/frontend @@ -280,6 +280,11 @@ nacos-client ${nacos-client-version} + + com.google.guava + guava + ${guava.version} + diff --git a/sermant-package/pom.xml b/sermant-package/pom.xml index c9093b6a0f..c52225021f 100644 --- a/sermant-package/pom.xml +++ b/sermant-package/pom.xml @@ -40,7 +40,7 @@ ${sermant.basedir}/${package.resources.dir}/${license.binary.suffix.file} ${package.temp.dir}/LICENSE ${sermant.basedir} - ${sermant.name}-${project.version} + sermant-${project.version} ${product.output.name} diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/pom.xml b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/pom.xml index 845236171d..4a85d723e8 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/pom.xml +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/pom.xml @@ -26,7 +26,6 @@ 1.3.5 1.4.7.RELEASE 2.2.0.RELEASE - 31.1-jre 4.5.13 4.11.0 2.7.5 @@ -111,7 +110,6 @@ com.google.guava guava - ${google.guava} provided diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-service/pom.xml b/sermant-plugins/sermant-service-registry/dubbo-registry-service/pom.xml index e02bfd9c28..75c7c8021a 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-service/pom.xml +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-service/pom.xml @@ -119,12 +119,6 @@ mockito-inline test - - io.sermant - sermant-agentcore-implement - ${project.version} - test - diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-service/src/test/java/io/sermant/dubbo/registry/RegistryServiceTest.java b/sermant-plugins/sermant-service-registry/dubbo-registry-service/src/test/java/io/sermant/dubbo/registry/RegistryServiceTest.java index 535f436617..0df956b78c 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-service/src/test/java/io/sermant/dubbo/registry/RegistryServiceTest.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-service/src/test/java/io/sermant/dubbo/registry/RegistryServiceTest.java @@ -30,7 +30,6 @@ import io.sermant.dubbo.registry.service.GovernanceService; import io.sermant.dubbo.registry.service.RegistryService; import io.sermant.dubbo.registry.service.RegistryServiceImpl; -import io.sermant.implement.operation.converter.YamlConverterImpl; import io.sermant.registry.config.RegisterConfig; import io.sermant.registry.config.RegisterServiceCommonConfig; @@ -55,6 +54,7 @@ import org.mockito.MockedStatic; import org.mockito.Mockito; +import java.io.Reader; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.Arrays; @@ -63,6 +63,7 @@ import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Optional; import java.util.Set; import java.util.concurrent.atomic.AtomicBoolean; @@ -112,7 +113,22 @@ public static void mock() { MOCKED_STATICS.add(mockConfigManager); MockedStatic operationManagerMockedStatic = Mockito.mockStatic(OperationManager.class); operationManagerMockedStatic.when(() -> OperationManager.getOperation(YamlConverter.class)) - .thenReturn(new YamlConverterImpl()); + .thenReturn(new YamlConverter() { + @Override + public Optional convert(String source, Class type) { + return Optional.empty(); + } + + @Override + public Optional convert(Reader reader, Class type) { + return Optional.empty(); + } + + @Override + public String dump(Object data) { + return null; + } + }); MOCKED_STATICS.add(operationManagerMockedStatic); } diff --git a/sermant-plugins/sermant-service-registry/pom.xml b/sermant-plugins/sermant-service-registry/pom.xml index 4a4017ee88..c45d6af58b 100644 --- a/sermant-plugins/sermant-service-registry/pom.xml +++ b/sermant-plugins/sermant-service-registry/pom.xml @@ -15,8 +15,7 @@ ${pom.basedir}/../../.. service-registry 2.7.6 - 32.1.3-jre - 2.0.4 + 2.1.2 diff --git a/sermant-plugins/sermant-springboot-registry/springboot-registry-service/pom.xml b/sermant-plugins/sermant-springboot-registry/springboot-registry-service/pom.xml index 15f2e2e0aa..d66ab5805a 100644 --- a/sermant-plugins/sermant-springboot-registry/springboot-registry-service/pom.xml +++ b/sermant-plugins/sermant-springboot-registry/springboot-registry-service/pom.xml @@ -20,7 +20,6 @@ service 3.1.0 2.13.4.2 - 31.1-jre 2.3.3 diff --git a/sermant-plugins/sermant-tag-transmission/tag-transmission-grpc-plugin/pom.xml b/sermant-plugins/sermant-tag-transmission/tag-transmission-grpc-plugin/pom.xml index 1cc461e7c0..de64c92e0a 100644 --- a/sermant-plugins/sermant-tag-transmission/tag-transmission-grpc-plugin/pom.xml +++ b/sermant-plugins/sermant-tag-transmission/tag-transmission-grpc-plugin/pom.xml @@ -17,7 +17,7 @@ false plugin 1.52.1 - 3.19.6 + 3.25.5