mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
21 lines
578 B
Plaintext
21 lines
578 B
Plaintext
import javascript
|
|
|
|
class ExampleConfiguration extends TaintTracking::Configuration {
|
|
ExampleConfiguration() { this = "ExampleConfiguration" }
|
|
|
|
override predicate isSource(DataFlow::Node source) {
|
|
source.asExpr().(CallExpr).getCalleeName() = "SOURCE"
|
|
}
|
|
|
|
override predicate isSink(DataFlow::Node sink) {
|
|
exists(CallExpr callExpr |
|
|
callExpr.getCalleeName() = "SINK" and
|
|
DataFlow::valueNode(callExpr.getArgument(0)) = sink
|
|
)
|
|
}
|
|
}
|
|
|
|
from ExampleConfiguration cfg, DataFlow::Node source, DataFlow::Node sink
|
|
where cfg.hasFlow(source, sink)
|
|
select sink
|