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 {
47
47
}
48
48
49
49
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
+ }
50
56
}
51
57
52
58
module ToBufferFlow = TaintTracking:: Global< ToBufferConfig > ;
Original file line number Diff line number Diff line change @@ -31,6 +31,16 @@ module FromSensitiveConfig implements DataFlow::ConfigSig {
31
31
predicate isBarrier ( DataFlow:: Node node ) {
32
32
node .asExpr ( ) .getUnspecifiedType ( ) instanceof IntegralType
33
33
}
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
+ }
34
44
}
35
45
36
46
module FromSensitiveFlow = TaintTracking:: Global< FromSensitiveConfig > ;
Original file line number Diff line number Diff line change @@ -245,6 +245,14 @@ module FromSensitiveConfig implements DataFlow::ConfigSig {
245
245
// sources to not get path duplication.
246
246
isSource ( node )
247
247
}
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
+ }
248
256
}
249
257
250
258
module FromSensitiveFlow = TaintTracking:: Global< FromSensitiveConfig > ;
@@ -266,6 +274,10 @@ module ToEncryptionConfig implements DataFlow::ConfigSig {
266
274
// sources to not get path duplication.
267
275
isSource ( node )
268
276
}
277
+
278
+ predicate observeDiffInformedIncrementalMode ( ) {
279
+ none ( ) // only used negatively
280
+ }
269
281
}
270
282
271
283
module ToEncryptionFlow = TaintTracking:: Global< ToEncryptionConfig > ;
@@ -281,6 +293,10 @@ module FromEncryptionConfig implements DataFlow::ConfigSig {
281
293
predicate isBarrier ( DataFlow:: Node node ) {
282
294
node .asExpr ( ) .getUnspecifiedType ( ) instanceof IntegralType
283
295
}
296
+
297
+ predicate observeDiffInformedIncrementalMode ( ) {
298
+ none ( ) // only used negatively
299
+ }
284
300
}
285
301
286
302
module FromEncryptionFlow = TaintTracking:: Global< FromEncryptionConfig > ;
You can’t perform that action at this time.
0 commit comments