mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
18 lines
534 B
Plaintext
18 lines
534 B
Plaintext
import javascript
|
|
|
|
class Configuration extends DataFlow::Configuration {
|
|
Configuration() { this = "ClassDataFlowTestingConfig" }
|
|
|
|
override predicate isSource(DataFlow::Node source) {
|
|
source.getEnclosingExpr().(StringLiteral).getValue().toLowerCase() = "source"
|
|
}
|
|
|
|
override predicate isSink(DataFlow::Node sink) {
|
|
any(DataFlow::CallNode call | call.getCalleeName() = "sink").getAnArgument() = sink
|
|
}
|
|
}
|
|
|
|
query predicate dataflow(DataFlow::Node pred, DataFlow::Node succ) {
|
|
any(Configuration c).hasFlow(pred, succ)
|
|
}
|