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