File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed
java/ql/test/query-tests/security/CWE-200/semmle/tests/SensitiveTextView Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ public static final class id {
14
14
public static final int test10 = 10 ;
15
15
public static final int test11 = 11 ;
16
16
public static final int test12 = 12 ;
17
+ public static final int test13 = 13 ;
18
+ public static final int test14 = 14 ;
17
19
}
18
20
19
21
public static final class string {
Original file line number Diff line number Diff line change @@ -60,5 +60,18 @@ void test(String password) {
60
60
// GOOD: Visibility of parent set to invisible in XML
61
61
EditText test12 = findViewById (R .id .test12 );
62
62
test12 .setText (password );
63
+
64
+ // GOOD: Input type set to textPassword in XML
65
+ EditText test13 = findViewById (R .id .test13 );
66
+ test13 .setText (password );
67
+
68
+ test14 = findViewById (R .id .test14 );
69
+ }
70
+
71
+ EditText test14 ;
72
+
73
+ void test2 (String password ) {
74
+ // GOOD: Input type set to textPassword in XML
75
+ test14 .setText (password );
63
76
}
64
77
}
Original file line number Diff line number Diff line change 50
50
android : id =" @+id/test12" />
51
51
</LinearLayout >
52
52
53
+ <EditText
54
+ android : id =" @id/test13"
55
+ android : inputType =" textPassword" />
56
+
57
+ <EditText
58
+ android : id =" @+id/test14"
59
+ android : inputType =" textPassword" />
60
+
53
61
</LinearLayout >
You can’t perform that action at this time.
0 commit comments