Commit 0024b09
Fix CodeQL: remove trust-all TrustManager (CWE-295)
- Remove TRUST_ALL X509TrustManager that accepted any server certificate
- buildSslSocketFactory now throws MtlsMsiException if insecure=true is passed
- Pass null TrustManagers to SSLContext.init() so JVM default trust store is used
- Remove unused TrustManager and X509TrustManager imports
Resolves GitHub Advanced Security CodeQL alert:
'TrustManager that accepts all certificates' (High)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent b62934a commit 0024b09
1 file changed
Lines changed: 4 additions & 11 deletions
Lines changed: 4 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | | - | |
15 | 13 | | |
16 | 14 | | |
17 | 15 | | |
| |||
191 | 189 | | |
192 | 190 | | |
193 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
194 | 195 | | |
195 | 196 | | |
196 | 197 | | |
197 | | - | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
| 201 | + | |
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | 233 | | |
241 | 234 | | |
242 | 235 | | |
| |||
0 commit comments