Skip to content

Commit 44b0a2b

Browse files
committed
Android allowBackup query
1 parent 7d15af6 commit 44b0a2b

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/**
2+
* @name Android allowBackup attribute enabled
3+
* @description
4+
* @kind problem
5+
* @problem.severity recommendation
6+
* @security-severity 7.5
7+
* @id java/android/allowBackup-attribute-enabled
8+
* @tags security
9+
* external/cwe/cwe-312
10+
* @precision very-high
11+
*/
12+
13+
import java
14+
import semmle.code.xml.AndroidManifest
15+
16+
from AndroidApplicationXmlElement androidAppElem
17+
where
18+
androidAppElem.allowsBackup() and
19+
androidAppElem.getFile().(AndroidManifestXmlFile).isInBuildDirectory()
20+
select androidAppElem.getAttribute("allowBackup"), "The 'android:allowBackup' attribute is enabled."

0 commit comments

Comments
 (0)