File tree Expand file tree Collapse file tree 3 files changed +32
-0
lines changed
cpp/ql/src/Security/CWE/CWE-311 Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,12 @@ module ToBufferConfig implements DataFlow::ConfigSig {
4747 }
4848
4949 predicate isSink ( DataFlow:: Node sink ) { isSinkImpl ( sink , _) }
50+
51+ predicate observeDiffInformedIncrementalMode ( ) { any ( ) }
52+
53+ Location getASelectedSinkLocation ( DataFlow:: Node sink ) {
54+ exists ( SensitiveBufferWrite w | result = w .getLocation ( ) | isSinkImpl ( sink , w ) )
55+ }
5056}
5157
5258module ToBufferFlow = TaintTracking:: Global< ToBufferConfig > ;
Original file line number Diff line number Diff line change @@ -31,6 +31,16 @@ module FromSensitiveConfig implements DataFlow::ConfigSig {
3131 predicate isBarrier ( DataFlow:: Node node ) {
3232 node .asExpr ( ) .getUnspecifiedType ( ) instanceof IntegralType
3333 }
34+
35+ predicate observeDiffInformedIncrementalMode ( ) { any ( ) }
36+
37+ Location getASelectedSourceLocation ( DataFlow:: Node sourceNode ) {
38+ exists ( SensitiveExpr source | result = source .getLocation ( ) | isSourceImpl ( sourceNode , source ) )
39+ }
40+
41+ Location getASelectedSinkLocation ( DataFlow:: Node sink ) {
42+ exists ( FileWrite w | result = w .getLocation ( ) | isSinkImpl ( sink , w , _) )
43+ }
3444}
3545
3646module FromSensitiveFlow = TaintTracking:: Global< FromSensitiveConfig > ;
Original file line number Diff line number Diff line change @@ -245,6 +245,14 @@ module FromSensitiveConfig implements DataFlow::ConfigSig {
245245 // sources to not get path duplication.
246246 isSource ( node )
247247 }
248+
249+ predicate observeDiffInformedIncrementalMode ( ) { any ( ) }
250+
251+ Location getASelectedSinkLocation ( DataFlow:: Node sink ) {
252+ exists ( NetworkSendRecv networkSendRecv | result = networkSendRecv .getLocation ( ) |
253+ isSinkSendRecv ( sink , networkSendRecv )
254+ )
255+ }
248256}
249257
250258module FromSensitiveFlow = TaintTracking:: Global< FromSensitiveConfig > ;
@@ -266,6 +274,10 @@ module ToEncryptionConfig implements DataFlow::ConfigSig {
266274 // sources to not get path duplication.
267275 isSource ( node )
268276 }
277+
278+ predicate observeDiffInformedIncrementalMode ( ) {
279+ none ( ) // only used negatively
280+ }
269281}
270282
271283module ToEncryptionFlow = TaintTracking:: Global< ToEncryptionConfig > ;
@@ -281,6 +293,10 @@ module FromEncryptionConfig implements DataFlow::ConfigSig {
281293 predicate isBarrier ( DataFlow:: Node node ) {
282294 node .asExpr ( ) .getUnspecifiedType ( ) instanceof IntegralType
283295 }
296+
297+ predicate observeDiffInformedIncrementalMode ( ) {
298+ none ( ) // only used negatively
299+ }
284300}
285301
286302module FromEncryptionFlow = TaintTracking:: Global< FromEncryptionConfig > ;
You can’t perform that action at this time.
0 commit comments