From 7339f3e0950843cd09464a3400e0e89070f3f0ff Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Wed, 20 Jan 2021 16:11:33 +0000 Subject: [PATCH] Reuse existing class instead of repeating it This is already done elsewhere. --- .../go/security/TaintedPathCustomizations.qll | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/ql/src/semmle/go/security/TaintedPathCustomizations.qll b/ql/src/semmle/go/security/TaintedPathCustomizations.qll index 1e566f9031e..8430b6b0153 100644 --- a/ql/src/semmle/go/security/TaintedPathCustomizations.qll +++ b/ql/src/semmle/go/security/TaintedPathCustomizations.qll @@ -4,6 +4,7 @@ */ import go +import semmle.go.dataflow.BarrierGuardUtil /** * Provides extension points for customizing the taint tracking configuration for reasoning about @@ -133,18 +134,5 @@ module TaintedPath { * * This is overapproximate: we do not attempt to reason about the correctness of the regexp. */ - class RegexpCheck extends SanitizerGuard { - RegexpMatchFunction matchfn; - DataFlow::CallNode call; - - RegexpCheck() { - matchfn.getACall() = call and - this = matchfn.getResult().getNode(call).getASuccessor*() - } - - override predicate checks(Expr e, boolean branch) { - e = matchfn.getValue().getNode(call).asExpr() and - (branch = false or branch = true) - } - } + class RegexpCheckAsSanitizerGuard extends RegexpCheck, SanitizerGuard { } }