@@ -13,7 +13,7 @@ import codeql.swift.security.CleartextTransmissionExtensions
13
13
* A taint configuration from sensitive information to expressions that are
14
14
* transmitted over a network.
15
15
*/
16
- class CleartextTransmissionConfig extends TaintTracking:: Configuration {
16
+ deprecated class CleartextTransmissionConfig extends TaintTracking:: Configuration {
17
17
CleartextTransmissionConfig ( ) { this = "CleartextTransmissionConfig" }
18
18
19
19
override predicate isSource ( DataFlow:: Node node ) { node .asExpr ( ) instanceof SensitiveExpr }
@@ -33,3 +33,32 @@ class CleartextTransmissionConfig extends TaintTracking::Configuration {
33
33
isSource ( node )
34
34
}
35
35
}
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