File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
lib/semmle/code/java/security Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import java
4
4
import semmle.code.java.security.SensitiveActions
5
+ import semmle.code.xml.AndroidManifest
5
6
6
7
/** An Android Layout XML file. */
7
- class AndroidLayoutXmlFile extends XmlFile {
8
- AndroidLayoutXmlFile ( ) { this .getAbsolutePath ( ) .matches ( "%/res/layout/%.xml" ) }
8
+ private class AndroidLayoutXmlFile extends XmlFile {
9
+ AndroidLayoutXmlFile ( ) { this .getRelativePath ( ) .matches ( "%/res/layout/%.xml" ) }
9
10
}
10
11
11
12
/** An XML element that represents an editable text field. */
12
13
class AndroidEditableXmlElement extends XmlElement {
13
- XmlAttribute inputType ;
14
- XmlAttribute id ;
14
+ AndroidXmlAttribute inputType ;
15
+ AndroidXmlAttribute id ;
15
16
16
17
AndroidEditableXmlElement ( ) {
17
18
this .getFile ( ) instanceof AndroidLayoutXmlFile and
18
19
inputType = this .getAnAttribute ( ) and
19
- inputType .getNamespace ( ) .getPrefix ( ) = "android" and
20
20
inputType .getName ( ) = "inputType" and
21
21
id = this .getAnAttribute ( ) and
22
- id .getNamespace ( ) .getPrefix ( ) = "android" and
23
22
id .getName ( ) = "id"
24
23
}
25
24
Original file line number Diff line number Diff line change 7
7
* @id java/android/sensitive-keyboard-cache
8
8
* @tags security
9
9
* external/cwe/cwe-524
10
- * @precision high
10
+ * @precision medium
11
11
*/
12
12
13
13
import java
You can’t perform that action at this time.
0 commit comments