mirror of
https://github.com/github/codeql.git
synced 2026-05-25 00:27:09 +02:00
PS: Gets back the previously-lost false negative by making the variable property name expression the sink when there is a call to 'Invoke'.
This commit is contained in:
@@ -142,9 +142,11 @@ module CommandInjection {
|
||||
class InvokeSink extends Sink {
|
||||
InvokeSink() {
|
||||
exists(InvokeMemberExpr ie |
|
||||
this.asExpr().getExpr() = ie.getCallee() or
|
||||
this.asExpr().getExpr() = ie.getQualifier()
|
||||
)
|
||||
this.asExpr().getExpr() = ie.getCallee()
|
||||
or
|
||||
ie.getAName() = "Invoke" and
|
||||
ie.getQualifier().(MemberExprReadAccess).getMemberExpr() = this.asExpr().getExpr()
|
||||
)
|
||||
}
|
||||
|
||||
override string getSinkType() { result = "call to Invoke" }
|
||||
|
||||
Reference in New Issue
Block a user