Skip to content

Commit 7c877c7

Browse files
committed
Ruby: Rename getARhs -> asSink
1 parent 2f8086b commit 7c877c7

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

ruby/ql/lib/codeql/ruby/ApiGraphs.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,12 @@ module API {
116116
/**
117117
* Gets a data-flow node corresponding the value flowing into this API component.
118118
*/
119-
DataFlow::Node getARhs() { Impl::def(this, result) }
119+
DataFlow::Node asSink() { Impl::def(this, result) }
120120

121121
/**
122122
* Gets a data-flow node that may interprocedurally flow to the value escaping into this API component.
123123
*/
124-
DataFlow::Node getAValueReachingRhs() { result = Impl::trackDefNode(this.getARhs()) }
124+
DataFlow::Node getAValueReachingRhs() { result = Impl::trackDefNode(this.asSink()) }
125125

126126
/**
127127
* Gets a call to a method on the receiver represented by this API component.

ruby/ql/test/library-tests/dataflow/api-graphs/use.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class ApiUseTest extends InlineExpectationsTest {
2929
n = a.getAValueReachableFromSource()
3030
or
3131
tag = "def" and
32-
n = a.getARhs()
32+
n = a.asSink()
3333
or
3434
tag = "call" and
3535
n = a.(API::MethodAccessNode).getCallNode()

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,15 +132,15 @@ class CustomValueSink extends DefaultValueFlowConf {
132132
override predicate isSink(DataFlow::Node sink) {
133133
super.isSink(sink)
134134
or
135-
sink = ModelOutput::getASinkNode("test-sink").getARhs()
135+
sink = ModelOutput::getASinkNode("test-sink").asSink()
136136
}
137137
}
138138

139139
class CustomTaintSink extends DefaultTaintFlowConf {
140140
override predicate isSink(DataFlow::Node sink) {
141141
super.isSink(sink)
142142
or
143-
sink = ModelOutput::getASinkNode("test-sink").getARhs()
143+
sink = ModelOutput::getASinkNode("test-sink").asSink()
144144
}
145145
}
146146

0 commit comments

Comments
 (0)