Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9ee5a01

Browse files
committed
Python: Reword comment on isBarrierIn
1 parent cced335 commit 9ee5a01

7 files changed

Lines changed: 28 additions & 14 deletions

File tree

python/ql/test/experimental/dataflow/coverage/argumentRouting1.ql

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ class ArgumentRoutingConfig extends DataFlow::Configuration {
3232
}
3333

3434
/**
35-
* This prevents the argument from one call to reach the sink
36-
* via a different call, by flowing to an argument of that.
35+
* We want to be able to use `arg` in a sequence of calls such as `func(kw=arg); ... ; func(arg)`.
36+
* Use-use flow lets the argument to the first call reach the sink inside the second call,
37+
* making it seem like we handle all cases even if we only handle the last one.
38+
* We make the test honest by preventing flow into source nodes.
3739
*/
3840
override predicate isBarrierIn(DataFlow::Node node) { isSource(node) }
3941
}

python/ql/test/experimental/dataflow/coverage/argumentRouting2.ql

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ class ArgumentRoutingConfig extends DataFlow::Configuration {
2424
}
2525

2626
/**
27-
* This prevents the argument from one call to reach the sink
28-
* via a different call, by flowing to an argument of that.
27+
* We want to be able to use `arg` in a sequence of calls such as `func(kw=arg); ... ; func(arg)`.
28+
* Use-use flow lets the argument to the first call reach the sink inside the second call,
29+
* making it seem like we handle all cases even if we only handle the last one.
30+
* We make the test honest by preventing flow into source nodes.
2931
*/
3032
override predicate isBarrierIn(DataFlow::Node node) { isSource(node) }
3133
}

python/ql/test/experimental/dataflow/coverage/argumentRouting3.ql

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ class ArgumentRoutingConfig extends DataFlow::Configuration {
2424
}
2525

2626
/**
27-
* This prevents the argument from one call to reach the sink
28-
* via a different call, by flowing to an argument of that.
27+
* We want to be able to use `arg` in a sequence of calls such as `func(kw=arg); ... ; func(arg)`.
28+
* Use-use flow lets the argument to the first call reach the sink inside the second call,
29+
* making it seem like we handle all cases even if we only handle the last one.
30+
* We make the test honest by preventing flow into source nodes.
2931
*/
3032
override predicate isBarrierIn(DataFlow::Node node) { isSource(node) }
3133
}

python/ql/test/experimental/dataflow/coverage/argumentRouting4.ql

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ class ArgumentRoutingConfig extends DataFlow::Configuration {
2424
}
2525

2626
/**
27-
* This prevents the argument from one call to reach the sink
28-
* via a different call, by flowing to an argument of that.
27+
* We want to be able to use `arg` in a sequence of calls such as `func(kw=arg); ... ; func(arg)`.
28+
* Use-use flow lets the argument to the first call reach the sink inside the second call,
29+
* making it seem like we handle all cases even if we only handle the last one.
30+
* We make the test honest by preventing flow into source nodes.
2931
*/
3032
override predicate isBarrierIn(DataFlow::Node node) { isSource(node) }
3133
}

python/ql/test/experimental/dataflow/coverage/argumentRouting5.ql

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ class ArgumentRoutingConfig extends DataFlow::Configuration {
2424
}
2525

2626
/**
27-
* This prevents the argument from one call to reach the sink
28-
* via a different call, by flowing to an argument of that.
27+
* We want to be able to use `arg` in a sequence of calls such as `func(kw=arg); ... ; func(arg)`.
28+
* Use-use flow lets the argument to the first call reach the sink inside the second call,
29+
* making it seem like we handle all cases even if we only handle the last one.
30+
* We make the test honest by preventing flow into source nodes.
2931
*/
3032
override predicate isBarrierIn(DataFlow::Node node) { isSource(node) }
3133
}

python/ql/test/experimental/dataflow/coverage/argumentRouting6.ql

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ class ArgumentRoutingConfig extends DataFlow::Configuration {
2424
}
2525

2626
/**
27-
* This prevents the argument from one call to reach the sink
28-
* via a different call, by flowing to an argument of that.
27+
* We want to be able to use `arg` in a sequence of calls such as `func(kw=arg); ... ; func(arg)`.
28+
* Use-use flow lets the argument to the first call reach the sink inside the second call,
29+
* making it seem like we handle all cases even if we only handle the last one.
30+
* We make the test honest by preventing flow into source nodes.
2931
*/
3032
override predicate isBarrierIn(DataFlow::Node node) { isSource(node) }
3133
}

python/ql/test/experimental/dataflow/coverage/argumentRouting7.ql

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ class ArgumentRoutingConfig extends DataFlow::Configuration {
2424
}
2525

2626
/**
27-
* This prevents the argument from one call to reach the sink
28-
* via a different call, by flowing to an argument of that.
27+
* We want to be able to use `arg` in a sequence of calls such as `func(kw=arg); ... ; func(arg)`.
28+
* Use-use flow lets the argument to the first call reach the sink inside the second call,
29+
* making it seem like we handle all cases even if we only handle the last one.
30+
* We make the test honest by preventing flow into source nodes.
2931
*/
3032
override predicate isBarrierIn(DataFlow::Node node) { isSource(node) }
3133
}

0 commit comments

Comments
 (0)