File tree Expand file tree Collapse file tree 4 files changed +35
-0
lines changed
java/ql/test/query-tests/security/CWE-489/webview-debugging Expand file tree Collapse file tree 4 files changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ import android .webkit .WebView ;
2
+
3
+ class Test {
4
+ boolean DEBUG_BUILD ;
5
+
6
+ void test1 () {
7
+ WebView .setWebContentsDebuggingEnabled (true ); // $hasValueFlow
8
+ }
9
+
10
+ void test2 (){
11
+ if (DEBUG_BUILD ) {
12
+ WebView .setWebContentsDebuggingEnabled (true );
13
+ }
14
+ }
15
+
16
+ void test3 (boolean enabled ){
17
+ WebView .setWebContentsDebuggingEnabled (enabled ); // $hasValueFlow
18
+ }
19
+
20
+ void test4 (){
21
+ test3 (true );
22
+ }
23
+ }
Original file line number Diff line number Diff line change
1
+ import java
2
+ import TestUtilities.InlineFlowTest
3
+ import semmle.code.java.security.WebviewDubuggingEnabledQuery
4
+
5
+ class HasFlowTest extends InlineFlowTest {
6
+ override DataFlow:: Configuration getTaintFlowConfig ( ) { none ( ) }
7
+
8
+ override DataFlow:: Configuration getValueFlowConfig ( ) {
9
+ result = any ( WebviewDebugEnabledConfig c )
10
+ }
11
+ }
Original file line number Diff line number Diff line change
1
+ //semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/google-android-9.0.0
You can’t perform that action at this time.
0 commit comments