Fix: Build pinned to EOL Spring Boot 2.0.3.RELEASE with known CVEs - #323
Open
WesternConcrete wants to merge 1 commit into
Open
WesternConcrete wants to merge 1 commit into
WesternConcrete wants to merge 1 commit into
Conversation
Replaces the EOL Spring Boot 2.0.3 stack (Spring 5.0.7, Tomcat 8.5.31, jackson 2.9) with a supported line. Includes javax->jakarta migration, springfox->springdoc, rest-assured 5, Flyway plugin 11, and Hibernate 6 compatibility fixes (legacy hibernate_sequence naming, delivery address lat/lng column overrides). Co-Authored-By: Wes Convery <2wconvery@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Vulnerability: Build pinned to EOL Spring Boot 2.0.3.RELEASE with known CVEs (
gradle.properties)Repo: COG-GTM/ftgo-monolith
Fix approach: Move the whole monolith off the 2018 stack onto Spring Boot 3.5.3 (Spring Framework 6.2 / Tomcat 10.1 / Jackson 2.19 / Hibernate 6.6), which closes CVE-2018-15756, CVE-2018-1258 and the embedded-Tomcat / jackson-databind advisories that shipped with 2.0.3.
Version pins (
gradle.properties):What the bump dragged along (all required for Boot 3):
compile/testCompile/runtime→api/testImplementation/runtimeOnly(java-libraryapplied to every subproject so transitive project deps keep the oldcompilesemantics). The Boot BOM is now imported in every subproject viadependencyManagement, so per-module jackson/junit/mysql pins are gone.IntegrationTestsPluginrewritten for the new configuration names /testClassesDirs/outputLocationAPIs.buildSrcuses thegroovyplugin.javax.*→jakarta.*(persistence, servlet, annotation) across the 20 affected classes.CommonSwaggerConfigurationnow exposes aGroupedOpenApibean. Swagger UI is still served at/swagger-ui.html(redirects to/swagger-ui/index.html).com.jayway.restassured→io.restassuredpackage rename.junit-vintage-engine;-parametersadded toJavaCompilebecause Spring 6.1 no longer infers@PathVariablenames from bytecode.spring.jpa.properties.hibernate.id.db_structure_naming_strategy=legacysoConsumer's@GeneratedValue(AUTO) keeps using the singlehibernate_sequencetable instead of a new per-entityconsumers_seq.DeliveryInformationgains@AttributeOverrides forlatitude/longitude→delivery_address_latitude/delivery_address_longitude(the columns V2 migration created; without them Hibernate 6 tried to write toorders.latitude).MoneyModule:ctxt.mappingException(..)(removed in Jackson 2.10+) →ctxt.handleUnexpectedToken(..).flyway-mysql+mysql-connector-jon its classpath);mysql-connector-java→com.mysql:mysql-connector-j;com.mysql.jdbc.Driver→com.mysql.cj.jdbc.DriverinWaitForMySql, docker-compose and test props;ftgo-application/Dockerfilebaseopenjdk:8u171-jre-alpine→eclipse-temurin:17-jre-alpine.Verification
Ran locally with Java 17 against the repo's MySQL container (
docker compose up mysql→waitForMySql→:ftgo-flyway:flywayMigrate):./gradlew build integrationTest– all unit tests,OrderControllerTest(MockMvc), andFtgoApplicationTest(boots the full monolith, creates/revises/cancels/delivers orders over HTTP) pass.ftgo-applicationDocker image, brought it up viadocker compose,/actuator/health= UP,/v3/api-docsand/swagger-ui/index.htmlserve, and./gradlew :ftgo-end-to-end-tests:testpasses against the container.Not done / follow-ups
.circleci/config.ymlusesmachine: true; the image will need Java 17 available for CI to build this.mysql/Dockerfilestill usesmysql:5.7.13; Hibernate 6 logs a warning that 5.7 is below its minimum supported version but everything worked in testing.Link to Devin session: https://app.devin.ai/sessions/4847586dc422449a8d94a58e6fd56967
Open in Devin Desktop: https://app.devin.ai/desktop/session/4847586dc422449a8d94a58e6fd56967?variant=devin
Requested by: @WesternConcrete