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 {
4343
4444 override DataFlow:: Node getAnArgument ( ) { result = this .getArgument ( [ 0 , 1 ] ) }
4545
46- override predicate isShellInterpreted ( DataFlow:: Node arg ) { any ( ) }
46+ override predicate isShellInterpreted ( DataFlow:: Node arg ) { arg = this . getAnArgument ( ) }
4747 }
4848
4949 /**
@@ -57,6 +57,6 @@ module Railties {
5757
5858 override DataFlow:: Node getAnArgument ( ) { result = this .getArgument ( 0 ) }
5959
60- override predicate isShellInterpreted ( DataFlow:: Node arg ) { any ( ) }
60+ override predicate isShellInterpreted ( DataFlow:: Node arg ) { arg = this . getAnArgument ( ) }
6161 }
6262}
Original file line number Diff line number Diff line change 1+ systemCommandExecutions
12| Railties.rb:5:5:5:34 | call to execute_command |
23| Railties.rb:6:5:6:37 | call to execute_command |
34| Railties.rb:8:5:8:16 | call to rake |
45| Railties.rb:10:5:10:27 | call to rails_command |
56| 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 11private import ruby
22private import codeql.ruby.Concepts
33private import codeql.ruby.frameworks.Railties
4+ private import codeql.ruby.DataFlow
45
56query 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