Skip to content

Commit ff78c45

Browse files
committed
Rust: Abstractions then implementations.
1 parent 47ee6c6 commit ff78c45

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

rust/ql/lib/codeql/rust/security/regex/RegexInjectionExtensions.qll

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,17 @@ module RegexInjection {
3232
*/
3333
abstract class Barrier extends DataFlow::Node { }
3434

35+
/**
36+
* A unit class for adding additional flow steps.
37+
*/
38+
class AdditionalFlowStep extends Unit {
39+
/**
40+
* Holds if the step from `node1` to `node2` should be considered a flow
41+
* step for paths related to regular expression injection vulnerabilities.
42+
*/
43+
abstract predicate step(DataFlow::Node node1, DataFlow::Node node2);
44+
}
45+
3546
/**
3647
* An active threat-model source, considered as a flow source.
3748
*/
@@ -59,17 +70,6 @@ module RegexInjection {
5970
ModelsAsDataSink() { sinkNode(this, "regex-use") }
6071
}
6172

62-
/**
63-
* A unit class for adding additional flow steps.
64-
*/
65-
class AdditionalFlowStep extends Unit {
66-
/**
67-
* Holds if the step from `node1` to `node2` should be considered a flow
68-
* step for paths related to regular expression injection vulnerabilities.
69-
*/
70-
abstract predicate step(DataFlow::Node node1, DataFlow::Node node2);
71-
}
72-
7373
/**
7474
* An escape barrier for regular expression injection vulnerabilities.
7575
*/

0 commit comments

Comments
 (0)