mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Android allowBackup query
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* @name Android allowBackup attribute enabled
|
||||
* @description
|
||||
* @kind problem
|
||||
* @problem.severity recommendation
|
||||
* @security-severity 7.5
|
||||
* @id java/android/allowBackup-attribute-enabled
|
||||
* @tags security
|
||||
* external/cwe/cwe-312
|
||||
* @precision very-high
|
||||
*/
|
||||
|
||||
import java
|
||||
import semmle.code.xml.AndroidManifest
|
||||
|
||||
from AndroidApplicationXmlElement androidAppElem
|
||||
where
|
||||
androidAppElem.allowsBackup() and
|
||||
androidAppElem.getFile().(AndroidManifestXmlFile).isInBuildDirectory()
|
||||
select androidAppElem.getAttribute("allowBackup"), "The 'android:allowBackup' attribute is enabled."
|
||||
Reference in New Issue
Block a user