Skip to content

Conversation

@bwappsec
Copy link

snyk-top-banner

Snyk has created this PR to fix 1 vulnerabilities in the maven dependencies of this project.

Snyk changed the following file(s):

  • samples/client/petstore/java/retrofit2-play26/pom.xml

Merge Risk: High

This major version upgrade introduces significant changes, primarily by upgrading its core dependency to OkHttp 4.x and adding a transitive dependency on Kotlin. [4, 5]

While binary compatibility with version 2.x is maintained, the recommended usage pattern has shifted to favor native Kotlin coroutines. [5, 7]

Highlights:

  • API Changes: Developers are encouraged to refactor API interfaces from returning Call<T> to using suspend fun which returns the type directly. [2]
  • Error Handling: Suspend functions now throw HttpException directly for non-2xx responses, requiring changes to error handling logic. [2]
  • Requirements: Retrofit 3.0 requires Java 8+ or Android API 21+. [6]

Source: Release notes
Recommendation: While existing code may not break immediately, a dedicated effort is needed to refactor to the new coroutine-based API to leverage the benefits of this version. Verify compatibility with the new transitive Kotlin and OkHttp 4.x dependencies.

Notice 🤖: This content was generated using artificial intelligence. AI-generated content may contain errors and should be reviewed for accuracy before use.


Vulnerabilities that will be fixed with an upgrade:

Issue Score Upgrade
high severity Improper Certificate Validation
SNYK-JAVA-COMSQUAREUPOKHTTP3-13961111
  125   com.squareup.retrofit2:retrofit:
2.11.0 -> 3.0.0
Major version upgrade No Path Found No Known Exploit

Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • Max score is 1000. Note that the real score may have changed since the PR was raised.
  • This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic


Learn how to fix vulnerabilities with free interactive lessons:

🦉 Learn about vulnerability in an interactive lesson of Snyk Learn.

@bwappsec bwappsec changed the title [Snyk] Security upgrade com.squareup.retrofit2:retrofit from 2.11.0 to 3.0.0 SWI-3723 [Snyk] Security upgrade com.squareup.retrofit2:retrofit from 2.11.0 to 3.0.0 Nov 20, 2025
@bwappsec
Copy link
Author

bwappsec commented Nov 20, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants