Skip to content

Commit 2931e5d

Browse files
committed
C++: Reduce duplication by blocking flow into sources (since we'll already be considering flow starting at those sources) and out of sinks (since we'll already be alerting on this sink if it's relevant).
1 parent 03ba7ea commit 2931e5d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cpp/ql/src/Security/CWE/CWE-313/CleartextSqliteDatabase.ql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ module FromSensitiveConfiguration implements DataFlow::ConfigSig {
112112
node.asExpr().getUnspecifiedType() instanceof IntegralType
113113
}
114114

115+
predicate isBarrierIn(DataFlow::Node node) { isSource(node) }
116+
117+
predicate isBarrierOut(DataFlow::Node node) { isSink(node) }
118+
115119
predicate allowImplicitRead(DataFlow::Node node, DataFlow::ContentSet content) {
116120
// flow out from fields at the sink (only).
117121
// constrain `content` to a field inside the node.

0 commit comments

Comments
 (0)