Ruby: improve non-constant-kernel-open, no FP's on open without arguments

This commit is contained in:
Peter Stöckli
2023-04-18 10:10:36 +02:00
parent 99ad43b21e
commit 0a6bb3f7ce
3 changed files with 20 additions and 11 deletions

View File

@@ -21,6 +21,7 @@ import codeql.ruby.ApiGraphs
from AmbiguousPathCall call
where
call.getNumberOfArguments() > 0 and
not hasConstantPrefix(call.getPathArgument().getALocalSource().asExpr().getExpr()) and
not call.getPathArgument().getALocalSource() =
API::getTopLevelMember("File").getAMethodCall("join")