@@ -10,32 +10,39 @@ private import codeql.rust.dataflow.DataFlow
1010private import codeql.rust.dataflow.FlowSink
1111
1212/**
13- * A data flow sink for cleartext transmission vulnerabilities. That is,
14- * a `DataFlow::Node` of something that is transmitted over a network.
13+ * Provides default sources, sinks and barriers for detecting cleartext
14+ * transmission vulnerabilities, as well as extension points for adding your
15+ * own.
1516 */
16- abstract class CleartextTransmissionSink extends QuerySink:: Range {
17- override string getSinkType ( ) { result = "CleartextTransmission" }
18- }
17+ module CleartextTransmission {
18+ /**
19+ * A data flow sink for cleartext transmission vulnerabilities. That is,
20+ * a `DataFlow::Node` of something that is transmitted over a network.
21+ */
22+ abstract class Sink extends QuerySink:: Range {
23+ override string getSinkType ( ) { result = "CleartextTransmission" }
24+ }
1925
20- /**
21- * A barrier for cleartext transmission vulnerabilities.
22- */
23- abstract class CleartextTransmissionBarrier extends DataFlow:: Node { }
26+ /**
27+ * A barrier for cleartext transmission vulnerabilities.
28+ */
29+ abstract class Barrier extends DataFlow:: Node { }
2430
25- /**
26- * A unit class for adding additional flow steps.
27- */
28- class CleartextTransmissionAdditionalFlowStep extends Unit {
2931 /**
30- * Holds if the step from `node1` to `node2` should be considered a flow
31- * step for paths related to cleartext transmission vulnerabilities.
32+ * A unit class for adding additional flow steps.
3233 */
33- abstract predicate step ( DataFlow:: Node nodeFrom , DataFlow:: Node nodeTo ) ;
34- }
34+ class AdditionalFlowStep extends Unit {
35+ /**
36+ * Holds if the step from `node1` to `node2` should be considered a flow
37+ * step for paths related to cleartext transmission vulnerabilities.
38+ */
39+ abstract predicate step ( DataFlow:: Node nodeFrom , DataFlow:: Node nodeTo ) ;
40+ }
3541
36- /**
37- * A sink defined through MaD.
38- */
39- private class MadCleartextTransmissionSink extends CleartextTransmissionSink {
40- MadCleartextTransmissionSink ( ) { sinkNode ( this , "transmission" ) }
42+ /**
43+ * A sink defined through MaD.
44+ */
45+ private class ModelsAsDataSink extends Sink {
46+ ModelsAsDataSink ( ) { sinkNode ( this , "transmission" ) }
47+ }
4148}
0 commit comments