mirror of
https://github.com/github/codeql.git
synced 2025-12-21 03:06:31 +01:00
Apply review suggestions
This commit is contained in:
@@ -2,24 +2,23 @@
|
|||||||
|
|
||||||
import java
|
import java
|
||||||
import semmle.code.java.security.SensitiveActions
|
import semmle.code.java.security.SensitiveActions
|
||||||
|
import semmle.code.xml.AndroidManifest
|
||||||
|
|
||||||
/** An Android Layout XML file. */
|
/** An Android Layout XML file. */
|
||||||
class AndroidLayoutXmlFile extends XmlFile {
|
private class AndroidLayoutXmlFile extends XmlFile {
|
||||||
AndroidLayoutXmlFile() { this.getAbsolutePath().matches("%/res/layout/%.xml") }
|
AndroidLayoutXmlFile() { this.getRelativePath().matches("%/res/layout/%.xml") }
|
||||||
}
|
}
|
||||||
|
|
||||||
/** An XML element that represents an editable text field. */
|
/** An XML element that represents an editable text field. */
|
||||||
class AndroidEditableXmlElement extends XmlElement {
|
class AndroidEditableXmlElement extends XmlElement {
|
||||||
XmlAttribute inputType;
|
AndroidXmlAttribute inputType;
|
||||||
XmlAttribute id;
|
AndroidXmlAttribute id;
|
||||||
|
|
||||||
AndroidEditableXmlElement() {
|
AndroidEditableXmlElement() {
|
||||||
this.getFile() instanceof AndroidLayoutXmlFile and
|
this.getFile() instanceof AndroidLayoutXmlFile and
|
||||||
inputType = this.getAnAttribute() and
|
inputType = this.getAnAttribute() and
|
||||||
inputType.getNamespace().getPrefix() = "android" and
|
|
||||||
inputType.getName() = "inputType" and
|
inputType.getName() = "inputType" and
|
||||||
id = this.getAnAttribute() and
|
id = this.getAnAttribute() and
|
||||||
id.getNamespace().getPrefix() = "android" and
|
|
||||||
id.getName() = "id"
|
id.getName() = "id"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
* @id java/android/sensitive-keyboard-cache
|
* @id java/android/sensitive-keyboard-cache
|
||||||
* @tags security
|
* @tags security
|
||||||
* external/cwe/cwe-524
|
* external/cwe/cwe-524
|
||||||
* @precision high
|
* @precision medium
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java
|
import java
|
||||||
|
|||||||
Reference in New Issue
Block a user