Skip to content

Commit d48a713

Browse files
Fixing cutom edges predicate
1 parent 681e6a9 commit d48a713

1 file changed

Lines changed: 26 additions & 1 deletion

File tree

csharp/ql/src/experimental/Security Features/backdoor/PotentialTimeBomb.ql

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,32 @@
1111

1212
import csharp
1313
import DataFlow
14-
import DataFlow::PathGraph
14+
15+
query predicate nodes = PathGraph::nodes/3;
16+
17+
query predicate edges(DataFlow::PathNode a, DataFlow::PathNode b) {
18+
PathGraph::edges(a, b)
19+
or
20+
exists(
21+
FlowsFromGetLastWriteTimeConfigToTimeSpanArithmeticCallable conf1,
22+
FlowsFromTimeSpanArithmeticToTimeComparisonCallable conf2
23+
|
24+
conf1 = a.getConfiguration() and
25+
conf1.isSink(a.getNode()) and
26+
conf2 = b.getConfiguration() and
27+
b.isSource()
28+
)
29+
or
30+
exists(
31+
FlowsFromTimeSpanArithmeticToTimeComparisonCallable conf1,
32+
FlowsFromTimeComparisonCallableToSelectionStatementCondition conf2
33+
|
34+
conf1 = a.getConfiguration() and
35+
conf1.isSink(a.getNode()) and
36+
conf2 = b.getConfiguration() and
37+
b.isSource()
38+
)
39+
}
1540

1641
/**
1742
* Class that will help to find the source for the trigger file-modification date.

0 commit comments

Comments
 (0)