mirror of
https://github.com/github/codeql.git
synced 2026-05-05 13:45:19 +02:00
add basic support for arrays
This commit is contained in:
@@ -2,6 +2,7 @@ edges
|
||||
| impl/unsafeCode.rb:2:12:2:17 | target : | impl/unsafeCode.rb:3:17:3:25 | #{...} |
|
||||
| impl/unsafeCode.rb:7:12:7:12 | x : | impl/unsafeCode.rb:8:30:8:30 | x |
|
||||
| impl/unsafeCode.rb:12:12:12:12 | x : | impl/unsafeCode.rb:13:33:13:33 | x |
|
||||
| impl/unsafeCode.rb:28:17:28:22 | my_arr : | impl/unsafeCode.rb:29:10:29:15 | my_arr |
|
||||
nodes
|
||||
| impl/unsafeCode.rb:2:12:2:17 | target : | semmle.label | target : |
|
||||
| impl/unsafeCode.rb:3:17:3:25 | #{...} | semmle.label | #{...} |
|
||||
@@ -9,8 +10,11 @@ nodes
|
||||
| impl/unsafeCode.rb:8:30:8:30 | x | semmle.label | x |
|
||||
| impl/unsafeCode.rb:12:12:12:12 | x : | semmle.label | x : |
|
||||
| impl/unsafeCode.rb:13:33:13:33 | x | semmle.label | x |
|
||||
| impl/unsafeCode.rb:28:17:28:22 | my_arr : | semmle.label | my_arr : |
|
||||
| impl/unsafeCode.rb:29:10:29:15 | my_arr | semmle.label | my_arr |
|
||||
subpaths
|
||||
#select
|
||||
| impl/unsafeCode.rb:3:17:3:25 | #{...} | impl/unsafeCode.rb:2:12:2:17 | target : | impl/unsafeCode.rb:3:17:3:25 | #{...} | This string interpolation which depends on $@ is later $@. | impl/unsafeCode.rb:2:12:2:17 | target | library input | impl/unsafeCode.rb:3:5:3:27 | call to eval | interpreted as code |
|
||||
| impl/unsafeCode.rb:8:30:8:30 | x | impl/unsafeCode.rb:7:12:7:12 | x : | impl/unsafeCode.rb:8:30:8:30 | x | This string format which depends on $@ is later $@. | impl/unsafeCode.rb:7:12:7:12 | x | library input | impl/unsafeCode.rb:8:5:8:32 | call to eval | interpreted as code |
|
||||
| impl/unsafeCode.rb:13:33:13:33 | x | impl/unsafeCode.rb:12:12:12:12 | x : | impl/unsafeCode.rb:13:33:13:33 | x | This string format which depends on $@ is later $@. | impl/unsafeCode.rb:12:12:12:12 | x | library input | impl/unsafeCode.rb:13:5:13:35 | call to eval | interpreted as code |
|
||||
| impl/unsafeCode.rb:29:10:29:15 | my_arr | impl/unsafeCode.rb:28:17:28:22 | my_arr : | impl/unsafeCode.rb:29:10:29:15 | my_arr | This array which depends on $@ is later $@. | impl/unsafeCode.rb:28:17:28:22 | my_arr | library input | impl/unsafeCode.rb:29:5:29:27 | call to eval | interpreted as code |
|
||||
|
||||
@@ -24,4 +24,11 @@ class Foobar
|
||||
def named_code(code)
|
||||
foo.send("def \n #{code} \n end") # OK - parameter is named code
|
||||
end
|
||||
|
||||
def joinStuff(my_arr)
|
||||
eval(my_arr.join("\n")) # NOT OK
|
||||
end
|
||||
|
||||
# TODO: [x, y].join("\n") is not yet supported
|
||||
# TODO: list << element.
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user