File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed
lib/codeql/ruby/frameworks
test/library-tests/frameworks/railties Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ module Railties {
43
43
44
44
override DataFlow:: Node getAnArgument ( ) { result = this .getArgument ( [ 0 , 1 ] ) }
45
45
46
- override predicate isShellInterpreted ( DataFlow:: Node arg ) { any ( ) }
46
+ override predicate isShellInterpreted ( DataFlow:: Node arg ) { arg = this . getAnArgument ( ) }
47
47
}
48
48
49
49
/**
@@ -57,6 +57,6 @@ module Railties {
57
57
58
58
override DataFlow:: Node getAnArgument ( ) { result = this .getArgument ( 0 ) }
59
59
60
- override predicate isShellInterpreted ( DataFlow:: Node arg ) { any ( ) }
60
+ override predicate isShellInterpreted ( DataFlow:: Node arg ) { arg = this . getAnArgument ( ) }
61
61
}
62
62
}
Original file line number Diff line number Diff line change
1
+ systemCommandExecutions
1
2
| Railties.rb:5:5:5:34 | call to execute_command |
2
3
| Railties.rb:6:5:6:37 | call to execute_command |
3
4
| Railties.rb:8:5:8:16 | call to rake |
4
5
| Railties.rb:10:5:10:27 | call to rails_command |
5
6
| Railties.rb:12:5:12:17 | call to git |
7
+ shellInterpretedArguments
8
+ | Railties.rb:5:5:5:34 | call to execute_command | Railties.rb:5:21:5:25 | :rake |
9
+ | Railties.rb:5:5:5:34 | call to execute_command | Railties.rb:5:28:5:33 | "test" |
10
+ | Railties.rb:6:5:6:37 | call to execute_command | Railties.rb:6:21:6:26 | :rails |
11
+ | Railties.rb:6:5:6:37 | call to execute_command | Railties.rb:6:29:6:36 | "server" |
12
+ | Railties.rb:8:5:8:16 | call to rake | Railties.rb:8:10:8:15 | "test" |
13
+ | Railties.rb:10:5:10:27 | call to rails_command | Railties.rb:10:19:10:26 | "server" |
14
+ | Railties.rb:12:5:12:17 | call to git | Railties.rb:12:9:12:16 | "status" |
Original file line number Diff line number Diff line change 1
1
private import ruby
2
2
private import codeql.ruby.Concepts
3
3
private import codeql.ruby.frameworks.Railties
4
+ private import codeql.ruby.DataFlow
4
5
5
6
query predicate systemCommandExecutions ( SystemCommandExecution e ) { any ( ) }
7
+
8
+ query predicate shellInterpretedArguments ( SystemCommandExecution e , DataFlow:: Node arg ) {
9
+ e .isShellInterpreted ( arg )
10
+ }
You can’t perform that action at this time.
0 commit comments