Upgrade Spring Boot to 2.7.18 for known CVEs; document CSRF-disable rationale - #1079
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
…ument CSRF rationale Co-Authored-By: shayan <shayan@cognition.ai>
Author
🤖 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
Addresses the Snyk findings for this repo.
Dependency upgrades (the Snyk Gradle scan itself failed with Maven Central 429, so the runtime classpath was inspected manually via
./gradlew dependencies --configuration runtimeClasspath). The Spring Boot 2.6.3 BOM resolved several versions with well-known CVEs:spring-boot/spring-core/spring-webspring-security-coretomcat-embed-corejackson-databindlogback-classicext['logback.version'])snakeyamlext['snakeyaml.version'])sqlite-jdbc(direct)graphql-java(transitive)Not upgraded (would not be trivial): Spring Boot 3.x (requires Java 17 + Jakarta namespace +
WebSecurityConfigurerAdapterremoval), snakeyaml 2.x (SafeConstructor-only API change; CVE-2022-1471 does not apply to Boot'sSafeConstructorusage), DGS 4.9.21 (kept; tests pass against graphql-java 18.5).Snyk Code finding — [High] CSRF at
WebSecurityConfig.java:38(csrf().disable()): assessed as a false positive, no behavior change. The API is stateless (SessionCreationPolicy.STATELESS), authenticates only via a bearer JWT in theAuthorizationheader and never issues a session cookie, so browsers cannot attach ambient credentials to a cross-site request; CSRF tokens would provide no protection. A comment documenting this rationale was added at the call site.Also fixed a pre-existing
spotlessCheckviolation inDefaultJwtServiceTestso lint passes.Verification:
./gradlew spotlessCheck testpasses (68 tests, 0 failures).snyk testcould not be run (no Snyk CLI /npxon the build machine).Snyk issue IDs addressed: the task provided no numeric Snyk IDs; the single Snyk Code finding was "Cross-Site Request Forgery (CSRF) — WebSecurityConfig.java:38" (documented as accepted/false positive above). Dependency CVEs are listed in the table.
Link to Devin session: https://app.devin.ai/sessions/e18c05886e6047c890d4de6b744c2a96
Open in Devin Desktop: https://app.devin.ai/desktop/session/e18c05886e6047c890d4de6b744c2a96?variant=devin