File tree Expand file tree Collapse file tree 2 files changed +18
-24
lines changed
python/ql/lib/semmle/python/frameworks Expand file tree Collapse file tree 2 files changed +18
-24
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ private import semmle.python.dataflow.new.TaintTracking
99private import semmle.python.dataflow.new.RemoteFlowSources
1010private import semmle.python.Concepts
1111private import semmle.python.ApiGraphs
12+ private import semmle.python.dataflow.new.FlowSummary
1213private import semmle.python.frameworks.PEP249
1314private import semmle.python.frameworks.internal.PoorMansFunctionResolution
1415private import semmle.python.frameworks.internal.SelfRefMixin
@@ -3670,6 +3671,23 @@ private module StdlibPrivate {
36703671
36713672 override DataFlow:: Node getAPathArgument ( ) { result = this .getAnInput ( ) }
36723673 }
3674+
3675+ /** A flow summary for `reversed`. */
3676+ class ReversedSummary extends SummarizedCallable {
3677+ ReversedSummary ( ) { this = "builtins.reversed" }
3678+
3679+ override DataFlow:: CallCfgNode getACall ( ) { result = API:: builtin ( "reversed" ) .getACall ( ) }
3680+
3681+ override DataFlow:: ArgumentNode getACallback ( ) {
3682+ result = API:: builtin ( "reversed" ) .getAValueReachableFromSource ( )
3683+ }
3684+
3685+ override predicate propagatesFlowExt ( string input , string output , boolean preservesValue ) {
3686+ input = "Argument[0].ListElement" and
3687+ output = "ReturnValue.ListElement" and
3688+ preservesValue = true
3689+ }
3690+ }
36733691}
36743692
36753693// ---------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments