JS: Rename getAnImmediateUse -> getASource

This commit is contained in:
Asger Feldthaus
2022-04-05 09:17:35 +02:00
committed by Asger F
parent a7b73f44b2
commit 4c6192670e
46 changed files with 141 additions and 130 deletions

View File

@@ -24,7 +24,7 @@ private DataFlow::Node getNode(API::Node nd, string kind) {
result = nd.getARhs()
or
kind = "use" and
result = nd.getAUse()
result = nd.getAValueReachableFromSource()
}
private string getLoc(DataFlow::Node nd) {

View File

@@ -1,4 +1,4 @@
import javascript
from string mod, string tp
select mod, tp, API::Node::ofType(mod, tp).getAnImmediateUse()
select mod, tp, API::Node::ofType(mod, tp).getASource()

View File

@@ -9,7 +9,7 @@ class Taint extends TaintTracking::Configuration {
override predicate isSource(DataFlow::Node node) {
node.(DataFlow::CallNode).getCalleeName() = "source"
or
node = testInstance().getMember("getSource").getReturn().getAnImmediateUse()
node = testInstance().getMember("getSource").getReturn().getASource()
}
override predicate isSink(DataFlow::Node node) {

View File

@@ -1,3 +1,3 @@
import javascript
query DataFlow::Node dbUse() { result = API::moduleImport("@example/db").getInstance().getAUse() }
query DataFlow::Node dbUse() { result = API::moduleImport("@example/db").getInstance().getAValueReachableFromSource() }

View File

@@ -62,7 +62,7 @@ class BasicTaintTracking extends TaintTracking::Configuration {
override predicate isSource(DataFlow::Node source) {
source.(DataFlow::CallNode).getCalleeName() = "source"
or
source = ModelOutput::getASourceNode("test-source").getAnImmediateUse()
source = ModelOutput::getASourceNode("test-source").getASource()
}
override predicate isSink(DataFlow::Node sink) {