Skip to content

Commit 013ff79

Browse files
committed
Java: Check the value of parameter in WebView file access query
1 parent 1087556 commit 013ff79

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

java/ql/src/Security/CWE/CWE-200/AndroidWebViewSettingsFileAccess.ql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ import java
1414
import semmle.code.java.frameworks.android.WebView
1515

1616
from MethodAccess ma
17-
where ma.getMethod() instanceof CrossOriginAccessMethod
17+
where
18+
ma.getMethod() instanceof CrossOriginAccessMethod and
19+
ma.getArgument(0).(CompileTimeConstantExpr).getBooleanValue() = true
1820
select ma,
1921
"WebView setting " + ma.getMethod().getName() +
2022
" may allow for unauthorized access of sensitive information."

0 commit comments

Comments
 (0)