mirror of
https://github.com/github/codeql.git
synced 2026-05-02 20:25:13 +02:00
Merge pull request #10637 from egregius313/egregius313/android-misconfigured-contentprovider
Android ContentProvider Incomplete Permissions
This commit is contained in:
@@ -180,6 +180,17 @@ class AndroidProviderXmlElement extends AndroidComponentXmlElement {
|
||||
attr.getValue() = "true"
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if the provider element is only protected by either `android:readPermission` or `android:writePermission`.
|
||||
*/
|
||||
predicate hasIncompletePermissions() {
|
||||
(
|
||||
this.getAnAttribute().(AndroidPermissionXmlAttribute).isWrite() or
|
||||
this.getAnAttribute().(AndroidPermissionXmlAttribute).isRead()
|
||||
) and
|
||||
not this.requiresPermissions()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user