mirror of
https://github.com/github/codeql.git
synced 2026-05-03 04:39:29 +02:00
JS: Rename getAnImmediateUse -> getASource
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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() }
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user