diff --git a/ql/src/semmle/go/security/ReflectedXssCustomizations.qll b/ql/src/semmle/go/security/ReflectedXssCustomizations.qll index 826feb4a326..65c660f2112 100644 --- a/ql/src/semmle/go/security/ReflectedXssCustomizations.qll +++ b/ql/src/semmle/go/security/ReflectedXssCustomizations.qll @@ -103,4 +103,13 @@ module ReflectedXss { ) } } + + /** + * A check against a constant value, considered a barrier for reflected XSS. + */ + class EqualityTestGuard extends SanitizerGuard, DataFlow::EqualityTestNode { + override predicate checks(Expr e, boolean outcome) { + e = this.getAnOperand().asExpr() and this.eq(outcome, _, _) + } + } }