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

Co-authored-by: Chris Smowton <smowton@github.com>
This commit is contained in:
Tony Torralba
2024-01-19 10:44:49 +01:00
parent 9a0fb39382
commit 8d6aa281b9

View File

@@ -27,9 +27,9 @@ private class HandlerFunction extends FuncDef {
or
this = any(Method m | m.implements(awsLambdaPkg(), "Handler", "Invoke")).getFuncDecl()
or
exists(ConversionExpr ce |
ce.getTypeExpr().getType() instanceof HandlerImpl and
this = ce.getOperand().(FunctionName).getTarget().getFuncDecl()
exists(DataFlow::TypeCastNode typeCast |
typeCast.getResultType() instanceof HandlerImpl and
this.(FuncDecl).getFunction().getARead() = typeCast.getOperand()
)
}
}