Skip to content

Commit 656ebab

Browse files
committed
Allow MaD barriers
This commit was done by Opus 4.5 with the following prompt: In the commit 004d40e 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.
1 parent 6ae1ea7 commit 656ebab

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cpp/ql/src/Security/CWE/CWE-089/SqlTainted.ql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ module SqlTaintedConfig implements DataFlow::ConfigSig {
4545

4646
predicate isBarrier(DataFlow::Node node) {
4747
node.asExpr().getUnspecifiedType() instanceof IntegralType
48+
or
49+
// barrier defined using models-as-data
50+
barrierNode(node, "sql-injection")
4851
}
4952

5053
predicate isBarrierIn(DataFlow::Node node) {

0 commit comments

Comments
 (0)