@@ -6,7 +6,7 @@ import semmle.code.java.dataflow.TaintTracking
6
6
import semmle.code.java.frameworks.Networking
7
7
import semmle.code.java.security.Encryption
8
8
import semmle.code.java.security.HttpsUrls
9
- private import semmle.code.java.frameworks.android.Android as Android
9
+ private import semmle.code.java.frameworks.android.Android
10
10
11
11
/** An Android Network Security Configuration XML file. */
12
12
class AndroidNetworkSecurityConfigFile extends XmlFile {
@@ -21,11 +21,11 @@ class AndroidNetworkSecurityConfigFile extends XmlFile {
21
21
}
22
22
23
23
/**
24
- * DEPRECATED. Use `semmle.code.java.frameworks.android.Android::isAndroid ` instead.
24
+ * DEPRECATED. Use `semmle.code.java.frameworks.android.Android::inAndroidApplication ` instead.
25
25
*
26
- * Holds if this database is of an Android application .
26
+ * Holds if this database contains an Android manifest file .
27
27
*/
28
- deprecated predicate isAndroid ( ) { Android :: isAndroid ( ) }
28
+ deprecated predicate isAndroid ( ) { exists ( AndroidManifestXmlFile m ) }
29
29
30
30
/** Holds if the given domain name is trusted by the Network Security Configuration XML file. */
31
31
private predicate trustedDomainViaXml ( string domainName ) {
@@ -127,7 +127,7 @@ private module UntrustedUrlFlow = TaintTracking::Global<UntrustedUrlConfig>;
127
127
128
128
/** Holds if `node` is a network communication call for which certificate pinning is not implemented. */
129
129
predicate missingPinning ( MissingPinningSink node , string domain ) {
130
- Android :: isAndroid ( ) and
130
+ inAndroidApplication ( node . getLocation ( ) . getFile ( ) ) and
131
131
exists ( DataFlow:: Node src | UntrustedUrlFlow:: flow ( src , node ) |
132
132
if trustedDomain ( _) then domain = getDomain ( src .asExpr ( ) ) else domain = ""
133
133
)
0 commit comments