Skip to content

Commit 80da00b

Browse files
committed
[DIFF-INFORMED] C++: ExecTainted
1 parent a77cab6 commit 80da00b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

cpp/ql/src/Security/CWE/CWE-078/ExecTainted.ql

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,17 @@ module ExecTaintConfig implements DataFlow::StateConfigSig {
150150
predicate isBarrierOut(DataFlow::Node node) {
151151
isSink(node, _) // Prevent duplicates along a call chain, since `shellCommand` will include wrappers
152152
}
153+
154+
predicate observeDiffInformedIncrementalMode() { any() }
155+
156+
Location getASelectedSinkLocation(DataFlow::Node sink) {
157+
exists(DataFlow::Node concatResult, Expr command, ExecState state |
158+
result = [concatResult.getLocation(), command.getLocation()] and
159+
isSink(sink, state) and
160+
isSinkImpl(sink, command, _) and
161+
concatResult = state.getOutgoingNode()
162+
)
163+
}
153164
}
154165

155166
module ExecTaint = TaintTracking::GlobalWithState<ExecTaintConfig>;

0 commit comments

Comments
 (0)