FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
codeql/python/ql/lib/semmle/python/regex.qll at codeql-cli/v2.27.1 · github/codeql · GitHub
github
codeql
Repository navigation
Code
Issues
1k
(1k)
Pull requests
473
(473)
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
codeql
/
python
/
ql
/
lib
/
semmle
/
python
/
regex.qll
Copy path
More file actions
More file actions
Latest commit
History
History
History
16 lines (15 loc) · 695 Bytes
Breadcrumbs
codeql
/
python
/
ql
/
lib
/
semmle
/
python
/
regex.qll
Copy path
File metadata and controls
16 lines (15 loc) · 695 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import
python
// Need to import since frameworks can extend the abstract `RegExpInterpretation::Range`
private
import
semmle.python.Frameworks
private
import
regexp.internal.RegExpTracking
as
RegExpTracking
private
import
semmle.python.Concepts
as
Concepts
private
import
semmle.python.regexp.RegexTreeView
private
import
semmle.python.dataflow.new.DataFlow
import
regexp.internal.ParseRegExp
/** Gets a parsed regular expression term that is executed at `exec`. */
RegExpTerm
getTermForExecution
(
Concepts
::
RegexExecution
exec
)
{
exists
(
DataFlow
::
Node
source
|
source
=
RegExpTracking
::
regExpSource
(
exec
.
getRegex
(
)
)
|
result
.
getRegex
(
)
=
source
.
asExpr
(
)
and
result
.
isRootTerm
(
)
)
}
Back
|
FazBrowse Home
|
New Git URL