mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
Apply suggestions from code review
Update `RegexExecution` docs and use `flowsTo()` instead of `getALocalSource()`. Co-authored-by: yoff <lerchedahl@gmail.com>
This commit is contained in:
@@ -17,7 +17,7 @@ private import experimental.semmle.python.Frameworks
|
||||
/** Provides classes for modeling Regular Expression-related APIs. */
|
||||
module RegexExecution {
|
||||
/**
|
||||
* A data-flow node that collects methods immediately executing an expression.
|
||||
* A data-flow node that executes a regular expression.
|
||||
*
|
||||
* Extend this class to model new APIs. If you want to refine existing API models,
|
||||
* extend `RegexExecution` instead.
|
||||
|
||||
@@ -60,7 +60,7 @@ private module Re {
|
||||
exists(DataFlow::CallCfgNode patternCall, DataFlow::AttrRead reMethod |
|
||||
this.getFunction() = reMethod and
|
||||
patternCall = API::moduleImport("re").getMember("compile").getACall() and
|
||||
patternCall = reMethod.getObject().getALocalSource() and
|
||||
patternCall.flowsTo(reMethod.getObject()) and
|
||||
reMethod.getAttributeName() instanceof RegexExecutionMethods and
|
||||
regexNode = patternCall.getArg(0)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user