File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
swift/ql/lib/codeql/swift/security Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,25 @@ class CommandInjectionAdditionalFlowStep extends Unit {
29
29
abstract predicate step ( DataFlow:: Node nodeFrom , DataFlow:: Node nodeTo ) ;
30
30
}
31
31
32
+ private class ProcessSink2 extends CommandInjectionSink instanceof DataFlow:: Node {
33
+ ProcessSink2 ( ) {
34
+ exists ( AssignExpr assign , ProcessHost s |
35
+ assign .getDest ( ) = s and
36
+ this .asExpr ( ) = assign .getSource ( )
37
+ )
38
+ or
39
+ exists ( AssignExpr assign , ProcessHost s , ArrayExpr a |
40
+ assign .getDest ( ) = s and
41
+ a = assign .getSource ( ) and
42
+ this .asExpr ( ) = a .getAnElement ( )
43
+ )
44
+ }
45
+ }
46
+
47
+ private class ProcessHost extends MemberRefExpr {
48
+ ProcessHost ( ) { this .getBase ( ) instanceof ProcessRef }
49
+ }
50
+
32
51
/** An expression of type `Process`. */
33
52
private class ProcessRef extends Expr {
34
53
ProcessRef ( ) {
You can’t perform that action at this time.
0 commit comments