mirror of
https://github.com/github/codeql.git
synced 2026-02-12 05:01:06 +01:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user