added predicates in the AndroidManifest library and adjusted tests

This commit is contained in:
Jami Cogswell
2022-08-03 08:58:16 -04:00
parent 229324fde0
commit 6e10fcf519
8 changed files with 94 additions and 13 deletions

View File

@@ -13,9 +13,8 @@
import java
import semmle.code.xml.AndroidManifest
from AndroidXmlAttribute androidXmlAttr
from AndroidApplicationXmlElement androidAppElem
where
androidXmlAttr.getName() = "debuggable" and
androidXmlAttr.getValue() = "true" and
not androidXmlAttr.getLocation().getFile().getRelativePath().matches("%build%")
select androidXmlAttr, "The 'android:debuggable' attribute is enabled."
androidAppElem.isDebuggable() and
not androidAppElem.getFile().isInBuildDirectory()
select androidAppElem.getAttribute("debuggable"), "The 'android:debuggable' attribute is enabled."