File tree 2 files changed +4
-38
lines changed
lib/codeql/ruby/dataflow/internal
test/library-tests/dataflow/barrier-guards
2 files changed +4
-38
lines changed Original file line number Diff line number Diff line change @@ -783,43 +783,9 @@ class SsaDefinitionNodeImpl extends SsaNode {
783
783
}
784
784
}
785
785
786
- /**
787
- * A node that represents an input to an SSA phi (read) definition.
788
- *
789
- * This allows for barrier guards to filter input to phi nodes. For example, in
790
- *
791
- * ```rb
792
- * x = taint
793
- * if x != "safe" then
794
- * x = "safe"
795
- * end
796
- * sink x
797
- * ```
798
- *
799
- * the `false` edge out of `x != "safe"` guards the input from `x = taint` into the
800
- * `phi` node after the condition.
801
- *
802
- * It is also relevant to filter input into phi read nodes:
803
- *
804
- * ```rb
805
- * x = taint
806
- * if b then
807
- * if x != "safe1" then
808
- * return
809
- * end
810
- * else
811
- * if x != "safe2" then
812
- * return
813
- * end
814
- * end
815
- *
816
- * sink x
817
- * ```
818
- *
819
- * both inputs into the phi read node after the outer condition are guarded.
820
- */
821
- class SsaInputNode extends SsaNode {
822
- override SsaImpl:: DataFlowIntegration:: SsaInputNode node ;
786
+ /** A synthesized SSA read. */
787
+ class SsaSynthReadNode extends SsaNode {
788
+ override SsaImpl:: DataFlowIntegration:: SsaSynthReadNode node ;
823
789
}
824
790
825
791
/** An SSA definition for a `self` variable. */
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ module BarrierGuardTest implements TestSig {
26
26
tag = "guarded" and
27
27
exists ( DataFlow:: Node n |
28
28
newStyleBarrierGuards ( n ) and
29
- not n instanceof SsaInputNode and
29
+ not n instanceof SsaSynthReadNode and
30
30
location = n .getLocation ( ) and
31
31
element = n .toString ( ) and
32
32
value = ""
You can’t perform that action at this time.
0 commit comments