Skip to content

Commit c09695a

Browse files
committed
Python: Properly handle invoke.task decorator
1 parent 67c5c59 commit c09695a

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

python/ql/src/experimental/semmle/python/frameworks/Invoke.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ private module Invoke {
100100
t.start() and
101101
exists(Function func |
102102
func.getADecorator() = invoke_attr("task").asExpr() and
103-
result.asExpr() = func.getArg(0)
103+
result.(DataFlow::ParameterNode).getParameter() = func.getArg(0)
104104
)
105105
or
106106
exists(DataFlow::TypeTracker t2 | result = instance(t2).track(t2, t))
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +0,0 @@
1-
| invoke_test.py:31:26:31:51 | Comment # $getCommand="cmd1; cmd2" | Missing result:getCommand="cmd1; cmd2" |
2-
| invoke_test.py:38:26:38:51 | Comment # $getCommand="cmd1; cmd2" | Missing result:getCommand="cmd1; cmd2" |

0 commit comments

Comments
 (0)