mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
20 lines
604 B
Plaintext
20 lines
604 B
Plaintext
import experimental.meta.InlineTaintTest
|
|
|
|
predicate isSafe(DataFlow::GuardNode g, ControlFlowNode node, boolean branch) {
|
|
g.(CallNode).getFunction().(NameNode).getId() = "is_safe" and
|
|
node = g.(CallNode).getArg(_) and
|
|
branch = true
|
|
}
|
|
|
|
module CustomSanitizerOverridesConfig implements DataFlow::ConfigSig {
|
|
predicate isSource = TestTaintTrackingConfig::isSource/1;
|
|
|
|
predicate isSink = TestTaintTrackingConfig::isSink/1;
|
|
|
|
predicate isBarrier(DataFlow::Node node) {
|
|
node = DataFlow::BarrierGuard<isSafe/3>::getABarrierNode()
|
|
}
|
|
}
|
|
|
|
import MakeInlineTaintTest<CustomSanitizerOverridesConfig>
|