Allow MaD barriers

This commit was done by Opus 4.5 with the following prompt:

In the commit 004d40ee93 I have made it so that C# CodeQL queries which use sinks defined using data extensions (also known as "models-as-data"), which are accessed using `sinkNode(Node node, string kind)`, also use barriers defined using models-as-data, which are accessed using `barrierNode(Node node, string kind)`, with the same `kind` string. Please do the same for C++. If there are any complicated cases then list them at the end for me to do manually.
This commit is contained in:
Owen Mansel-Chan
2026-01-13 14:40:35 +00:00
parent 6ae1ea73f7
commit 656ebab776

View File

@@ -45,6 +45,9 @@ module SqlTaintedConfig implements DataFlow::ConfigSig {
predicate isBarrier(DataFlow::Node node) {
node.asExpr().getUnspecifiedType() instanceof IntegralType
or
// barrier defined using models-as-data
barrierNode(node, "sql-injection")
}
predicate isBarrierIn(DataFlow::Node node) {