mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
updated location part of query to use abs path and /build
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
* @description An enabled debugger can allow for entry points in the application or reveal sensitive information.
|
||||
* @kind problem
|
||||
* @problem.severity warning
|
||||
* @security-severity 7.2
|
||||
* @id java/android/debuggable-attribute-enabled
|
||||
* @tags security
|
||||
* external/cwe/cwe-489
|
||||
* @precision very-high
|
||||
* @security-severity 0.1
|
||||
*/
|
||||
|
||||
import java
|
||||
@@ -17,5 +17,8 @@ from AndroidXmlAttribute androidXmlAttr
|
||||
where
|
||||
androidXmlAttr.getName() = "debuggable" and
|
||||
androidXmlAttr.getValue() = "true" and
|
||||
not androidXmlAttr.getLocation().toString().matches("%/build/%")
|
||||
not androidXmlAttr.getLocation().getFile().getAbsolutePath().matches("%/build%") // USE THIS (from speaking with Tony) - 11 MRVA results
|
||||
//not androidXmlAttr.getLocation().toString().matches("%build%") // my original query - 2 MRVA results
|
||||
//not androidXmlAttr.getLocation().toString().matches("%/build%") // 11 MRVA results
|
||||
//not androidXmlAttr.getLocation().getFile().getAbsolutePath().matches("%build%") // 2 MRVA results...
|
||||
select androidXmlAttr, "The 'debuggable' attribute is enabled."
|
||||
|
||||
Reference in New Issue
Block a user