mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
change getMethodName to getKernelMethod in other files
This commit is contained in:
@@ -29,7 +29,7 @@ DataFlow::Node fileInstanceInstantiation() {
|
||||
result = API::getTopLevelMember("File").getAMethodCall(["open", "try_convert"])
|
||||
or
|
||||
// Calls to `Kernel.open` can yield `File` instances
|
||||
result.(KernelMethodCall).getMethodName() = "open" and
|
||||
result.(KernelMethodCall).getKernelMethod() = "open" and
|
||||
// Assume that calls that don't invoke shell commands will instead open
|
||||
// a file.
|
||||
not pathArgSpawnsSubprocess(result.(KernelMethodCall).getArgument(0).asExpr().getExpr())
|
||||
|
||||
@@ -13,7 +13,7 @@ class AmbiguousPathCall extends DataFlow::CallNode {
|
||||
string name;
|
||||
|
||||
AmbiguousPathCall() {
|
||||
this.(KernelMethodCall).getMethodName() = "open" and
|
||||
this.(KernelMethodCall).getKernelMethod() = "open" and
|
||||
name = "Kernel.open"
|
||||
or
|
||||
this = API::getTopLevelMember("IO").getAMethodCall("read") and
|
||||
|
||||
@@ -41,8 +41,8 @@ module StackTraceExposure {
|
||||
/**
|
||||
* A call to `Kernel#caller`, considered as a flow source.
|
||||
*/
|
||||
class KernelCallerCall extends Source, Kernel::KernelMethodCall {
|
||||
KernelCallerCall() { this.getMethodName() = "caller" }
|
||||
class KernelCallerCall extends Source instanceof Kernel::KernelMethodCall {
|
||||
KernelCallerCall() { super.getKernelMethod() = "caller" }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user