mirror of
https://github.com/github/codeql.git
synced 2025-12-17 09:13:20 +01:00
27 lines
729 B
Plaintext
27 lines
729 B
Plaintext
import javascript
|
|
|
|
class TestDataFlowConfiguration extends DataFlow::Configuration {
|
|
TestDataFlowConfiguration() {
|
|
this = "TestDataFlowConfiguration"
|
|
}
|
|
|
|
override predicate isSource(DataFlow::Node src) {
|
|
exists (VariableDeclarator vd |
|
|
vd.getBindingPattern().(VarDecl).getName().matches("%source%") and
|
|
src.asExpr() = vd.getInit()
|
|
)
|
|
}
|
|
|
|
override predicate isSink(DataFlow::Node snk) {
|
|
exists (VariableDeclarator vd |
|
|
vd.getBindingPattern().(VarDecl).getName().matches("%sink%") and
|
|
snk.asExpr() = vd.getInit()
|
|
)
|
|
}
|
|
|
|
override predicate isBarrier(DataFlow::Node src, DataFlow::Node snk) {
|
|
src = src and
|
|
snk.asExpr().(PropAccess).getPropertyName() = "notTracked"
|
|
}
|
|
}
|