Skip to content

Commit 54470c7

Browse files
Jami CogswellJami Cogswell
authored andcommitted
updated location part of query to use abs path and /build
1 parent 54acd0e commit 54470c7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

java/ql/src/Security/CWE/CWE-489/DebuggableAttributeTrue.ql

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
* @description An enabled debugger can allow for entry points in the application or reveal sensitive information.
44
* @kind problem
55
* @problem.severity warning
6+
* @security-severity 7.2
67
* @id java/android/debuggable-attribute-enabled
78
* @tags security
89
* external/cwe/cwe-489
910
* @precision very-high
10-
* @security-severity 0.1
1111
*/
1212

1313
import java
@@ -17,5 +17,8 @@ from AndroidXmlAttribute androidXmlAttr
1717
where
1818
androidXmlAttr.getName() = "debuggable" and
1919
androidXmlAttr.getValue() = "true" and
20-
not androidXmlAttr.getLocation().toString().matches("%/build/%")
20+
not androidXmlAttr.getLocation().getFile().getAbsolutePath().matches("%/build%") // USE THIS (from speaking with Tony) - 11 MRVA results
21+
//not androidXmlAttr.getLocation().toString().matches("%build%") // my original query - 2 MRVA results
22+
//not androidXmlAttr.getLocation().toString().matches("%/build%") // 11 MRVA results
23+
//not androidXmlAttr.getLocation().getFile().getAbsolutePath().matches("%build%") // 2 MRVA results...
2124
select androidXmlAttr, "The 'debuggable' attribute is enabled."

0 commit comments

Comments
 (0)