mirror of
https://github.com/github/codeql.git
synced 2026-05-04 13:15:21 +02:00
put the shared HostnameRegexp code in the shared regex pack
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Provides predicates for reasoning about regular expressions
|
||||
* that match URLs and hostname patterns.
|
||||
*/
|
||||
|
||||
private import javascript as JS
|
||||
private import semmle.javascript.security.regexp.RegExpTreeView::RegExpTreeView as TreeImpl
|
||||
private import semmle.javascript.Regexp as RegExp
|
||||
private import codeql.regex.HostnameRegexp as Shared
|
||||
|
||||
private module Impl implements Shared::HostnameRegexpSig<TreeImpl> {
|
||||
class DataFlowNode = JS::DataFlow::Node;
|
||||
|
||||
class RegExpPatternSource = RegExp::RegExpPatternSource;
|
||||
|
||||
string getACommonTld() { result = RegExp::RegExpPatterns::getACommonTld() }
|
||||
}
|
||||
|
||||
import Shared::Make<TreeImpl, Impl>
|
||||
Reference in New Issue
Block a user