Skip to content

Commit 9a74f18

Browse files
committed
Ruby: take File::try_convert as a potential file instance instantiation
1 parent ce004e9 commit 9a74f18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ private predicate pathArgSpawnsSubprocess(Expr arg) {
3434
private DataFlow::Node fileInstanceInstantiation() {
3535
result = API::getTopLevelMember("File").getAnInstantiation()
3636
or
37-
result = API::getTopLevelMember("File").getAMethodCall("open")
37+
result = API::getTopLevelMember("File").getAMethodCall(["open", "try_convert"])
3838
or
3939
// Calls to `Kernel.open` can yield `File` instances
4040
result.(KernelMethodCall).getMethodName() = "open" and

0 commit comments

Comments
 (0)