mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
use RegExpTreeView insteaed of RegexTreeView in JS
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* Provides predicates for reasoning about bad tag filter vulnerabilities.
|
||||
*/
|
||||
|
||||
private import regexp.RegexTreeView::RegexTreeView as TreeView
|
||||
private import regexp.RegExpTreeView::RegExpTreeView as TreeView
|
||||
// BadTagFilterQuery should be used directly from the shared pack, and not from this file.
|
||||
deprecated private import codeql.regex.nfa.BadTagFilterQuery::Make<TreeView> as Dep
|
||||
import Dep
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
|
||||
import javascript
|
||||
private import semmle.javascript.security.regexp.RegexTreeView::RegexTreeView as TreeView
|
||||
private import semmle.javascript.security.regexp.RegExpTreeView::RegExpTreeView as TreeView
|
||||
import codeql.regex.nfa.NfaUtils::Make<TreeView> as NfaUtils
|
||||
|
||||
class StringSubstitutionCall = StringReplaceCall;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Classes and predicates for working with suspicious character ranges.
|
||||
*/
|
||||
|
||||
private import regexp.RegexTreeView::RegexTreeView as TreeView
|
||||
private import regexp.RegExpTreeView::RegExpTreeView as TreeView
|
||||
// OverlyLargeRangeQuery should be used directly from the shared pack, and not from this file.
|
||||
deprecated private import codeql.regex.OverlyLargeRangeQuery::Make<TreeView> as Dep
|
||||
import Dep
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
* a suffix `x` (possible empty) that is most likely __not__ accepted.
|
||||
*/
|
||||
|
||||
private import RegexTreeView::RegexTreeView as TreeView
|
||||
private import RegExpTreeView::RegExpTreeView as TreeView
|
||||
// ExponentialBackTracking should be used directly from the shared pack, and not from this file.
|
||||
deprecated private import codeql.regex.nfa.ExponentialBackTracking::Make<TreeView> as Dep
|
||||
import Dep
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* other queries that benefit from reasoning about NFAs.
|
||||
*/
|
||||
|
||||
private import RegexTreeView::RegexTreeView as TreeView
|
||||
private import RegExpTreeView::RegExpTreeView as TreeView
|
||||
// NfaUtils should be used directly from the shared pack, and not from this file.
|
||||
deprecated private import codeql.regex.nfa.NfaUtils::Make<TreeView> as Dep
|
||||
import Dep
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
import javascript
|
||||
private import semmle.javascript.security.regexp.RegexTreeView::RegexTreeView as TreeView
|
||||
private import semmle.javascript.security.regexp.RegExpTreeView::RegExpTreeView as TreeView
|
||||
|
||||
/** Module containing sources, sinks, and sanitizers for polynomial regular expression denial-of-service attacks. */
|
||||
module PolynomialReDoS {
|
||||
|
||||
@@ -6,7 +6,7 @@ private import codeql.regex.nfa.NfaUtils as NfaUtils
|
||||
private import codeql.regex.RegexTreeView
|
||||
|
||||
/** An implementation that parses a regular expression into a tree of `RegExpTerm`s. */
|
||||
module RegexTreeView implements RegexTreeViewSig {
|
||||
module RegExpTreeView implements RegexTreeViewSig {
|
||||
import javascript
|
||||
|
||||
class Top = Locatable;
|
||||
@@ -3,7 +3,7 @@
|
||||
* and for testing which capture groups are filled when a particular regexp matches a string.
|
||||
*/
|
||||
|
||||
private import RegexTreeView::RegexTreeView as TreeView
|
||||
private import RegExpTreeView::RegExpTreeView as TreeView
|
||||
// RegexpMatching should be used directly from the shared pack, and not from this file.
|
||||
deprecated private import codeql.regex.nfa.RegexpMatching::Make<TreeView> as Dep
|
||||
import Dep
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
* It also doesn't find all transitions in the product automaton, which can cause false negatives.
|
||||
*/
|
||||
|
||||
private import RegexTreeView::RegexTreeView as TreeView
|
||||
private import RegExpTreeView::RegExpTreeView as TreeView
|
||||
// SuperlinearBackTracking should be used directly from the shared pack, and not from this file.
|
||||
deprecated private import codeql.regex.nfa.SuperlinearBackTracking::Make<TreeView> as Dep
|
||||
import Dep
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import javascript
|
||||
private import semmle.javascript.security.regexp.RegexTreeView::RegexTreeView as TreeView
|
||||
private import semmle.javascript.security.regexp.RegExpTreeView::RegExpTreeView as TreeView
|
||||
import codeql.regex.nfa.ExponentialBackTracking::Make<TreeView>
|
||||
|
||||
from RegExpTerm t, string pump, State s, string prefixMsg
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* external/cwe/cwe-020
|
||||
*/
|
||||
|
||||
private import semmle.javascript.security.regexp.RegexTreeView::RegexTreeView as TreeView
|
||||
private import semmle.javascript.security.regexp.RegExpTreeView::RegExpTreeView as TreeView
|
||||
import codeql.regex.OverlyLargeRangeQuery::Make<TreeView>
|
||||
|
||||
from TreeView::RegExpCharacterRange range, string reason
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
* external/cwe/cwe-186
|
||||
*/
|
||||
|
||||
private import semmle.javascript.security.regexp.RegexTreeView::RegexTreeView as TreeView
|
||||
private import semmle.javascript.security.regexp.RegExpTreeView::RegExpTreeView as TreeView
|
||||
import codeql.regex.nfa.BadTagFilterQuery::Make<TreeView>
|
||||
|
||||
from HtmlMatchingRegExp regexp, string msg
|
||||
|
||||
@@ -20,7 +20,7 @@ string toOtherCase(string s) {
|
||||
if s.regexpMatch(".*[a-z].*") then result = s.toUpperCase() else result = s.toLowerCase()
|
||||
}
|
||||
|
||||
private import semmle.javascript.security.regexp.RegexTreeView::RegexTreeView as TreeView
|
||||
private import semmle.javascript.security.regexp.RegExpTreeView::RegExpTreeView as TreeView
|
||||
import codeql.regex.nfa.NfaUtils::Make<TreeView> as NfaUtils
|
||||
|
||||
/** Holds if `s` is a relevant regexp term were we want to compute a string that matches the term (for `getCaseSensitiveBypassExample`). */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private import semmle.javascript.security.regexp.RegexTreeView::RegexTreeView as TreeView
|
||||
private import semmle.javascript.security.regexp.RegExpTreeView::RegExpTreeView as TreeView
|
||||
import codeql.regex.nfa.SuperlinearBackTracking::Make<TreeView>
|
||||
|
||||
from PolynomialBackTrackingTerm t
|
||||
|
||||
Reference in New Issue
Block a user