Skip to content

Commit 7d15af6

Browse files
committed
Add allowBackup check to AndroidManifest
1 parent dac64ee commit 7d15af6

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,17 @@ class AndroidApplicationXmlElement extends XmlElement {
7272
* Holds if this application element has explicitly set a value for its `android:permission` attribute.
7373
*/
7474
predicate requiresPermissions() { this.getAnAttribute().(AndroidPermissionXmlAttribute).isFull() }
75+
76+
/**
77+
* Holds if this application element has the attribute `android:allowBackup` set to `true`.
78+
*/
79+
predicate allowsBackup() {
80+
exists(AndroidXmlAttribute attr |
81+
this.getAnAttribute() = attr and
82+
attr.getName() = "allowBackup" and
83+
attr.getValue() = "true"
84+
)
85+
}
7586
}
7687

7788
/**

0 commit comments

Comments
 (0)