File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed
csharp/ql/test/utils/model-generator Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 13
13
| Summaries;CollectionFlow;false;ReturnArrayElement;(System.Int32[]);Argument[0].Element;ReturnValue;taint |
14
14
| Summaries;CollectionFlow;false;ReturnFieldInAList;();Argument[Qualifier];ReturnValue;taint |
15
15
| Summaries;CollectionFlow;false;ReturnListElement;(System.Collections.Generic.List<System.Object>);Argument[0].Element;ReturnValue;taint |
16
+ | Summaries;IEnumerableFlow;false;ReturnFieldInIEnumerable;();Argument[Qualifier];ReturnValue;taint |
17
+ | Summaries;IEnumerableFlow;false;ReturnIEnumerable;(System.Collections.Generic.IEnumerable<System.String>);Argument[0].Element;ReturnValue;taint |
18
+ | Summaries;IEnumerableFlow;false;ReturnIEnumerableElement;(System.Collections.Generic.IEnumerable<System.Object>);Argument[0].Element;ReturnValue;taint |
Original file line number Diff line number Diff line change 1
1
using System ;
2
+ using System . Linq ;
2
3
using System . Collections . Generic ;
3
4
4
5
namespace Summaries ;
@@ -82,3 +83,23 @@ public List<string> ReturnFieldInAList()
82
83
return new List < string > { tainted } ;
83
84
}
84
85
}
86
+
87
+ public class IEnumerableFlow
88
+ {
89
+ private string tainted ;
90
+
91
+ public IEnumerable < string > ReturnIEnumerable ( IEnumerable < string > input )
92
+ {
93
+ return input ;
94
+ }
95
+
96
+ public object ReturnIEnumerableElement ( IEnumerable < object > input )
97
+ {
98
+ return input . First ( ) ;
99
+ }
100
+
101
+ public IEnumerable < string > ReturnFieldInIEnumerable ( )
102
+ {
103
+ return new List < string > { tainted } ;
104
+ }
105
+ }
Original file line number Diff line number Diff line change
1
+ semmle-extractor-options: /r:System.Linq.dll
You can’t perform that action at this time.
0 commit comments