Skip to content

Commit 5ca6391

Browse files
committed
Python: update call graph test
we also have flow into functions!
1 parent 5a864aa commit 5ca6391

4 files changed

Lines changed: 7 additions & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
| test.py:4:10:4:10 | ControlFlowNode for z | test.py:7:5:7:20 | ControlFlowNode for obfuscated_id() |
2+
| test.py:7:19:7:19 | ControlFlowNode for a | test.py:1:19:1:19 | SSA variable x |

python/ql/test/experimental/dataflow/callGraphConfig.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ class CallGraphConfig extends DataFlow::Configuration {
88

99
override predicate isSource(DataFlow::Node node) {
1010
node instanceof DataFlow::ReturnNode
11+
or
12+
node instanceof DataFlow::ArgumentNode
1113
}
1214

1315
override predicate isSink(DataFlow::Node node) {
1416
node instanceof DataFlow::OutNode
17+
or
18+
node instanceof DataFlow::ParameterNode
1519
}
1620
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
| test.py:1:19:1:19 | SSA variable x |
12
| test.py:7:5:7:20 | ControlFlowNode for obfuscated_id() |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
| test.py:4:10:4:10 | ControlFlowNode for z |
2+
| test.py:7:19:7:19 | ControlFlowNode for a |

0 commit comments

Comments
 (0)