Skip to content

Commit dca4cd2

Browse files
committed
Documentation cleanup for allowBackup query
1 parent 0a83ced commit dca4cd2

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

java/ql/lib/semmle/code/xml/AndroidManifest.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class AndroidApplicationXmlElement extends XmlElement {
7474
predicate requiresPermissions() { this.getAnAttribute().(AndroidPermissionXmlAttribute).isFull() }
7575

7676
/**
77-
* Holds if this application element enables the `android:allowBackup` attribute.
77+
* Holds if this application element does not disable the `android:allowBackup` attribute.
7878
*
7979
* https://developer.android.com/guide/topics/data/autobackup
8080
*/

java/ql/src/Security/CWE/CWE-312/AllowBackupAttributeEnabled.ql

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @name Android allowBackup attribute enabled
3-
* @description
3+
* @description Android manifests which do not disable the `android:allowBackup` attribute allow backups, which can store sensitive information.
44
* @kind problem
55
* @problem.severity recommendation
66
* @security-severity 7.5
@@ -17,8 +17,11 @@ from AndroidApplicationXmlElement androidAppElem
1717
where
1818
not androidAppElem.getFile().(AndroidManifestXmlFile).isInBuildDirectory() and
1919
(
20+
// explicitly sets android:allowBackup=true
2021
androidAppElem.allowsBackupExplicitly()
2122
or
23+
// Manifest providing the main intent for an application, and does not explicitly
24+
// disallow the allowBackup attribute
2225
androidAppElem.providesMainIntent() and
2326
androidAppElem.allowsBackup()
2427
)

0 commit comments

Comments
 (0)