mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Ruby: enable taint checking for array-flow test
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -6,11 +6,6 @@ import ruby
|
||||
import TestUtilities.InlineFlowTest
|
||||
import PathGraph
|
||||
|
||||
// TODO enable taint flow for this test
|
||||
class HasFlowTest extends InlineFlowTest {
|
||||
override DataFlow::Configuration getTaintFlowConfig() { none() }
|
||||
}
|
||||
|
||||
from DataFlow::PathNode source, DataFlow::PathNode sink, DefaultValueFlowConf conf
|
||||
where conf.hasFlowPath(source, sink)
|
||||
select sink, source, sink, "$@", source, source.toString()
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
def m0(i)
|
||||
a = *source(0)
|
||||
sink(a[0]) # $ hasValueFlow=0
|
||||
a = *source(0.1)
|
||||
sink(a[0]) # $ hasValueFlow=0.1
|
||||
sink(a[1])
|
||||
sink(a[i]) # $ hasValueFlow=0
|
||||
sink(a[i]) # $ hasValueFlow=0.1
|
||||
end
|
||||
|
||||
def m1(i)
|
||||
@@ -815,7 +815,7 @@ end
|
||||
def m86
|
||||
a = [0, 1, source(86)]
|
||||
b = a.pack 'ccc'
|
||||
sink b # TODO hasTaintFlow=86
|
||||
sink b # $ hasTaintFlow=86
|
||||
end
|
||||
|
||||
def m87
|
||||
|
||||
Reference in New Issue
Block a user