Electric-Coin-Company / zcash-android-wallet-sdk

Native Android SDK for Zcash
MIT License
5 stars 9 forks source link

[SDK audit] Recommendations: 4.2.1 (SDK) Make it obvious that plaintext connections are not possible in production releases #1453

Open HonzaR opened 4 months ago

HonzaR commented 4 months ago

Is your feature request related to a problem? Please describe.

The following code from ChannelFactory.kt within the SDK is used to determine whether the connection to lightwalletd will be plaintext or TLS.

Describe the solution you'd like

Screenshot 2024-04-23 at 13 33 19

As an added safeguard, the branch of code that uses a plaintext connection should additionally check that the app was built for testing or debugging, i.e. that it is not a production release of the app. By adding a check to the code here, it will be more obvious that the released app can never use an insecure connection.

Alternatives you've considered

Additional context