@@ -6,7 +6,7 @@ import semmle.code.java.dataflow.TaintTracking
66import semmle.code.java.frameworks.Networking
77import semmle.code.java.security.Encryption
88import 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
1010
1111/** An Android Network Security Configuration XML file. */
1212class AndroidNetworkSecurityConfigFile extends XmlFile {
@@ -21,11 +21,11 @@ class AndroidNetworkSecurityConfigFile extends XmlFile {
2121}
2222
2323/**
24- * DEPRECATED. Use `semmle.code.java.frameworks.android.Android::isAndroid ` instead.
24+ * DEPRECATED. Use `semmle.code.java.frameworks.android.Android::inAndroidApplication ` instead.
2525 *
26- * Holds if this database is of an Android application .
26+ * Holds if this database contains an Android manifest file .
2727 */
28- deprecated predicate isAndroid ( ) { Android :: isAndroid ( ) }
28+ deprecated predicate isAndroid ( ) { exists ( AndroidManifestXmlFile m ) }
2929
3030/** Holds if the given domain name is trusted by the Network Security Configuration XML file. */
3131private predicate trustedDomainViaXml ( string domainName ) {
@@ -127,7 +127,7 @@ private module UntrustedUrlFlow = TaintTracking::Global<UntrustedUrlConfig>;
127127
128128/** Holds if `node` is a network communication call for which certificate pinning is not implemented. */
129129predicate missingPinning ( MissingPinningSink node , string domain ) {
130- Android :: isAndroid ( ) and
130+ inAndroidApplication ( node . getLocation ( ) . getFile ( ) ) and
131131 exists ( DataFlow:: Node src | UntrustedUrlFlow:: flow ( src , node ) |
132132 if trustedDomain ( _) then domain = getDomain ( src .asExpr ( ) ) else domain = ""
133133 )
0 commit comments