Skip to content

Commit f48b57c

Browse files
Apply review suggestions
1 parent e6dd367 commit f48b57c

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

java/ql/lib/semmle/code/java/security/SensitiveKeyboardCacheQuery.qll

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,23 @@
22

33
import java
44
import semmle.code.java.security.SensitiveActions
5+
import semmle.code.xml.AndroidManifest
56

67
/** 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") }
910
}
1011

1112
/** An XML element that represents an editable text field. */
1213
class AndroidEditableXmlElement extends XmlElement {
13-
XmlAttribute inputType;
14-
XmlAttribute id;
14+
AndroidXmlAttribute inputType;
15+
AndroidXmlAttribute id;
1516

1617
AndroidEditableXmlElement() {
1718
this.getFile() instanceof AndroidLayoutXmlFile and
1819
inputType = this.getAnAttribute() and
19-
inputType.getNamespace().getPrefix() = "android" and
2020
inputType.getName() = "inputType" and
2121
id = this.getAnAttribute() and
22-
id.getNamespace().getPrefix() = "android" and
2322
id.getName() = "id"
2423
}
2524

java/ql/src/Security/CWE/CWE-524/SensitiveKeyboardCache.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @id java/android/sensitive-keyboard-cache
88
* @tags security
99
* external/cwe/cwe-524
10-
* @precision high
10+
* @precision medium
1111
*/
1212

1313
import java

0 commit comments

Comments
 (0)