File tree Expand file tree Collapse file tree 3 files changed +16
-1
lines changed
ruby/ql/test/library-tests/dataflow/summaries Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -254,6 +254,8 @@ warning
254254| CSV type row should have 5 columns but has 8: test;TooManyColumns;;;Member[Foo].Instance;too;many;columns |
255255| Invalid argument '0-1' in token 'Argument[0-1]' in access path: Method[foo].Argument[0-1] |
256256| Invalid argument '*' in token 'Argument[*]' in access path: Method[foo].Argument[*] |
257+ | Invalid argument 'any' in token 'Argument[any]' in access path: Member[Foo].Method[sinkAnyArg].Argument[any] |
258+ | Invalid argument 'any-named' in token 'Argument[any-named]' in access path: Member[Foo].Method[sinkAnyNamedArg].Argument[any-named] |
257259| Invalid token 'Argument' is missing its arguments, in access path: Method[foo].Argument |
258260| Invalid token 'Member' is missing its arguments, in access path: Method[foo].Member |
259261| Invalid token name 'Arg' in access path: Method[foo].Arg[0] |
Original file line number Diff line number Diff line change @@ -115,7 +115,14 @@ private class InvalidTypeModel extends ModelInput::TypeModelCsv {
115115}
116116
117117private class SinkFromModel extends ModelInput:: SinkModelCsv {
118- override predicate row ( string row ) { row = "test;FooOrBar;Method[method].Argument[0];test-sink" }
118+ override predicate row ( string row ) {
119+ row =
120+ [
121+ "test;FooOrBar;Method[method].Argument[0];test-sink" , //
122+ ";;Member[Foo].Method[sinkAnyArg].Argument[any];test-sink" , //
123+ ";;Member[Foo].Method[sinkAnyNamedArg].Argument[any-named];test-sink" , //
124+ ]
125+ }
119126}
120127
121128class CustomValueSink extends DefaultValueFlowConf {
Original file line number Diff line number Diff line change @@ -95,3 +95,9 @@ def userDefinedFunction(x, y)
9595x = Foo . new
9696x . flowToSelf ( tainted )
9797sink ( x ) # $ hasTaintFlow=tainted
98+
99+ Foo . sinkAnyArg ( tainted ) # $ MISSING: hasTaintFlow=tainted
100+ Foo . sinkAnyArg ( key : tainted ) # $ MISSING: hasTaintFlow=tainted
101+
102+ Foo . sinkAnyNamedArg ( tainted )
103+ Foo . sinkAnyNamedArg ( key : tainted ) # $ MISSING: hasTaintFlow=tainted
You can’t perform that action at this time.
0 commit comments