Skip to content

Commit 1c9e4c0

Browse files
committed
Ruby: test for RequestInputAccess instances in ActionDispatch
1 parent c2f5bac commit 1c9e4c0

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

ruby/ql/test/library-tests/frameworks/action_dispatch/ActionDispatch.expected

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,16 @@ mimeTypeMatchRegExpInterpretations
6666
| mime_type.rb:12:7:12:15 | "foo/bar" |
6767
| mime_type.rb:13:11:13:11 | s |
6868
| mime_type.rb:14:7:14:7 | s |
69+
requestInputAccesses
70+
| app/controllers/comments_controller.rb:3:5:3:18 | call to params |
71+
| app/controllers/comments_controller.rb:4:5:4:22 | call to parameters |
72+
| app/controllers/comments_controller.rb:5:5:5:15 | call to GET |
73+
| app/controllers/comments_controller.rb:6:5:6:16 | call to POST |
74+
| app/controllers/comments_controller.rb:7:5:7:28 | call to query_parameters |
75+
| app/controllers/comments_controller.rb:8:5:8:30 | call to request_parameters |
76+
| app/controllers/comments_controller.rb:9:5:9:31 | call to filtered_parameters |
77+
| app/controllers/foo/bars_controller.rb:10:27:10:33 | call to cookies |
78+
| app/controllers/foo/bars_controller.rb:13:21:13:26 | call to params |
79+
| app/controllers/foo/bars_controller.rb:14:10:14:15 | call to params |
80+
| app/controllers/foo/bars_controller.rb:21:21:21:26 | call to params |
81+
| app/controllers/foo/bars_controller.rb:22:10:22:15 | call to params |

ruby/ql/test/library-tests/frameworks/action_dispatch/ActionDispatch.ql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ private import codeql.ruby.AST
22
private import codeql.ruby.frameworks.ActionDispatch
33
private import codeql.ruby.frameworks.ActionController
44
private import codeql.ruby.ApiGraphs
5+
private import codeql.ruby.Concepts
56
private import codeql.ruby.frameworks.data.ModelsAsData
67
private import codeql.ruby.DataFlow
78
private import codeql.ruby.Regexp as RE
@@ -36,3 +37,5 @@ query predicate mimeTypeMatchRegExpInterpretations(
3637
) {
3738
any()
3839
}
40+
41+
query predicate requestInputAccesses(Http::Server::RequestInputAccess a) { any() }

0 commit comments

Comments
 (0)