Repository navigation
bug: upgrade UserFront to Spring Boot 3.2.11 (spring-web 6.1.14) for CVE-2024-38820 - #483
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 found 1 potential issue.
2 flags not posted on this PR by your GitHub settings — view them 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 code-scan finding
sfind-40d42824/ SNYK-JAVA-ORGSPRINGFRAMEWORK-8230366 (CVE-2024-38820, low):org.springframework:spring-web@4.3.9.RELEASE, pulled in byspring-boot-starter-web@1.5.4.RELEASEinUserFront/pom.xml.Warning
This is a major upgrade, and it changes the Java version (1.8 → 17). The remediation guidance says not to change Java, but no Java 8 fix exists in open source. The only OSS fix is Spring Framework 6.1.14 (5.3.41 is commercial-only), and 6.x needs Java 17. This PR uses the smallest bump that clears the issue: Snyk's own upgrade path, Boot 3.2.11 → spring-web 6.1.14. Reviewers need to approve the Java change, or reject the PR and accept the risk.
Changes: the same Boot 3 / Jakarta migration as open PR #71 (Boot 3.5.16), but pinned to the minimal 3.2.11:
pom.xml: parent1.5.4.RELEASE→3.2.11,java.version1.8→17,mysql:mysql-connector-java→com.mysql:mysql-connector-jjavax.persistence/javax.servlet→jakarta.*(domain entities,RequestFilter)SecurityConfig:WebSecurityConfigurerAdapterremoved →SecurityFilterChainbean +DaoAuthenticationProviderbean. This uses the setter formsetUserDetailsService(...)because the constructor form only exists in Security 6.4+, and Boot 3.2 ships 6.2.@EnableGlobalMethodSecurity→@EnableMethodSecurity, and/error/**/*→/error/**(PathPattern).AppointmentServiceImpl:findOne(id)→findById(id).orElse(null)application.properties:spring.main.allow-circular-references=true(UserServiceImplandAccountServiceImplreference each other) and theMySQL5Dialectline dropped (Hibernate 6 auto-detects the dialect)Duplicates: open PRs #51 (Boot 3.3.5), #71 / #62 / #274 (3.5.16) and #178 (3.5.14) also clear this CVE. Only one Boot 3 migration should land.
Verification
Maven Central and api.snyk.io are blocked in this sandbox, and the Boot 3.2.11 artifacts aren't cached, so I verified against the closest cached Boot 3 line (parent 3.3.4, Spring 6.1.13 / Security 6.3) on JDK 17:
mvn -o compile: OKUserFrontApplicationTests(context load) against MySQL 5.7, run through the JUnit Platform launcher (the surefire provider isn't cached): 1 test found, 1 successful/; loginPOST /index→ 302/userFront; wrong password →/index?error; anonymous/userFront→ 302/index; deposit 250 then withdraw 50 →primary_account.account_balance = 200.00, plus 2primary_transactionrowsSnyk before/after: not measured.
snyk test --file=UserFront/pom.xmlfails with SNYK-CLI-0000 because the network is blocked. Expected result: SNYK-JAVA-ORGSPRINGFRAMEWORK-8230366 goes 1 → 0 (Snyk's own path: Boot 3.2.11 → spring-web 6.1.14). Please re-run the Snyk check on this PR to confirm.Devin-Org: engineering
Link to Devin session: https://devin-gtm.devinenterprise.com/sessions/235dc74945a240e98e0c5ba50303bca1
Open in Devin Desktop: https://devin-gtm.devinenterprise.com/desktop/session/235dc74945a240e98e0c5ba50303bca1?variant=devin