Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix security issue SNYK-JAVA-COMGOOGLECODEGSON-1730327 by upgrading gson lib #1860

Conversation

marko-asplund
Copy link

@marko-asplund marko-asplund commented Jan 1, 2022

📜 Description

Upgrade com.google.code.gson:gson library to v2.8.9.

💡 Motivation and Context

Snyk scan for my service reports the following vulnerability:

  ✗ Deserialization of Untrusted Data [High Severity][https://snyk.io/vuln/SNYK-JAVA-COMGOOGLECODEGSON-1730327] in com.google.code.gson:gson@2.8.5
    introduced by com.foo:barlib_2.13@0.1.0-SNAPSHOT > io.sentry:sentry@5.1.2 > com.google.code.gson:gson@2.8.5 and 2 other path(s)
  This issue was fixed in versions: 2.8.9

Address this issue by upgrading com.google.code.gson:gson to v2.8.9.

💚 How did you test it?

📝 Checklist

  • I reviewed the submitted code
  • I added tests to verify the changes
  • I updated the docs if needed
  • No breaking changes

🔮 Next steps

@marko-asplund
Copy link
Author

marko-asplund commented Jan 1, 2022

Could you please check if issue google/gson#1597 mentioned in buildSrc/src/main/java/Config.kt is still valid?

@romtsn
Copy link
Member

romtsn commented Jan 3, 2022

Thanks for the PR, but we just got rid of the Gson dependency in the version 6.+, which makes this PR obsolete

@romtsn romtsn closed this Jan 3, 2022
@marko-asplund
Copy link
Author

marko-asplund commented Jan 4, 2022

Thanks for the PR, but we just got rid of the Gson dependency in the version 6.+, which makes this PR obsolete

Looks like 6.0.0 alpha 1 is the latest release in v6 branch and was released back in 2021-11-23, but many organisations aren't allowed to upgrade to early alpha releases.
So, even if this PR would be considered obsolete, for many Sentry Java SDK users the underlying issue is not resolved.
Is there an ETA for a stable release?
Or in the meantime is there a workaround apart from excluding Sentry Java SDK from Snyk scanning entirely?

@romtsn
Copy link
Member

romtsn commented Jan 4, 2022

no ETA for stable, but should be pretty soon afaik.

The workaround is to force gson version to 2.8.9 in your build config (it's easy to do with Gradle and Maven for sure). Since it's a patch version diff, there should not be any binary incompatibility, so not runtime exceptions.

@bruno-garcia
Copy link
Member

Thanks for the PR, but we just got rid of the Gson dependency in the version 6.+, which makes this PR obsolete

Looks like 6.0.0 alpha 1 is the latest release in v6 branch and was released back in 2021-11-23, but many organisations aren't allowed to upgrade to early alpha releases. So, even if this PR would be considered obsolete, for many Sentry Java SDK users the underlying issue is not resolved. Is there an ETA for a stable release? Or in the meantime is there a workaround apart from excluding Sentry Java SDK from Snyk scanning entirely?

Would you be able to bump to the latest and at least run through your CI pipeline and test locally to give us some feedback?
We expect to get this moving quickly now, the biggest reason for delay is the little feedback we had so far about the release

@marko-asplund marko-asplund deleted the SNYK-JAVA-COMGOOGLECODEGSON-1730327 branch January 15, 2022 19:06
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