Skip to content

Commit ed4e1bb

Browse files
committed
don't have a MembershipTestBarrierGuard in Configuration.qll
1 parent b7a3c4a commit ed4e1bb

File tree

2 files changed

+7
-18
lines changed

2 files changed

+7
-18
lines changed

javascript/ql/src/semmle/javascript/dataflow/Configuration.qll

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1814,19 +1814,3 @@ class VarAccessBarrier extends DataFlow::Node {
18141814
)
18151815
}
18161816
}
1817-
1818-
/**
1819-
* A check of the form `whitelist.includes(x)` or equivalent, which sanitizes `x` in its "then" branch.
1820-
*
1821-
* Can be added to `isBarrierGuard` in a data-flow configuration to block flow through such checks.
1822-
*/
1823-
class MembershipTestBarrierGuard extends BarrierGuardNode {
1824-
MembershipCandidate candidate;
1825-
1826-
MembershipTestBarrierGuard() { this = candidate.getTest() }
1827-
1828-
override predicate blocks(boolean outcome, Expr e) {
1829-
candidate = e.flow() and
1830-
candidate.getTestPolarity() = outcome
1831-
}
1832-
}

javascript/ql/src/semmle/javascript/security/dataflow/TaintedPathCustomizations.qll

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,9 +373,14 @@ module TaintedPath {
373373
/**
374374
* A check of the form `whitelist.includes(x)` or equivalent, which sanitizes `x` in its "then" branch.
375375
*/
376-
class MembershipTestBarrierGuard extends BarrierGuardNode, DataFlow::MembershipTestBarrierGuard {
376+
class MembershipTestBarrierGuard extends BarrierGuardNode {
377+
MembershipCandidate candidate;
378+
379+
MembershipTestBarrierGuard() { this = candidate.getTest() }
380+
377381
override predicate blocks(boolean outcome, Expr e) {
378-
DataFlow::MembershipTestBarrierGuard.super.blocks(outcome, e)
382+
candidate = e.flow() and
383+
candidate.getTestPolarity() = outcome
379384
}
380385
}
381386

0 commit comments

Comments
 (0)