From 3767f9c413d20bbdf1f374af937db523db73d9fa Mon Sep 17 00:00:00 2001 From: LeanBitLab Date: Sun, 15 Nov 2026 23:08:47 +0530 Subject: [PATCH] fix(network): pin fixed hosts to system CAs and HTTPS The base config trusts user-installed CAs and allows cleartext for every request, including API keys and downloads sent to fixed hosts. Custom AI endpoints are entered at runtime (Ollama, LM Studio, private CAs), so the base config stays open for them. Add a domain-config for the hosts the app contacts by itself (groq.com, googleapis.com, openai.com, huggingface.co, hf.co, github.com, githubusercontent.com, codeberg.org, google.com) that allows HTTPS only, with system CAs only. Debug builds keep user CAs. Suppress the two lint warnings for the base config with a reason. --- .../main/res/xml/network_security_config.xml | 37 +++++++++++++++++-- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/app/src/main/res/xml/network_security_config.xml b/app/src/main/res/xml/network_security_config.xml index 4d5bef7d4..e26c0577e 100644 --- a/app/src/main/res/xml/network_security_config.xml +++ b/app/src/main/res/xml/network_security_config.xml @@ -1,10 +1,41 @@ - - - + + + + + + + groq.com + googleapis.com + openai.com + huggingface.co + hf.co + github.com + githubusercontent.com + codeberg.org + google.com + + + + + + + + + + + +