From a6157286769c031abd62e0926abeabed334cad03 Mon Sep 17 00:00:00 2001 From: pmm Date: Tue, 24 Sep 2024 16:42:47 +0530 Subject: [PATCH 01/10] [APPS-3035] Spring vulnerability --- extension-inspector-test/pom.xml | 2 -- pom.xml | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/extension-inspector-test/pom.xml b/extension-inspector-test/pom.xml index e016e42..fccb193 100644 --- a/extension-inspector-test/pom.xml +++ b/extension-inspector-test/pom.xml @@ -30,13 +30,11 @@ org.springframework spring-beans - 5.2.21.RELEASE org.springframework spring-context - 5.2.4.RELEASE diff --git a/pom.xml b/pom.xml index 1b8bb56..9181cb8 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.springframework.boot spring-boot-starter-parent - 2.5.15 + 3.2.0 From 10441be179a17d3ca077ca2d0acb45d61f1b4159 Mon Sep 17 00:00:00 2001 From: pmm Date: Tue, 24 Sep 2024 17:15:59 +0530 Subject: [PATCH 02/10] [APPS-3035] Spring vulnerability --- .../extension_inspector/analyser/service/ConfigService.java | 2 +- .../analyser/store/WarInventoryReportStore.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extension-inspector-analyser/src/main/java/org/alfresco/extension_inspector/analyser/service/ConfigService.java b/extension-inspector-analyser/src/main/java/org/alfresco/extension_inspector/analyser/service/ConfigService.java index 93620d1..13cb0df 100644 --- a/extension-inspector-analyser/src/main/java/org/alfresco/extension_inspector/analyser/service/ConfigService.java +++ b/extension-inspector-analyser/src/main/java/org/alfresco/extension_inspector/analyser/service/ConfigService.java @@ -20,11 +20,11 @@ import static java.util.Collections.unmodifiableMap; import static org.alfresco.extension_inspector.model.Resource.Type.FILE; -import javax.annotation.PostConstruct; import java.util.EnumMap; import java.util.Map; import java.util.Set; +import jakarta.annotation.PostConstruct; import org.alfresco.extension_inspector.inventory.service.InventoryService; import org.alfresco.extension_inspector.model.InventoryReport; import org.alfresco.extension_inspector.model.Resource; diff --git a/extension-inspector-analyser/src/main/java/org/alfresco/extension_inspector/analyser/store/WarInventoryReportStore.java b/extension-inspector-analyser/src/main/java/org/alfresco/extension_inspector/analyser/store/WarInventoryReportStore.java index c8893f7..3f180d6 100644 --- a/extension-inspector-analyser/src/main/java/org/alfresco/extension_inspector/analyser/store/WarInventoryReportStore.java +++ b/extension-inspector-analyser/src/main/java/org/alfresco/extension_inspector/analyser/store/WarInventoryReportStore.java @@ -29,8 +29,8 @@ import java.util.SortedSet; import java.util.TreeSet; -import javax.annotation.PostConstruct; +import jakarta.annotation.PostConstruct; import org.alfresco.extension_inspector.analyser.parser.InventoryParser; import org.alfresco.extension_inspector.model.InventoryReport; import org.apache.maven.artifact.versioning.ComparableVersion; From 799608ea80e241be5eda9ff2a343e181df64bb84 Mon Sep 17 00:00:00 2001 From: pmm Date: Tue, 24 Sep 2024 17:15:59 +0530 Subject: [PATCH 03/10] [APPS-3035] Spring vulnerability --- .../extension_inspector/analyser/service/ConfigService.java | 2 +- .../analyser/store/WarInventoryReportStore.java | 2 +- .../src/main/resources/application.yaml | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/extension-inspector-analyser/src/main/java/org/alfresco/extension_inspector/analyser/service/ConfigService.java b/extension-inspector-analyser/src/main/java/org/alfresco/extension_inspector/analyser/service/ConfigService.java index 93620d1..13cb0df 100644 --- a/extension-inspector-analyser/src/main/java/org/alfresco/extension_inspector/analyser/service/ConfigService.java +++ b/extension-inspector-analyser/src/main/java/org/alfresco/extension_inspector/analyser/service/ConfigService.java @@ -20,11 +20,11 @@ import static java.util.Collections.unmodifiableMap; import static org.alfresco.extension_inspector.model.Resource.Type.FILE; -import javax.annotation.PostConstruct; import java.util.EnumMap; import java.util.Map; import java.util.Set; +import jakarta.annotation.PostConstruct; import org.alfresco.extension_inspector.inventory.service.InventoryService; import org.alfresco.extension_inspector.model.InventoryReport; import org.alfresco.extension_inspector.model.Resource; diff --git a/extension-inspector-analyser/src/main/java/org/alfresco/extension_inspector/analyser/store/WarInventoryReportStore.java b/extension-inspector-analyser/src/main/java/org/alfresco/extension_inspector/analyser/store/WarInventoryReportStore.java index c8893f7..3f180d6 100644 --- a/extension-inspector-analyser/src/main/java/org/alfresco/extension_inspector/analyser/store/WarInventoryReportStore.java +++ b/extension-inspector-analyser/src/main/java/org/alfresco/extension_inspector/analyser/store/WarInventoryReportStore.java @@ -29,8 +29,8 @@ import java.util.SortedSet; import java.util.TreeSet; -import javax.annotation.PostConstruct; +import jakarta.annotation.PostConstruct; import org.alfresco.extension_inspector.analyser.parser.InventoryParser; import org.alfresco.extension_inspector.model.InventoryReport; import org.apache.maven.artifact.versioning.ComparableVersion; diff --git a/extension-inspector-packaging/src/main/resources/application.yaml b/extension-inspector-packaging/src/main/resources/application.yaml index 3f904f0..2abefb3 100644 --- a/extension-inspector-packaging/src/main/resources/application.yaml +++ b/extension-inspector-packaging/src/main/resources/application.yaml @@ -2,6 +2,7 @@ spring: main: banner_mode: "off" + allow-circular-references: true shell: interactive: enabled: false From 95337a4abfc57e134ae4f217210703edcfe74c46 Mon Sep 17 00:00:00 2001 From: pmm Date: Wed, 25 Sep 2024 18:33:44 +0530 Subject: [PATCH 04/10] [APPS-3035] Spring vulnerability --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9181cb8..0bfc4cd 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ Alfresco Extension Inspector Parent - 11 + 17 From 91b64e0983ce12cc4c2d4a12d57ce575d27dd14d Mon Sep 17 00:00:00 2001 From: pmm Date: Thu, 26 Sep 2024 12:25:13 +0530 Subject: [PATCH 05/10] [APPS-3035] maven compiler plugin added --- pom.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pom.xml b/pom.xml index 0bfc4cd..2a91b94 100644 --- a/pom.xml +++ b/pom.xml @@ -78,6 +78,15 @@ @{project.version} + + org.apache.maven.plugins + maven-compiler-plugin + 3.11.0 + + 17 + 17 + + From 765588560a3a6dc5960719811c4b3fbc70154fe0 Mon Sep 17 00:00:00 2001 From: pmm Date: Thu, 26 Sep 2024 17:22:51 +0530 Subject: [PATCH 06/10] [APPS-3035] maven compiler plugin added --- .github/workflows/build.yml | 7 +++++++ pom.xml | 11 +---------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ff5db2d..18f1ad2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,11 +33,18 @@ jobs: !contains(github.event.head_commit.message, '[skip tests]') && !contains(github.event.head_commit.message, '[force]') steps: + - name: Set up Java + uses: actions/setup-java@v4 + with: + distribution: adopt + java-version: 17 + - uses: Alfresco/ya-pmd-scan@v4.0.0 with: fail-on-new-issues: "false" create-github-annotations: "false" + tests: diff --git a/pom.xml b/pom.xml index 2a91b94..9181cb8 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ Alfresco Extension Inspector Parent - 17 + 11 @@ -78,15 +78,6 @@ @{project.version} - - org.apache.maven.plugins - maven-compiler-plugin - 3.11.0 - - 17 - 17 - - From 5624e68561d6ed9a641d28d90a156504938da74e Mon Sep 17 00:00:00 2001 From: pmm Date: Thu, 26 Sep 2024 17:36:32 +0530 Subject: [PATCH 07/10] [APPS-3035] removed the additional spaces --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 18f1ad2..1d575ef 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,7 +44,6 @@ jobs: fail-on-new-issues: "false" create-github-annotations: "false" - tests: From 1e1891dd2107308f1999fd8d1f99fd01520f6b38 Mon Sep 17 00:00:00 2001 From: pmm Date: Fri, 27 Sep 2024 10:45:31 +0530 Subject: [PATCH 08/10] [APPS-3035] removed the circular reference --- .../src/main/resources/application.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/extension-inspector-packaging/src/main/resources/application.yaml b/extension-inspector-packaging/src/main/resources/application.yaml index 2abefb3..3f904f0 100644 --- a/extension-inspector-packaging/src/main/resources/application.yaml +++ b/extension-inspector-packaging/src/main/resources/application.yaml @@ -2,7 +2,6 @@ spring: main: banner_mode: "off" - allow-circular-references: true shell: interactive: enabled: false From d3e707af36cd9126be6020bd9c5bcfaeede0a4b8 Mon Sep 17 00:00:00 2001 From: pmm Date: Thu, 3 Oct 2024 11:13:52 +0530 Subject: [PATCH 09/10] [APPS-3035] added lazy initialization --- .../main/java/org.alfresco.extension_inspector/Application.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extension-inspector-packaging/src/main/java/org.alfresco.extension_inspector/Application.java b/extension-inspector-packaging/src/main/java/org.alfresco.extension_inspector/Application.java index 4ae1136..fdfce33 100644 --- a/extension-inspector-packaging/src/main/java/org.alfresco.extension_inspector/Application.java +++ b/extension-inspector-packaging/src/main/java/org.alfresco.extension_inspector/Application.java @@ -35,6 +35,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; +import org.springframework.context.annotation.Lazy; @SpringBootApplication public class Application implements ApplicationRunner, ExitCodeGenerator @@ -46,6 +47,7 @@ public class Application implements ApplicationRunner, ExitCodeGenerator @Autowired private InventoryCommandRunner inventoryCommandRunner; @Autowired + @Lazy private AnalyserCommandRunner analyserCommandRunner; public static void main(String[] args) From 69edb833c00f9afd2d406f32e157639cc32c5550 Mon Sep 17 00:00:00 2001 From: pmm Date: Fri, 4 Oct 2024 15:56:35 +0530 Subject: [PATCH 10/10] [APPS-3035] updated to latest springboot version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9181cb8..c697b4a 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.springframework.boot spring-boot-starter-parent - 3.2.0 + 3.3.4