Documentation cleanup for allowBackup query

This commit is contained in:
Ed Minnix
2022-09-06 14:35:11 -04:00
parent 0a83cedeb7
commit dca4cd221a
2 changed files with 5 additions and 2 deletions

View File

@@ -74,7 +74,7 @@ class AndroidApplicationXmlElement extends XmlElement {
predicate requiresPermissions() { this.getAnAttribute().(AndroidPermissionXmlAttribute).isFull() }
/**
* Holds if this application element enables the `android:allowBackup` attribute.
* Holds if this application element does not disable the `android:allowBackup` attribute.
*
* https://developer.android.com/guide/topics/data/autobackup
*/

View File

@@ -1,6 +1,6 @@
/**
* @name Android allowBackup attribute enabled
* @description
* @description Android manifests which do not disable the `android:allowBackup` attribute allow backups, which can store sensitive information.
* @kind problem
* @problem.severity recommendation
* @security-severity 7.5
@@ -17,8 +17,11 @@ from AndroidApplicationXmlElement androidAppElem
where
not androidAppElem.getFile().(AndroidManifestXmlFile).isInBuildDirectory() and
(
// explicitly sets android:allowBackup=true
androidAppElem.allowsBackupExplicitly()
or
// Manifest providing the main intent for an application, and does not explicitly
// disallow the allowBackup attribute
androidAppElem.providesMainIntent() and
androidAppElem.allowsBackup()
)