mirror of
https://github.com/github/codeql.git
synced 2026-04-27 09:45:15 +02:00
Fix sink
This commit is contained in:
@@ -29,6 +29,25 @@ class CommandInjectionAdditionalFlowStep extends Unit {
|
||||
abstract predicate step(DataFlow::Node nodeFrom, DataFlow::Node nodeTo);
|
||||
}
|
||||
|
||||
private class ProcessSink2 extends CommandInjectionSink instanceof DataFlow::Node {
|
||||
ProcessSink2() {
|
||||
exists(AssignExpr assign, ProcessHost s |
|
||||
assign.getDest() = s and
|
||||
this.asExpr() = assign.getSource()
|
||||
)
|
||||
or
|
||||
exists(AssignExpr assign, ProcessHost s, ArrayExpr a |
|
||||
assign.getDest() = s and
|
||||
a = assign.getSource() and
|
||||
this.asExpr() = a.getAnElement()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private class ProcessHost extends MemberRefExpr {
|
||||
ProcessHost() { this.getBase() instanceof ProcessRef }
|
||||
}
|
||||
|
||||
/** An expression of type `Process`. */
|
||||
private class ProcessRef extends Expr {
|
||||
ProcessRef() {
|
||||
|
||||
Reference in New Issue
Block a user