Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby: Use proper PathGraph module in inline flow tests #14133

Merged
merged 1 commit into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4,391 changes: 0 additions & 4,391 deletions ruby/ql/test/library-tests/dataflow/array-flow/array-flow.expected

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import codeql.ruby.AST
import TestUtilities.InlineFlowTest
import DefaultFlowTest
import PathGraph
import ValueFlow::PathGraph

from ValueFlow::PathNode source, ValueFlow::PathNode sink
where ValueFlow::flowPath(source, sink)
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import codeql.ruby.AST
import codeql.ruby.DataFlow
import TestUtilities.InlineFlowTest
import DefaultFlowTest
import PathGraph
import TaintFlow::PathGraph
import codeql.ruby.dataflow.internal.DataFlowDispatch as DataFlowDispatch

query predicate mayBenefitFromCallContext = DataFlowDispatch::mayBenefitFromCallContext/2;
Expand Down
252 changes: 0 additions & 252 deletions ruby/ql/test/library-tests/dataflow/global/Flow.expected

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ruby/ql/test/library-tests/dataflow/global/Flow.ql
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import codeql.ruby.AST
import codeql.ruby.DataFlow
private import TestUtilities.InlineFlowTest
import DefaultFlowTest
import PathGraph
import TaintFlow::PathGraph

from TaintFlow::PathNode source, TaintFlow::PathNode sink
where TaintFlow::flowPath(source, sink)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import codeql.ruby.AST
import TestUtilities.InlineFlowTest
import ValueFlowTest<DefaultFlowConfig>
import PathGraph
import ValueFlow::PathGraph

from ValueFlow::PathNode source, ValueFlow::PathNode sink
where ValueFlow::flowPath(source, sink)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,67 +19,36 @@ edges
| local_dataflow.rb:87:10:87:10 | x | local_dataflow.rb:78:3:78:3 | z |
| local_dataflow.rb:87:10:87:10 | x | local_dataflow.rb:87:25:87:25 | x |
| local_dataflow.rb:93:3:93:3 | a | local_dataflow.rb:94:8:94:8 | a |
| local_dataflow.rb:93:3:93:3 | a | local_dataflow.rb:94:8:94:8 | a |
| local_dataflow.rb:93:7:93:15 | call to source | local_dataflow.rb:93:3:93:3 | a |
| local_dataflow.rb:93:7:93:15 | call to source | local_dataflow.rb:93:3:93:3 | a |
| local_dataflow.rb:93:20:93:28 | call to source | local_dataflow.rb:93:3:93:3 | a |
| local_dataflow.rb:93:20:93:28 | call to source | local_dataflow.rb:93:3:93:3 | a |
| local_dataflow.rb:95:3:95:3 | b | local_dataflow.rb:96:8:96:8 | b |
| local_dataflow.rb:95:3:95:3 | b | local_dataflow.rb:96:8:96:8 | b |
| local_dataflow.rb:95:8:95:16 | call to source | local_dataflow.rb:95:3:95:3 | b |
| local_dataflow.rb:95:8:95:16 | call to source | local_dataflow.rb:95:3:95:3 | b |
| local_dataflow.rb:95:21:95:29 | call to source | local_dataflow.rb:95:3:95:3 | b |
| local_dataflow.rb:95:21:95:29 | call to source | local_dataflow.rb:95:3:95:3 | b |
| local_dataflow.rb:98:3:98:3 | a | local_dataflow.rb:99:8:99:8 | a |
| local_dataflow.rb:98:3:98:3 | a | local_dataflow.rb:99:8:99:8 | a |
| local_dataflow.rb:98:7:98:15 | call to source | local_dataflow.rb:98:3:98:3 | a |
| local_dataflow.rb:98:7:98:15 | call to source | local_dataflow.rb:98:3:98:3 | a |
| local_dataflow.rb:98:20:98:28 | call to source | local_dataflow.rb:98:3:98:3 | a |
| local_dataflow.rb:98:20:98:28 | call to source | local_dataflow.rb:98:3:98:3 | a |
| local_dataflow.rb:100:3:100:3 | b | local_dataflow.rb:101:8:101:8 | b |
| local_dataflow.rb:100:3:100:3 | b | local_dataflow.rb:101:8:101:8 | b |
| local_dataflow.rb:100:8:100:16 | call to source | local_dataflow.rb:100:3:100:3 | b |
| local_dataflow.rb:100:8:100:16 | call to source | local_dataflow.rb:100:3:100:3 | b |
| local_dataflow.rb:100:22:100:30 | call to source | local_dataflow.rb:100:3:100:3 | b |
| local_dataflow.rb:100:22:100:30 | call to source | local_dataflow.rb:100:3:100:3 | b |
| local_dataflow.rb:103:3:103:3 | a | local_dataflow.rb:104:3:104:3 | a |
| local_dataflow.rb:103:3:103:3 | a | local_dataflow.rb:104:3:104:3 | a |
| local_dataflow.rb:103:7:103:15 | call to source | local_dataflow.rb:103:3:103:3 | a |
| local_dataflow.rb:103:7:103:15 | call to source | local_dataflow.rb:103:3:103:3 | a |
| local_dataflow.rb:104:3:104:3 | a | local_dataflow.rb:105:8:105:8 | a |
| local_dataflow.rb:104:3:104:3 | a | local_dataflow.rb:105:8:105:8 | a |
| local_dataflow.rb:104:9:104:17 | call to source | local_dataflow.rb:104:3:104:3 | a |
| local_dataflow.rb:104:9:104:17 | call to source | local_dataflow.rb:104:3:104:3 | a |
| local_dataflow.rb:106:3:106:3 | b | local_dataflow.rb:107:3:107:3 | b |
| local_dataflow.rb:106:3:106:3 | b | local_dataflow.rb:107:3:107:3 | b |
| local_dataflow.rb:106:7:106:15 | call to source | local_dataflow.rb:106:3:106:3 | b |
| local_dataflow.rb:106:7:106:15 | call to source | local_dataflow.rb:106:3:106:3 | b |
| local_dataflow.rb:107:3:107:3 | b | local_dataflow.rb:108:8:108:8 | b |
| local_dataflow.rb:107:3:107:3 | b | local_dataflow.rb:108:8:108:8 | b |
| local_dataflow.rb:107:9:107:17 | call to source | local_dataflow.rb:107:3:107:3 | b |
| local_dataflow.rb:107:9:107:17 | call to source | local_dataflow.rb:107:3:107:3 | b |
| local_dataflow.rb:112:8:112:16 | call to source | local_dataflow.rb:112:8:112:20 | call to dup |
| local_dataflow.rb:112:8:112:16 | call to source | local_dataflow.rb:112:8:112:20 | call to dup |
| local_dataflow.rb:113:8:113:16 | call to source | local_dataflow.rb:113:8:113:20 | call to dup |
| local_dataflow.rb:113:8:113:16 | call to source | local_dataflow.rb:113:8:113:20 | call to dup |
| local_dataflow.rb:113:8:113:20 | call to dup | local_dataflow.rb:113:8:113:24 | call to dup |
| local_dataflow.rb:113:8:113:20 | call to dup | local_dataflow.rb:113:8:113:24 | call to dup |
| local_dataflow.rb:117:8:117:16 | call to source | local_dataflow.rb:117:8:117:23 | call to tap |
| local_dataflow.rb:117:8:117:16 | call to source | local_dataflow.rb:117:8:117:23 | call to tap |
| local_dataflow.rb:118:3:118:11 | call to source | local_dataflow.rb:118:20:118:20 | x |
| local_dataflow.rb:118:3:118:11 | call to source | local_dataflow.rb:118:20:118:20 | x |
| local_dataflow.rb:118:20:118:20 | x | local_dataflow.rb:118:28:118:28 | x |
| local_dataflow.rb:118:20:118:20 | x | local_dataflow.rb:118:28:118:28 | x |
| local_dataflow.rb:119:8:119:16 | call to source | local_dataflow.rb:119:8:119:23 | call to tap |
| local_dataflow.rb:119:8:119:16 | call to source | local_dataflow.rb:119:8:119:23 | call to tap |
| local_dataflow.rb:119:8:119:23 | call to tap | local_dataflow.rb:119:8:119:30 | call to tap |
| local_dataflow.rb:119:8:119:23 | call to tap | local_dataflow.rb:119:8:119:30 | call to tap |
| local_dataflow.rb:123:8:123:16 | call to source | local_dataflow.rb:123:8:123:20 | call to dup |
| local_dataflow.rb:123:8:123:16 | call to source | local_dataflow.rb:123:8:123:20 | call to dup |
| local_dataflow.rb:123:8:123:20 | call to dup | local_dataflow.rb:123:8:123:45 | call to tap |
| local_dataflow.rb:123:8:123:20 | call to dup | local_dataflow.rb:123:8:123:45 | call to tap |
| local_dataflow.rb:123:8:123:45 | call to tap | local_dataflow.rb:123:8:123:49 | call to dup |
| local_dataflow.rb:123:8:123:45 | call to tap | local_dataflow.rb:123:8:123:49 | call to dup |
nodes
| local_dataflow.rb:78:3:78:3 | z | semmle.label | z |
| local_dataflow.rb:78:12:78:20 | call to source | semmle.label | call to source |
Expand All @@ -101,90 +70,47 @@ nodes
| local_dataflow.rb:87:25:87:25 | x | semmle.label | x |
| local_dataflow.rb:89:8:89:8 | z | semmle.label | z |
| local_dataflow.rb:93:3:93:3 | a | semmle.label | a |
| local_dataflow.rb:93:3:93:3 | a | semmle.label | a |
| local_dataflow.rb:93:7:93:15 | call to source | semmle.label | call to source |
| local_dataflow.rb:93:7:93:15 | call to source | semmle.label | call to source |
| local_dataflow.rb:93:20:93:28 | call to source | semmle.label | call to source |
| local_dataflow.rb:93:20:93:28 | call to source | semmle.label | call to source |
| local_dataflow.rb:94:8:94:8 | a | semmle.label | a |
| local_dataflow.rb:94:8:94:8 | a | semmle.label | a |
| local_dataflow.rb:95:3:95:3 | b | semmle.label | b |
| local_dataflow.rb:95:3:95:3 | b | semmle.label | b |
| local_dataflow.rb:95:8:95:16 | call to source | semmle.label | call to source |
| local_dataflow.rb:95:8:95:16 | call to source | semmle.label | call to source |
| local_dataflow.rb:95:21:95:29 | call to source | semmle.label | call to source |
| local_dataflow.rb:95:21:95:29 | call to source | semmle.label | call to source |
| local_dataflow.rb:96:8:96:8 | b | semmle.label | b |
| local_dataflow.rb:96:8:96:8 | b | semmle.label | b |
| local_dataflow.rb:98:3:98:3 | a | semmle.label | a |
| local_dataflow.rb:98:3:98:3 | a | semmle.label | a |
| local_dataflow.rb:98:7:98:15 | call to source | semmle.label | call to source |
| local_dataflow.rb:98:7:98:15 | call to source | semmle.label | call to source |
| local_dataflow.rb:98:20:98:28 | call to source | semmle.label | call to source |
| local_dataflow.rb:98:20:98:28 | call to source | semmle.label | call to source |
| local_dataflow.rb:99:8:99:8 | a | semmle.label | a |
| local_dataflow.rb:99:8:99:8 | a | semmle.label | a |
| local_dataflow.rb:100:3:100:3 | b | semmle.label | b |
| local_dataflow.rb:100:3:100:3 | b | semmle.label | b |
| local_dataflow.rb:100:8:100:16 | call to source | semmle.label | call to source |
| local_dataflow.rb:100:8:100:16 | call to source | semmle.label | call to source |
| local_dataflow.rb:100:22:100:30 | call to source | semmle.label | call to source |
| local_dataflow.rb:100:22:100:30 | call to source | semmle.label | call to source |
| local_dataflow.rb:101:8:101:8 | b | semmle.label | b |
| local_dataflow.rb:101:8:101:8 | b | semmle.label | b |
| local_dataflow.rb:103:3:103:3 | a | semmle.label | a |
| local_dataflow.rb:103:3:103:3 | a | semmle.label | a |
| local_dataflow.rb:103:7:103:15 | call to source | semmle.label | call to source |
| local_dataflow.rb:103:7:103:15 | call to source | semmle.label | call to source |
| local_dataflow.rb:104:3:104:3 | a | semmle.label | a |
| local_dataflow.rb:104:3:104:3 | a | semmle.label | a |
| local_dataflow.rb:104:9:104:17 | call to source | semmle.label | call to source |
| local_dataflow.rb:104:9:104:17 | call to source | semmle.label | call to source |
| local_dataflow.rb:105:8:105:8 | a | semmle.label | a |
| local_dataflow.rb:105:8:105:8 | a | semmle.label | a |
| local_dataflow.rb:106:3:106:3 | b | semmle.label | b |
| local_dataflow.rb:106:3:106:3 | b | semmle.label | b |
| local_dataflow.rb:106:7:106:15 | call to source | semmle.label | call to source |
| local_dataflow.rb:106:7:106:15 | call to source | semmle.label | call to source |
| local_dataflow.rb:107:3:107:3 | b | semmle.label | b |
| local_dataflow.rb:107:3:107:3 | b | semmle.label | b |
| local_dataflow.rb:107:9:107:17 | call to source | semmle.label | call to source |
| local_dataflow.rb:107:9:107:17 | call to source | semmle.label | call to source |
| local_dataflow.rb:108:8:108:8 | b | semmle.label | b |
| local_dataflow.rb:108:8:108:8 | b | semmle.label | b |
| local_dataflow.rb:112:8:112:16 | call to source | semmle.label | call to source |
| local_dataflow.rb:112:8:112:16 | call to source | semmle.label | call to source |
| local_dataflow.rb:112:8:112:20 | call to dup | semmle.label | call to dup |
| local_dataflow.rb:112:8:112:20 | call to dup | semmle.label | call to dup |
| local_dataflow.rb:113:8:113:16 | call to source | semmle.label | call to source |
| local_dataflow.rb:113:8:113:16 | call to source | semmle.label | call to source |
| local_dataflow.rb:113:8:113:20 | call to dup | semmle.label | call to dup |
| local_dataflow.rb:113:8:113:20 | call to dup | semmle.label | call to dup |
| local_dataflow.rb:113:8:113:24 | call to dup | semmle.label | call to dup |
| local_dataflow.rb:113:8:113:24 | call to dup | semmle.label | call to dup |
| local_dataflow.rb:117:8:117:16 | call to source | semmle.label | call to source |
| local_dataflow.rb:117:8:117:16 | call to source | semmle.label | call to source |
| local_dataflow.rb:117:8:117:23 | call to tap | semmle.label | call to tap |
| local_dataflow.rb:117:8:117:23 | call to tap | semmle.label | call to tap |
| local_dataflow.rb:118:3:118:11 | call to source | semmle.label | call to source |
| local_dataflow.rb:118:3:118:11 | call to source | semmle.label | call to source |
| local_dataflow.rb:118:20:118:20 | x | semmle.label | x |
| local_dataflow.rb:118:20:118:20 | x | semmle.label | x |
| local_dataflow.rb:118:28:118:28 | x | semmle.label | x |
| local_dataflow.rb:118:28:118:28 | x | semmle.label | x |
| local_dataflow.rb:119:8:119:16 | call to source | semmle.label | call to source |
| local_dataflow.rb:119:8:119:16 | call to source | semmle.label | call to source |
| local_dataflow.rb:119:8:119:23 | call to tap | semmle.label | call to tap |
| local_dataflow.rb:119:8:119:23 | call to tap | semmle.label | call to tap |
| local_dataflow.rb:119:8:119:30 | call to tap | semmle.label | call to tap |
| local_dataflow.rb:119:8:119:30 | call to tap | semmle.label | call to tap |
| local_dataflow.rb:123:8:123:16 | call to source | semmle.label | call to source |
| local_dataflow.rb:123:8:123:16 | call to source | semmle.label | call to source |
| local_dataflow.rb:123:8:123:20 | call to dup | semmle.label | call to dup |
| local_dataflow.rb:123:8:123:20 | call to dup | semmle.label | call to dup |
| local_dataflow.rb:123:8:123:45 | call to tap | semmle.label | call to tap |
| local_dataflow.rb:123:8:123:45 | call to tap | semmle.label | call to tap |
| local_dataflow.rb:123:8:123:49 | call to dup | semmle.label | call to dup |
| local_dataflow.rb:123:8:123:49 | call to dup | semmle.label | call to dup |
subpaths
#select
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import codeql.ruby.AST
import TestUtilities.InlineFlowTest
import DefaultFlowTest
import PathGraph
import TaintFlow::PathGraph

from TaintFlow::PathNode source, TaintFlow::PathNode sink
where TaintFlow::flowPath(source, sink)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import codeql.ruby.AST
import TestUtilities.InlineFlowTest
import ValueFlowTest<DefaultFlowConfig>
import PathGraph
import ValueFlow::PathGraph

from ValueFlow::PathNode source, ValueFlow::PathNode sink
where ValueFlow::flowPath(source, sink)
Expand Down
Loading