Java: Check the value of parameter in WebView file access query

This commit is contained in:
Ed Minnix
2022-11-15 13:50:56 -05:00
parent 10875568ec
commit 013ff79d17

View File

@@ -14,7 +14,9 @@ import java
import semmle.code.java.frameworks.android.WebView
from MethodAccess ma
where ma.getMethod() instanceof CrossOriginAccessMethod
where
ma.getMethod() instanceof CrossOriginAccessMethod and
ma.getArgument(0).(CompileTimeConstantExpr).getBooleanValue() = true
select ma,
"WebView setting " + ma.getMethod().getName() +
" may allow for unauthorized access of sensitive information."