Skip to content

Commit d6fb0fe

Browse files
committed
Ruby: remove an unused sink
1 parent 9286596 commit d6fb0fe

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

ruby/ql/src/experimental/cwe-807/ConditionalBypass.ql

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,6 @@ class SensitiveActionGuardComparison extends ComparisonOperation {
5050
SensitiveActionGuardConditional getGuard() { result = guard }
5151
}
5252

53-
/**
54-
* An intermediary sink to enable reuse of the taint configuration.
55-
* This sink should not be presented to the client of this query.
56-
*/
57-
class SensitiveActionGuardComparisonOperand extends Sink {
58-
SensitiveActionGuardComparison comparison;
59-
60-
SensitiveActionGuardComparisonOperand() { this.asExpr().getExpr() = comparison.getAnOperand() }
61-
62-
override SensitiveAction getAction() { result = comparison.getGuard().getAction() }
63-
}
64-
6553
/**
6654
* Holds if `sink` guards `action`, and `source` taints `sink`.
6755
*
@@ -73,8 +61,6 @@ predicate isTaintedGuardForSensitiveAction(
7361
SensitiveAction action
7462
) {
7563
action = sink.getNode().(Sink).getAction() and
76-
// exclude the intermediary sink
77-
not sink.getNode() instanceof SensitiveActionGuardComparisonOperand and
7864
ConditionalBypassFlow::flowPath(source, sink)
7965
}
8066

0 commit comments

Comments
 (0)