Skip to content

Commit cdc3595

Browse files
committed
Resolve semantic conflicts after rebase
1 parent 564c76c commit cdc3595

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

ql/lib/codeql/ruby/dataflow/internal/DataFlowDispatch.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,9 +424,9 @@ DataFlowCallable viableImplInCallContext(DataFlowCall call, DataFlowCall ctx) {
424424
/**
425425
* Holds if `e` is an `ExprNode` that may be returned by a call to `c`.
426426
*/
427-
predicate exprNodeReturnedFrom(DataFlow::ExprNode e, DataFlowCallable c) {
427+
predicate exprNodeReturnedFrom(DataFlow::ExprNode e, Callable c) {
428428
exists(ReturnNode r |
429-
r.getEnclosingCallable() = c and
429+
r.getEnclosingCallable().asCallable() = c and
430430
(
431431
r.(ExplicitReturnNode).getReturningNode().getReturnedValueNode() = e.asExpr() or
432432
r.(ExprReturnNode) = e

ql/lib/codeql/ruby/frameworks/StandardLibrary.qll

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ private import codeql.ruby.AST
22
private import codeql.ruby.Concepts
33
private import codeql.ruby.DataFlow
44
private import codeql.ruby.ApiGraphs
5-
private import codeql.ruby.dataflow.internal.DataFlowDispatch
6-
private import codeql.ruby.dataflow.internal.DataFlowImplCommon
75

86
/**
97
* The `Kernel` module is included by the `Object` class, so its methods are available
@@ -17,9 +15,7 @@ class KernelMethodCall extends MethodCall {
1715
// we assume that if there's no obvious target for this method call
1816
// and the method name matches a Kernel method, then it is a Kernel method call.
1917
// TODO: ApiGraphs should ideally handle this case
20-
not exists(DataFlowCallable method, DataFlowCall call |
21-
viableCallable(call) = method and call.getExpr() = this
22-
) and
18+
not exists(this.(Call).getATarget()) and
2319
(
2420
this.getReceiver() instanceof Self and isPrivateKernelMethod(this.getMethodName())
2521
or

ql/test/library-tests/dataflow/summaries/Summaries.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ nodes
2525
| summaries.rb:16:12:16:43 | call to apply_lambda : | semmle.label | call to apply_lambda : |
2626
| summaries.rb:16:36:16:42 | tainted : | semmle.label | tainted : |
2727
| summaries.rb:18:6:18:13 | tainted3 | semmle.label | tainted3 |
28+
subpaths
2829
invalidSpecComponent
2930
#select
3031
| summaries.rb:2:6:2:12 | tainted | summaries.rb:1:20:1:26 | "taint" : | summaries.rb:2:6:2:12 | tainted | $@ | summaries.rb:1:20:1:26 | "taint" : | "taint" : |

0 commit comments

Comments
 (0)