change getMethodName to getKernelMethod in other files

This commit is contained in:
erik-krogh
2022-12-07 10:27:35 +01:00
parent 8f0c0f3c17
commit 52c0afa03f
3 changed files with 4 additions and 4 deletions

View File

@@ -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())

View File

@@ -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

View File

@@ -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" }
}
/**