diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index ed9d1a8..a50706b 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -10,26 +10,7 @@ on: branches: [ master ] jobs: - build: - - runs-on: ubuntu-latest - - steps: - - name: Repository checkout - uses: actions/checkout@v2 - - name: Cache local Maven repository - uses: actions/cache@v2 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-maven- - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: 1.8 - - name: OWASP dependency checks - run: mvn dependency-check:check - - name: Build with Maven - run: mvn clean verify -Dgpg.skip - - name: Code coverage with Codecov - uses: codecov/codecov-action@v1 + call-workflow: + uses: 42BV/42-github-workflows/.github/workflows/maven-test.yml@main + with: + java-version: 17 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 71d1c62..3c676ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Upgrades +- Upgraded beanmapper(4.0.0), beanmapper-spring(4.0.0) and spring-boot(2.7.3) dependencies. ## [3.2.0] - 2020-12-16 ### Upgrades diff --git a/owasp-suppressions.xml b/owasp-suppressions.xml index a147960..729c1f8 100644 --- a/owasp-suppressions.xml +++ b/owasp-suppressions.xml @@ -1,8 +1,20 @@ - + + + + ^pkg:maven/org\.springframework\.security/spring-security-crypto@.*$ + CVE-2020-5408 + + + spring-core-5.3.20.jar and spring-tx-5.3.20.jar, waiting for fix from spring + CVE-2016-1000027 + - This is all about lower versions of the springframework. - .*\bspring-security.*-5\.4\.2\.jar - CVE-2018-1258 + Fails due to snakeyaml-1.30, waiting for fix from spring + CVE-2022-38752 + CVE-2022-38750 + CVE-2022-38751 + CVE-2022-38749 + CVE-2022-25857 \ No newline at end of file diff --git a/pom.xml b/pom.xml index c561ffa..5933699 100644 --- a/pom.xml +++ b/pom.xml @@ -56,15 +56,15 @@ UTF-8 UTF-8 - 1.8 - 1.8 + 17 + 17 - 2.4.1 - 3.1.0 - 3.1.0 + 2.7.3 + 4.0.0 + 4.0.0 2.5.3 - 1.9.2 + 1.13.0 @@ -139,7 +139,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.7 + 1.6.8 true sonatype-nexus-staging @@ -150,7 +150,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 2.9.1 + 3.4.1 attach-javadocs @@ -177,7 +177,7 @@ org.apache.maven.plugins maven-source-plugin - 2.2.1 + 3.2.1 attach-sources @@ -190,7 +190,7 @@ org.apache.maven.plugins maven-gpg-plugin - 1.5 + 3.0.1 sign-artifacts @@ -204,7 +204,7 @@ org.jacoco jacoco-maven-plugin - 0.8.6 + 0.8.8 @@ -223,7 +223,7 @@ org.owasp dependency-check-maven - 6.0.3 + 7.1.2 true true diff --git a/src/test/java/io/beanmapper/autoconfigure/BeanMapperAutoConfigTest.java b/src/test/java/io/beanmapper/autoconfigure/BeanMapperAutoConfigTest.java index c072cc5..2e347d1 100644 --- a/src/test/java/io/beanmapper/autoconfigure/BeanMapperAutoConfigTest.java +++ b/src/test/java/io/beanmapper/autoconfigure/BeanMapperAutoConfigTest.java @@ -82,14 +82,14 @@ public void autoconfig_shouldCreateBeanMapper_withDefaultUnproxy_whenEnvIsSet() public void autoconfig_shouldRegisterCollectionHandler_ifScanned() { loadApplicationContext(BEANMAPPER_USE_HIBERNATE_UNPROXY_PROP); BeanMapper mapper = context.getBean(BeanMapper.class); - List customCollectionHandlers = mapper.getConfiguration().getCollectionHandlers() + List customCollectionHandlers = mapper.configuration().getCollectionHandlers() .stream() .filter(handler -> handler.getType().equals(TestEntity.class) || handler.getType().equals(TestEntity2.class)) .collect(toList()); assertEquals(2, customCollectionHandlers.size()); - TestCollectionHandlerWithAppCtx collectionHandler = (TestCollectionHandlerWithAppCtx)mapper.getConfiguration().getCollectionHandlerFor(TestEntity2.class); + TestCollectionHandlerWithAppCtx collectionHandler = (TestCollectionHandlerWithAppCtx)mapper.configuration().getCollectionHandlerFor(TestEntity2.class); assertNotNull(collectionHandler.getApplicationContext()); } @@ -98,7 +98,7 @@ public void autoconfig_shouldSetSecurityChecks() { loadApplicationContext(ConfigWithSecurity.class); BeanMapper mapper = context.getBean(BeanMapper.class); - assertTrue(mapper.getConfiguration().getRoleSecuredCheck() instanceof SpringRoleSecuredCheck); + assertTrue(mapper.configuration().getRoleSecuredCheck() instanceof SpringRoleSecuredCheck); } @@ -108,17 +108,17 @@ public void autoconfig_shouldNotSetSecurityChecks_ifSpringSecurityIsMissingFromC loadApplicationContext(ConfigWithSecurity.class, new NoSpringSecurityClassLoader()); BeanMapper mapper = context.getBean(BeanMapper.class); - assertFalse(mapper.getConfiguration().getRoleSecuredCheck() instanceof SpringRoleSecuredCheck); + assertFalse(mapper.configuration().getRoleSecuredCheck() instanceof SpringRoleSecuredCheck); } @Test public void autoconfig_shouldLoadIdToEntityBeanConverterAndHibernateUnproxy_withSpringDataOnClassPath() { loadApplicationContext(ConfigWithSpringData.class); BeanMapper mapper = context.getBean(BeanMapper.class); - List beanConverters = mapper.getConfiguration().getBeanConverters(); + List beanConverters = mapper.configuration().getBeanConverters(); assertTrue(beanConverters.stream().anyMatch(c -> c instanceof IdToEntityBeanConverter)); - BeanUnproxy unproxyDelegate = (BeanUnproxy) getField(mapper.getConfiguration().getBeanUnproxy(), "delegate"); + BeanUnproxy unproxyDelegate = (BeanUnproxy) getField(mapper.configuration().getBeanUnproxy(), "delegate"); assertTrue(unproxyDelegate instanceof HibernateAwareBeanUnproxy); } @@ -126,10 +126,10 @@ public void autoconfig_shouldLoadIdToEntityBeanConverterAndHibernateUnproxy_with public void autoconfig_shouldNotLoadIdToEntityBeanConverterAndHibernateUnproxy_withoutSpringDataOnClassPath() { loadApplicationContext(ConfigWithSpringData.class, new NoSpringDataClassLoader()); BeanMapper mapper = context.getBean(BeanMapper.class); - List beanConverters = mapper.getConfiguration().getBeanConverters(); + List beanConverters = mapper.configuration().getBeanConverters(); assertFalse(beanConverters.stream().anyMatch(c -> c instanceof IdToEntityBeanConverter)); - BeanUnproxy unproxyDelegate = (BeanUnproxy) getField(mapper.getConfiguration().getBeanUnproxy(), "delegate"); + BeanUnproxy unproxyDelegate = (BeanUnproxy) getField(mapper.configuration().getBeanUnproxy(), "delegate"); assertFalse(unproxyDelegate instanceof HibernateAwareBeanUnproxy); assertTrue(unproxyDelegate instanceof DefaultBeanUnproxy); } @@ -194,7 +194,7 @@ private void assertBeanMapper(int expectedNumberOfPackagePrefixes, int expectedN private void assertBeanMapper(int expectedNumberOfPackagePrefixes, int expectedNumberOfConverters, boolean hibernateUnproxy) { BeanMapper mapper = context.getBean(BeanMapper.class); - io.beanmapper.config.Configuration config = mapper.getConfiguration(); + io.beanmapper.config.Configuration config = mapper.configuration(); assertEquals(expectedNumberOfPackagePrefixes, config.getPackagePrefixes().size()); if (expectedNumberOfPackagePrefixes == 1) { assertEquals("io.beanmapper.autoconfigure", config.getPackagePrefixes().get(0));