Skip to content

Commit d3a9a5e

Browse files
atorralbasmowton
andauthored
Update go/ql/lib/semmle/go/frameworks/AwsLambda.qll
Co-authored-by: Chris Smowton <[email protected]>
1 parent 1d7dbec commit d3a9a5e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

go/ql/lib/semmle/go/frameworks/AwsLambda.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ private class LambdaInput extends UntrustedFlowSource::Range {
1818

1919
private class HandlerFunction extends FuncDef {
2020
HandlerFunction() {
21-
exists(StartOrNewHandlerFunction f, Expr e |
22-
f.getACall().getArgument(f.getHandlerArgPos()).asExpr() = e
21+
exists(StartOrNewHandlerFunction f, DataFlow::Node handlerArg |
22+
f.getACall().getArgument(f.getHandlerArgPos()) = handlerArg
2323
|
24-
this = e.(FunctionName).getTarget().getFuncDecl() or
25-
this = e.(FuncLit)
24+
handlerArg = this.(FuncDecl).getFunction().getARead() or
25+
handlerArg = DataFlow::exprNode(this.(FuncLit))
2626
)
2727
or
2828
this = any(Method m | m.implements(awsLambdaPkg(), "Handler", "Invoke")).getFuncDecl()

0 commit comments

Comments
 (0)