Mass-rename MethodAccess -> MethodCall

This commit is contained in:
Chris Smowton
2023-10-24 10:30:26 +01:00
committed by GitHub
parent a10731c591
commit f552a15aae
404 changed files with 1147 additions and 1138 deletions

View File

@@ -123,7 +123,7 @@ module JaxRsTest implements TestSig {
)
or
tag = "MessageBodyReaderReadFromCall" and
exists(MethodAccess ma |
exists(MethodCall ma |
ma.getMethod() instanceof MessageBodyReaderReadFrom and
ma.getLocation() = location and
element = ma.toString() and
@@ -131,7 +131,7 @@ module JaxRsTest implements TestSig {
)
or
tag = "MessageBodyReaderReadCall" and
exists(MethodAccess ma |
exists(MethodCall ma |
ma.getMethod() instanceof MessageBodyReaderRead and
ma.getLocation() = location and
element = ma.toString() and

View File

@@ -6,7 +6,7 @@ import TestUtilities.InlineExpectationsTest
module Config implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node source) {
source.asExpr().(MethodAccess).getMethod().hasName("taint")
source.asExpr().(MethodCall).getMethod().hasName("taint")
}
predicate isSink(DataFlow::Node sink) { sink.asExpr() = any(ReturnStmt r).getResult() }

View File

@@ -6,7 +6,7 @@ import TestUtilities.InlineExpectationsTest
module Config implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node source) {
source.asExpr().(MethodAccess).getMethod().hasName("taint")
source.asExpr().(MethodCall).getMethod().hasName("taint")
}
predicate isSink(DataFlow::Node sink) { sink instanceof QueryInjectionSink }

View File

@@ -3,6 +3,6 @@ import semmle.code.java.dataflow.FlowSources
import TestUtilities.InlineFlowTest
import DefaultFlowTest
query predicate valueOf(MethodAccess ma) {
query predicate valueOf(MethodCall ma) {
ma.getMethod().hasQualifiedName("java.lang", "String", "valueOf")
}

View File

@@ -7,13 +7,13 @@ import TestUtilities.InlineFlowTest
module Config implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node n) {
n.asExpr().(MethodAccess).getMethod().hasName("taint")
n.asExpr().(MethodCall).getMethod().hasName("taint")
or
n instanceof ThreatModelFlowSource
}
predicate isSink(DataFlow::Node n) {
exists(MethodAccess ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument())
exists(MethodCall ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument())
or
n instanceof XssSink
or

View File

@@ -3,20 +3,20 @@ import semmle.code.java.dataflow.TaintTracking
import TestUtilities.InlineExpectationsTest
module TaintFlowConfig implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodAccess).getMethod().hasName("taint") }
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodCall).getMethod().hasName("taint") }
predicate isSink(DataFlow::Node n) {
exists(MethodAccess ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument())
exists(MethodCall ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument())
}
}
module TaintFlow = TaintTracking::Global<TaintFlowConfig>;
module ValueFlowConfig implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodAccess).getMethod().hasName("taint") }
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodCall).getMethod().hasName("taint") }
predicate isSink(DataFlow::Node n) {
exists(MethodAccess ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument())
exists(MethodCall ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument())
}
int fieldFlowBranchLimit() { result = 100 }

View File

@@ -6,7 +6,7 @@ module Config implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node src) { src instanceof ThreatModelFlowSource }
predicate isSink(DataFlow::Node sink) {
exists(MethodAccess ma |
exists(MethodCall ma |
sink.asExpr() = ma.getAnArgument() and
ma.getMethod().hasName("sink")
) and

View File

@@ -6,7 +6,7 @@ module TestConfig implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource }
predicate isSink(DataFlow::Node sink) {
exists(MethodAccess call |
exists(MethodCall call |
call.getMethod().hasName("sink") and call.getArgument(0) = sink.asExpr()
)
}

View File

@@ -7,7 +7,7 @@ module Config implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node node) { node instanceof ThreatModelFlowSource }
predicate isSink(DataFlow::Node node) {
exists(MethodAccess ma | ma.getMethod().hasName("sink") | node.asExpr() = ma.getAnArgument())
exists(MethodCall ma | ma.getMethod().hasName("sink") | node.asExpr() = ma.getAnArgument())
}
}

View File

@@ -5,13 +5,13 @@ import TestUtilities.InlineFlowTest
module Config implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node n) {
n.asExpr().(MethodAccess).getMethod().hasName("taint")
n.asExpr().(MethodCall).getMethod().hasName("taint")
or
n instanceof ThreatModelFlowSource
}
predicate isSink(DataFlow::Node n) {
exists(MethodAccess ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument())
exists(MethodCall ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument())
}
}