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 {
1414 public static final int test10 = 10 ;
1515 public static final int test11 = 11 ;
1616 public static final int test12 = 12 ;
17+ public static final int test13 = 13 ;
18+ public static final int test14 = 14 ;
1719 }
1820
1921 public static final class string {
Original file line number Diff line number Diff line change @@ -60,5 +60,18 @@ void test(String password) {
6060 // GOOD: Visibility of parent set to invisible in XML
6161 EditText test12 = findViewById (R .id .test12 );
6262 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 );
6376 }
6477}
Original file line number Diff line number Diff line change 5050 android : id =" @+id/test12" />
5151 </LinearLayout >
5252
53+ <EditText
54+ android : id =" @id/test13"
55+ android : inputType =" textPassword" />
56+
57+ <EditText
58+ android : id =" @+id/test14"
59+ android : inputType =" textPassword" />
60+
5361</LinearLayout >
You can’t perform that action at this time.
0 commit comments