openkit-java icon indicating copy to clipboard operation
openkit-java copied to clipboard

TrustAllX509TrustManager android lint warning SSLBlindTrustManager

Open antoni-sgz-tw opened this issue 1 year ago • 3 comments

Environment

  • Android Studio Chipmunk | 2021.2.1 Patch 2
  • openkit-java v2.2.0

Problem warning [TrustAllX509TrustManager](https://github.com/Dynatrace/openkit-java/issues/new#TrustAllX509TrustManager): Insecure TLS/SSL trust manager

Insecure TLS/SSL trust manager [../../com/dynatrace/openkit/protocol/ssl/SSLBlindTrustManager%24BlindX509TrustManager.class](https://github.com/Dynatrace/com/dynatrace/openkit/protocol/ssl/SSLBlindTrustManager%24BlindX509TrustManager.class): checkClientTrusted is empty, which could cause insecure network traffic due to trusting arbitrary TLS/SSL certificates presented by peers [../../com/dynatrace/openkit/protocol/ssl/SSLBlindTrustManager%24BlindX509TrustManager.class](https://github.com/Dynatrace/com/dynatrace/openkit/protocol/ssl/SSLBlindTrustManager%24BlindX509TrustManager.class): checkServerTrusted is empty, which could cause insecure network traffic due to trusting arbitrary TLS/SSL certificates presented by peers

Steps to reproduce

  • Run lintDebug Gradle task ./gradlew lintDebug

antoni-sgz-tw avatar Sep 13 '22 16:09 antoni-sgz-tw

The SSLBlindTrustManager only exists for debugging purpose. We know that this Manager is insecure, but its main purpose is to exclude certificate problems (if there are any). Per default this manager is not in use.

Do you expect us to ignore those lint warnings?

TheHighriser avatar Sep 14 '22 05:09 TheHighriser

If possible yes.

To work around provisionally I ignored the warning in the lint.xml file <?xml version="1.0" encoding="UTF-8"?> <lint> <issue id="TrustAllX509TrustManager" severity="ignore"> <ignore path="*/com/dynatrace" /> </issue> </lint>

antoni-sgz-tw avatar Sep 14 '22 13:09 antoni-sgz-tw

We will try to take care of it with the next release.

TheHighriser avatar Sep 23 '22 05:09 TheHighriser