@@ -13,7 +13,7 @@ import codeql.swift.security.CleartextTransmissionExtensions
1313 * A taint configuration from sensitive information to expressions that are
1414 * transmitted over a network.
1515 */
16- class CleartextTransmissionConfig extends TaintTracking:: Configuration {
16+ deprecated class CleartextTransmissionConfig extends TaintTracking:: Configuration {
1717 CleartextTransmissionConfig ( ) { this = "CleartextTransmissionConfig" }
1818
1919 override predicate isSource ( DataFlow:: Node node ) { node .asExpr ( ) instanceof SensitiveExpr }
@@ -33,3 +33,32 @@ class CleartextTransmissionConfig extends TaintTracking::Configuration {
3333 isSource ( node )
3434 }
3535}
36+
37+ /**
38+ * A taint configuration from sensitive information to expressions that are
39+ * transmitted over a network.
40+ */
41+ module CleartextTransmissionConfig implements DataFlow:: ConfigSig {
42+ predicate isSource ( DataFlow:: Node node ) { node .asExpr ( ) instanceof SensitiveExpr }
43+
44+ predicate isSink ( DataFlow:: Node node ) { node instanceof CleartextTransmissionSink }
45+
46+ predicate isBarrier ( DataFlow:: Node sanitizer ) {
47+ sanitizer instanceof CleartextTransmissionSanitizer
48+ }
49+
50+ predicate isAdditionalFlowStep ( DataFlow:: Node nodeFrom , DataFlow:: Node nodeTo ) {
51+ any ( CleartextTransmissionAdditionalTaintStep s ) .step ( nodeFrom , nodeTo )
52+ }
53+
54+ predicate isBarrierIn ( DataFlow:: Node node ) {
55+ // make sources barriers so that we only report the closest instance
56+ isSource ( node )
57+ }
58+ }
59+
60+ /**
61+ * Detect taint flow of sensitive information to expressions that are transmitted over
62+ * a network.
63+ */
64+ module CleartextTransmissionFlow = TaintTracking:: Global< CleartextTransmissionConfig > ;
0 commit comments