File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
java/ql/src/experimental/quantum/Examples Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,15 @@ module CommonDataFlowNodeConfig implements DataFlow::ConfigSig {
2828 sink = any ( Crypto:: FlowAwareElement other ) .getInputNode ( )
2929 }
3030
31+ // Don't go in to a known out node, this will prevent the plaintext
32+ // from tracing out of cipher operations for example, we just want to trace
33+ // the plaintext to uses.
34+ // NOTE: we are not using a barrier out on input nodes, because
35+ // that would remove 'use-use' flows, which we need
36+ predicate isBarrierIn ( DataFlow:: Node node ) {
37+ node = any ( Crypto:: FlowAwareElement element ) .getOutputNode ( )
38+ }
39+
3140 predicate isAdditionalFlowStep ( DataFlow:: Node node1 , DataFlow:: Node node2 ) {
3241 node1 .( AdditionalFlowInputStep ) .getOutput ( ) = node2
3342 or
@@ -43,6 +52,7 @@ module CommonDataFlowNodeFlow = TaintTracking::Global<CommonDataFlowNodeConfig>;
4352
4453from DataFlow:: Node src , DataFlow:: Node sink1 , DataFlow:: Node sink2
4554where
55+ not src .asExpr ( ) instanceof NullLiteral and
4656 CommonDataFlowNodeFlow:: flow ( src , sink1 ) and
4757 CommonDataFlowNodeFlow:: flow ( src , sink2 ) and
4858 exists ( Crypto:: CipherOperationNode cipherOp |
You can’t perform that action at this time.
0 commit comments