Repository navigation
UserFront: upgrade Spring Boot to 2.5.15 to fix spring-expression CVE-2023-20863 - #560
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Author
There was a problem hiding this comment.
🔍 Devin Review: 1 flag
Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
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
Fixes Snyk
SNYK-JAVA-ORGSPRINGFRAMEWORK-5422217/ CVE-2023-20863 (findingsfind-aa6c16b9): SpEL DoS via very long expressions inorg.springframework:spring-expression@4.3.9.RELEASE, which comes in throughspring-boot-starter-webon Boot 1.5.4.Major bump (flagged): the CVE is fixed only in Spring 5.2.24 / 5.3.27 / 6.0.8. Boot 1.5.x is tied to Spring 4.3, so the parent has to move. This PR follows Snyk's upgrade path and uses the smallest Boot release that ships a fixed Spring: Boot 1.5.4.RELEASE -> 2.5.15 (Spring 5.3.27).
java.versionstays1.8.Changes Boot 2 requires:
AppointmentServiceImpl.findAppointment:findOne(id)->findById(id).orElse(null)(Spring Data 2.x API).application.properties:spring.jpa.hibernate.use-new-id-generator-mappings = false, soGenerationType.AUTOids keep using MySQL AUTO_INCREMENT. Without it Hibernate 5.2+ switches to ahibernate_sequencetable, which breaks the existing schema.UserFrontApplicationTests: moved to JUnit 5 (org.junit.jupiter.api.Test,@RunWith(SpringRunner)removed). Boot 2.4+spring-boot-starter-testno longer includes the vintage engine.mysql:mysql-connector-javais still managed by Boot 2.5.x, so the dependency is unchanged.Verification
This session's network only allows git, so Maven Central and api.snyk.io are unreachable. Boot 2.5.15 artifacts aren't in the local
~/.m2. To work around that, I verified a copy of this branch built on the closest cached Boot 2.x parent (2.7.18, Spring 5.3.31). That copy also neededspring.main.allow-circular-references=trueandcom.mysql:mysql-connector-j, both 2.6+/2.7.8+ requirements that 2.5.15 doesn't have.mvn -o package(JDK 17,-source 1.8): BUILD SUCCESS.dependency:treeshowsspring-expression:5.3.31.UserFrontApplicationTests.contextLoadsagainst MySQL 5.7: 1 tests found, 1 successful, 0 failed.GET /index200,POST /signup302, loginPOST /index302 ->/userFront,POST /account/deposit(250) 302,GET /account/primaryAccount200. DB shows balance250.00and aDeposit to Primary Accounttransaction.parsed 20001-char expression (no limit). spring-expression 5.3.31 ->EL1079E: SpEL expression is too long, exceeding the threshold of '10,000' characters.snyk test --file=UserFront/pom.xmlfails withSNYK-CLI-0000because the API is unreachable, so I have no before/after issue counts. Expected: this issue (and the other spring-expression/spring-* issues fixed in 5.3.27) drops off. Please re-run Snyk in CI or locally before merging.Overlap
Devin-Org: engineering
Link to Devin session: https://devin-gtm.devinenterprise.com/sessions/b0217d761d0643ec81afea117118f8a9
Open in Devin Desktop: https://devin-gtm.devinenterprise.com/desktop/session/b0217d761d0643ec81afea117118f8a9?variant=devin
Devin Review