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
9
9
private import semmle.python.dataflow.new.RemoteFlowSources
10
10
private import semmle.python.Concepts
11
11
private import semmle.python.ApiGraphs
12
+ private import semmle.python.dataflow.new.FlowSummary
12
13
private import semmle.python.frameworks.PEP249
13
14
private import semmle.python.frameworks.internal.PoorMansFunctionResolution
14
15
private import semmle.python.frameworks.internal.SelfRefMixin
@@ -3670,6 +3671,23 @@ private module StdlibPrivate {
3670
3671
3671
3672
override DataFlow:: Node getAPathArgument ( ) { result = this .getAnInput ( ) }
3672
3673
}
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
+ }
3673
3691
}
3674
3692
3675
3693
// ---------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments