Skip to content

Commit e87effc

Browse files
p-aibaars
andauthored
Apply suggestions from code review
Co-authored-by: Arthur Baars <[email protected]>
1 parent 09cf76a commit e87effc

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

ruby/ql/lib/codeql/ruby/security/UnsafeDeserializationCustomizations.qll

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ module UnsafeDeserialization {
234234
* The first argument in a call to `Oj.object_load`, always considered as a
235235
* sink for unsafe deserialization. (global and local mode options are ignored)
236236
*/
237-
class OjObjectLoadArgument extends Sink {
237+
private class OjObjectLoadArgument extends Sink {
238238
OjObjectLoadArgument() {
239239
this = API::getTopLevelMember("Oj").getAMethodCall("object_load").getArgument(0)
240240
}
@@ -266,8 +266,7 @@ module UnsafeDeserialization {
266266
* Gets the value being assigned to `Ox.default_options`.
267267
*/
268268
DataFlow::Node getValue() {
269-
result.asExpr() =
270-
this.getArgument(0).asExpr().(CfgNodes::ExprNodes::AssignExprCfgNode).getRhs()
269+
result = this.getArgument(0)
271270
}
272271
}
273272

0 commit comments

Comments
 (0)