@@ -375,24 +375,48 @@ class ContentSet instanceof Content {
375375}
376376
377377/**
378- * Holds if the guard `g` validates the expression `e` upon evaluating to `branch `.
378+ * Holds if the guard `g` validates the expression `e` upon evaluating to `gv `.
379379 *
380380 * The expression `e` is expected to be a syntactic part of the guard `g`.
381381 * For example, the guard `g` might be a call `isSafe(x)` and the expression `e`
382382 * the argument `x`.
383383 */
384- signature predicate guardChecksSig ( Guard g , Expr e , boolean branch ) ;
384+ signature predicate valueGuardChecksSig ( Guard g , Expr e , GuardValue gv ) ;
385385
386386/**
387387 * Provides a set of barrier nodes for a guard that validates an expression.
388388 *
389389 * This is expected to be used in `isBarrier`/`isSanitizer` definitions
390390 * in data flow and taint tracking.
391391 */
392- module BarrierGuard < guardChecksSig / 3 guardChecks> {
392+ module BarrierGuardValue < valueGuardChecksSig / 3 guardChecks> {
393393 /** Gets a node that is safely guarded by the given guard check. */
394394 Node getABarrierNode ( ) {
395395 SsaFlow:: asNode ( result ) =
396396 SsaImpl:: DataFlowIntegration:: BarrierGuard< guardChecks / 3 > :: getABarrierNode ( )
397397 }
398398}
399+
400+ /**
401+ * Holds if the guard `g` validates the expression `e` upon evaluating to `branch`.
402+ *
403+ * The expression `e` is expected to be a syntactic part of the guard `g`.
404+ * For example, the guard `g` might be a call `isSafe(x)` and the expression `e`
405+ * the argument `x`.
406+ */
407+ signature predicate guardChecksSig ( Guard g , Expr e , boolean branch ) ;
408+
409+ /**
410+ * Provides a set of barrier nodes for a guard that validates an expression.
411+ *
412+ * This is expected to be used in `isBarrier`/`isSanitizer` definitions
413+ * in data flow and taint tracking.
414+ */
415+ module BarrierGuard< guardChecksSig / 3 guardChecks> {
416+ private predicate guardChecks0 ( Guard g , Expr e , GuardValue gv ) {
417+ guardChecks ( g , e , gv .asBooleanValue ( ) )
418+ }
419+
420+ /** Gets a node that is safely guarded by the given guard check. */
421+ Node getABarrierNode ( ) { result = BarrierGuardValue< guardChecks0 / 3 > :: getABarrierNode ( ) }
422+ }
0 commit comments