Add webview cert validation query

This commit is contained in:
Joe Farebrother
2022-06-17 14:14:58 +01:00
parent a779f0e376
commit 16e16f08dc
2 changed files with 44 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
/**
* @name Android `WebVeiw` that accepts all certificates
* @description Trusting all certificates allows an attacker to perform a machine-in-the-middle attack.
* @kind problem
* @problem.severity error
* @security-severity 7.5
* @precision high
* @id java/improper-webview-certificate-validation
* @tags security
* external/cwe/cwe-295
*/
import java
import semmle.code.java.security.AndroidWebViewCertificateValidationQuery
from OnReceivedSslErrorMethod m
where trustsAllCerts(m)
select m, "This handler accepts all SSL certificates."