mirror of
https://github.com/github/codeql.git
synced 2026-04-27 09:45:15 +02:00
JS: Remove a non-deprecated reference to SanitizerGuardNode
This commit is contained in:
@@ -853,15 +853,13 @@ module TaintTracking {
|
||||
*
|
||||
* This sanitizer is not enabled by default.
|
||||
*/
|
||||
class AdHocWhitelistCheckSanitizer extends SanitizerGuardNode, DataFlow::CallNode {
|
||||
class AdHocWhitelistCheckSanitizer extends DataFlow::CallNode {
|
||||
AdHocWhitelistCheckSanitizer() {
|
||||
this.getCalleeName()
|
||||
.regexpMatch("(?i).*((?<!un)safe|whitelist|(?<!in)valid|allow|(?<!un)auth(?!or\\b)).*") and
|
||||
this.getNumArgument() = 1
|
||||
}
|
||||
|
||||
override predicate sanitizes(boolean outcome, Expr e) { this.blocksExpr(outcome, e) }
|
||||
|
||||
/** Holds if this node blocks flow through `e`, provided it evaluates to `outcome`. */
|
||||
predicate blocksExpr(boolean outcome, Expr e) {
|
||||
outcome = true and
|
||||
@@ -869,6 +867,11 @@ module TaintTracking {
|
||||
}
|
||||
}
|
||||
|
||||
deprecated private class AdHocWhitelistCheckSanitizerAsSanitizerGuardNode extends SanitizerGuardNode instanceof AdHocWhitelistCheckSanitizer
|
||||
{
|
||||
override predicate sanitizes(boolean outcome, Expr e) { super.blocksExpr(outcome, e) }
|
||||
}
|
||||
|
||||
/** Barrier nodes derived from the `AdHocWhitelistCheckSanitizer` class. */
|
||||
module AdHocWhitelistCheckSanitizer = DataFlow::MakeBarrierGuard<AdHocWhitelistCheckSanitizer>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user