Skip to content

Commit 55c17f4

Browse files
authored
Merge pull request #7280 from michaelnebel/csharp-newtonsoft-flowsummary
C#: Include the NewtonSoft.JSon stubs in the flow summaries test.
2 parents 9f8326a + 9e10aee commit 55c17f4

File tree

2 files changed

+118
-1
lines changed

2 files changed

+118
-1
lines changed

csharp/ql/test/library-tests/dataflow/library/FlowSummaries.expected

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,123 @@
66
| Microsoft.VisualBasic;Collection;false;get_Item;(System.Object);;Element of Argument[-1];ReturnValue;value |
77
| Microsoft.VisualBasic;Collection;false;get_Item;(System.String);;Element of Argument[-1];ReturnValue;value |
88
| Microsoft.VisualBasic;Collection;false;set_Item;(System.Int32, System.Object);;Argument[1];Element of Argument[-1];value |
9+
| Newtonsoft.Json.Linq;JArray;false;Add;(Newtonsoft.Json.Linq.JToken);;Argument[0];Element of Argument[-1];value |
10+
| Newtonsoft.Json.Linq;JArray;false;CopyTo;(Newtonsoft.Json.Linq.JToken[], System.Int32);;Element of Argument[-1];Element of Argument[0];value |
11+
| Newtonsoft.Json.Linq;JArray;false;GetEnumerator;();;Element of Argument[-1];Property[System.Collections.Generic.IEnumerator<>.Current] of ReturnValue;value |
12+
| Newtonsoft.Json.Linq;JArray;false;Insert;(System.Int32, Newtonsoft.Json.Linq.JToken);;Argument[1];Element of Argument[-1];value |
13+
| Newtonsoft.Json.Linq;JArray;false;get_Item;(System.Int32);;Element of Argument[-1];ReturnValue;value |
14+
| Newtonsoft.Json.Linq;JArray;false;get_Item;(System.Object);;Element of Argument[-1];ReturnValue;value |
15+
| Newtonsoft.Json.Linq;JArray;false;set_Item;(System.Int32, Newtonsoft.Json.Linq.JToken);;Argument[1];Element of Argument[-1];value |
16+
| Newtonsoft.Json.Linq;JArray;false;set_Item;(System.Object, Newtonsoft.Json.Linq.JToken);;Argument[1];Element of Argument[-1];value |
17+
| Newtonsoft.Json.Linq;JConstructor;false;get_Item;(System.Object);;Element of Argument[-1];ReturnValue;value |
18+
| Newtonsoft.Json.Linq;JConstructor;false;set_Item;(System.Object, Newtonsoft.Json.Linq.JToken);;Argument[1];Element of Argument[-1];value |
19+
| Newtonsoft.Json.Linq;JContainer;false;Add;(Newtonsoft.Json.Linq.JToken);;Argument[0];Element of Argument[-1];value |
20+
| Newtonsoft.Json.Linq;JContainer;false;Add;(System.Object);;Argument[0];Element of Argument[-1];value |
21+
| Newtonsoft.Json.Linq;JContainer;false;CopyTo;(Newtonsoft.Json.Linq.JToken[], System.Int32);;Element of Argument[-1];Element of Argument[0];value |
22+
| Newtonsoft.Json.Linq;JContainer;false;CopyTo;(System.Array, System.Int32);;Element of Argument[-1];Element of Argument[0];value |
23+
| Newtonsoft.Json.Linq;JContainer;false;Find;(System.ComponentModel.PropertyDescriptor, System.Object);;Element of Argument[-1];ReturnValue;value |
24+
| Newtonsoft.Json.Linq;JContainer;false;Insert;(System.Int32, Newtonsoft.Json.Linq.JToken);;Argument[1];Element of Argument[-1];value |
25+
| Newtonsoft.Json.Linq;JContainer;false;Insert;(System.Int32, System.Object);;Argument[1];Element of Argument[-1];value |
26+
| Newtonsoft.Json.Linq;JContainer;false;get_Item;(System.Int32);;Element of Argument[-1];ReturnValue;value |
27+
| Newtonsoft.Json.Linq;JContainer;false;set_Item;(System.Int32, Newtonsoft.Json.Linq.JToken);;Argument[1];Element of Argument[-1];value |
28+
| Newtonsoft.Json.Linq;JContainer;false;set_Item;(System.Int32, System.Object);;Argument[1];Element of Argument[-1];value |
29+
| Newtonsoft.Json.Linq;JObject;false;Add;(System.Collections.Generic.KeyValuePair<System.String,Newtonsoft.Json.Linq.JToken>);;Argument[0];Element of Argument[-1];value |
30+
| Newtonsoft.Json.Linq;JObject;false;Add;(System.Collections.Generic.KeyValuePair<System.String,Newtonsoft.Json.Linq.JToken>);;Property[System.Collections.Generic.KeyValuePair<,>.Key] of Argument[0];Property[System.Collections.Generic.KeyValuePair<,>.Key] of Element of Argument[-1];value |
31+
| Newtonsoft.Json.Linq;JObject;false;Add;(System.Collections.Generic.KeyValuePair<System.String,Newtonsoft.Json.Linq.JToken>);;Property[System.Collections.Generic.KeyValuePair<,>.Value] of Argument[0];Property[System.Collections.Generic.KeyValuePair<,>.Value] of Element of Argument[-1];value |
32+
| Newtonsoft.Json.Linq;JObject;false;Add;(System.String, Newtonsoft.Json.Linq.JToken);;Argument[0];Property[System.Collections.Generic.KeyValuePair<,>.Key] of Element of Argument[-1];value |
33+
| Newtonsoft.Json.Linq;JObject;false;Add;(System.String, Newtonsoft.Json.Linq.JToken);;Argument[1];Property[System.Collections.Generic.KeyValuePair<,>.Value] of Element of Argument[-1];value |
34+
| Newtonsoft.Json.Linq;JObject;false;CopyTo;(System.Collections.Generic.KeyValuePair<System.String,Newtonsoft.Json.Linq.JToken>[], System.Int32);;Element of Argument[-1];Element of Argument[0];value |
35+
| Newtonsoft.Json.Linq;JObject;false;GetEnumerator;();;Element of Argument[-1];Property[System.Collections.Generic.IEnumerator<>.Current] of ReturnValue;value |
36+
| Newtonsoft.Json.Linq;JObject;false;JObject;(Newtonsoft.Json.Linq.JObject);;Property[System.Collections.Generic.KeyValuePair<,>.Key] of Element of Argument[0];Property[System.Collections.Generic.KeyValuePair<,>.Key] of Element of ReturnValue;value |
37+
| Newtonsoft.Json.Linq;JObject;false;JObject;(Newtonsoft.Json.Linq.JObject);;Property[System.Collections.Generic.KeyValuePair<,>.Value] of Element of Argument[0];Property[System.Collections.Generic.KeyValuePair<,>.Value] of Element of ReturnValue;value |
38+
| Newtonsoft.Json.Linq;JObject;false;JObject;(System.Object[]);;Property[System.Collections.Generic.KeyValuePair<,>.Key] of Element of Argument[0];Property[System.Collections.Generic.KeyValuePair<,>.Key] of Element of ReturnValue;value |
39+
| Newtonsoft.Json.Linq;JObject;false;JObject;(System.Object[]);;Property[System.Collections.Generic.KeyValuePair<,>.Value] of Element of Argument[0];Property[System.Collections.Generic.KeyValuePair<,>.Value] of Element of ReturnValue;value |
40+
| Newtonsoft.Json.Linq;JObject;false;Parse;(System.String);;Argument[0];ReturnValue;taint |
41+
| Newtonsoft.Json.Linq;JObject;false;Parse;(System.String, Newtonsoft.Json.Linq.JsonLoadSettings);;Argument[0];ReturnValue;taint |
42+
| Newtonsoft.Json.Linq;JObject;false;get_Item;(System.Object);;Element of Argument[-1];ReturnValue;value |
43+
| Newtonsoft.Json.Linq;JObject;false;get_Item;(System.Object);;Property[System.Collections.Generic.KeyValuePair<,>.Value] of Element of Argument[-1];ReturnValue;value |
44+
| Newtonsoft.Json.Linq;JObject;false;get_Item;(System.String);;Element of Argument[-1];ReturnValue;value |
45+
| Newtonsoft.Json.Linq;JObject;false;get_Item;(System.String);;Property[System.Collections.Generic.KeyValuePair<,>.Value] of Element of Argument[-1];ReturnValue;value |
46+
| Newtonsoft.Json.Linq;JObject;false;get_Keys;();;Property[System.Collections.Generic.KeyValuePair<,>.Key] of Element of Argument[-1];Element of ReturnValue;value |
47+
| Newtonsoft.Json.Linq;JObject;false;get_Values;();;Property[System.Collections.Generic.KeyValuePair<,>.Value] of Element of Argument[-1];Element of ReturnValue;value |
48+
| Newtonsoft.Json.Linq;JObject;false;set_Item;(System.Object, Newtonsoft.Json.Linq.JToken);;Argument[0];Property[System.Collections.Generic.KeyValuePair<,>.Key] of Element of Argument[-1];value |
49+
| Newtonsoft.Json.Linq;JObject;false;set_Item;(System.Object, Newtonsoft.Json.Linq.JToken);;Argument[1];Element of Argument[-1];value |
50+
| Newtonsoft.Json.Linq;JObject;false;set_Item;(System.Object, Newtonsoft.Json.Linq.JToken);;Argument[1];Property[System.Collections.Generic.KeyValuePair<,>.Value] of Element of Argument[-1];value |
51+
| Newtonsoft.Json.Linq;JObject;false;set_Item;(System.String, Newtonsoft.Json.Linq.JToken);;Argument[0];Property[System.Collections.Generic.KeyValuePair<,>.Key] of Element of Argument[-1];value |
52+
| Newtonsoft.Json.Linq;JObject;false;set_Item;(System.String, Newtonsoft.Json.Linq.JToken);;Argument[1];Element of Argument[-1];value |
53+
| Newtonsoft.Json.Linq;JObject;false;set_Item;(System.String, Newtonsoft.Json.Linq.JToken);;Argument[1];Property[System.Collections.Generic.KeyValuePair<,>.Value] of Element of Argument[-1];value |
54+
| Newtonsoft.Json.Linq;JToken;false;GetEnumerator;();;Element of Argument[-1];Property[System.Collections.Generic.IEnumerator<>.Current] of ReturnValue;value |
55+
| Newtonsoft.Json.Linq;JToken;false;GetEnumerator;();;Element of Argument[-1];Property[System.Collections.IEnumerator.Current] of ReturnValue;value |
56+
| Newtonsoft.Json.Linq;JToken;false;SelectToken;(System.String);;Argument[-1];ReturnValue;taint |
57+
| Newtonsoft.Json.Linq;JToken;false;SelectToken;(System.String, Newtonsoft.Json.Linq.JsonSelectSettings);;Argument[-1];ReturnValue;taint |
58+
| Newtonsoft.Json.Linq;JToken;false;SelectToken;(System.String, System.Boolean);;Argument[-1];ReturnValue;taint |
59+
| Newtonsoft.Json.Linq;JToken;false;explicit conversion;(Newtonsoft.Json.Linq.JToken);;Argument[0];ReturnValue;taint |
60+
| Newtonsoft.Json;JsonConvert;false;DeserializeAnonymousType<>;(System.String, T);;Argument[0];ReturnValue;taint |
61+
| Newtonsoft.Json;JsonConvert;false;DeserializeAnonymousType<>;(System.String, T, Newtonsoft.Json.JsonSerializerSettings);;Argument[0];ReturnValue;taint |
62+
| Newtonsoft.Json;JsonConvert;false;DeserializeObject;(System.String);;Argument[0];ReturnValue;taint |
63+
| Newtonsoft.Json;JsonConvert;false;DeserializeObject;(System.String, Newtonsoft.Json.JsonSerializerSettings);;Argument[0];ReturnValue;taint |
64+
| Newtonsoft.Json;JsonConvert;false;DeserializeObject;(System.String, System.Type);;Argument[0];ReturnValue;taint |
65+
| Newtonsoft.Json;JsonConvert;false;DeserializeObject;(System.String, System.Type, Newtonsoft.Json.JsonConverter[]);;Argument[0];ReturnValue;taint |
66+
| Newtonsoft.Json;JsonConvert;false;DeserializeObject;(System.String, System.Type, Newtonsoft.Json.JsonSerializerSettings);;Argument[0];ReturnValue;taint |
67+
| Newtonsoft.Json;JsonConvert;false;DeserializeObject<>;(System.String);;Argument[0];ReturnValue;taint |
68+
| Newtonsoft.Json;JsonConvert;false;DeserializeObject<>;(System.String, Newtonsoft.Json.JsonConverter[]);;Argument[0];ReturnValue;taint |
69+
| Newtonsoft.Json;JsonConvert;false;DeserializeObject<>;(System.String, Newtonsoft.Json.JsonSerializerSettings);;Argument[0];ReturnValue;taint |
70+
| Newtonsoft.Json;JsonConvert;false;DeserializeXNode;(System.String);;Argument[0];ReturnValue;taint |
71+
| Newtonsoft.Json;JsonConvert;false;DeserializeXNode;(System.String, System.String);;Argument[0];ReturnValue;taint |
72+
| Newtonsoft.Json;JsonConvert;false;DeserializeXNode;(System.String, System.String, System.Boolean);;Argument[0];ReturnValue;taint |
73+
| Newtonsoft.Json;JsonConvert;false;DeserializeXNode;(System.String, System.String, System.Boolean, System.Boolean);;Argument[0];ReturnValue;taint |
74+
| Newtonsoft.Json;JsonConvert;false;DeserializeXmlNode;(System.String);;Argument[0];ReturnValue;taint |
75+
| Newtonsoft.Json;JsonConvert;false;DeserializeXmlNode;(System.String, System.String);;Argument[0];ReturnValue;taint |
76+
| Newtonsoft.Json;JsonConvert;false;DeserializeXmlNode;(System.String, System.String, System.Boolean);;Argument[0];ReturnValue;taint |
77+
| Newtonsoft.Json;JsonConvert;false;DeserializeXmlNode;(System.String, System.String, System.Boolean, System.Boolean);;Argument[0];ReturnValue;taint |
78+
| Newtonsoft.Json;JsonConvert;false;PopulateObject;(System.String, System.Object);;Argument[0];Argument[1];taint |
79+
| Newtonsoft.Json;JsonConvert;false;PopulateObject;(System.String, System.Object, Newtonsoft.Json.JsonSerializerSettings);;Argument[0];Argument[1];taint |
80+
| Newtonsoft.Json;JsonConvert;false;SerializeObject;(System.Object);;Argument[0];ReturnValue;taint |
81+
| Newtonsoft.Json;JsonConvert;false;SerializeObject;(System.Object, Newtonsoft.Json.Formatting);;Argument[0];ReturnValue;taint |
82+
| Newtonsoft.Json;JsonConvert;false;SerializeObject;(System.Object, Newtonsoft.Json.Formatting, Newtonsoft.Json.JsonConverter[]);;Argument[0];ReturnValue;taint |
83+
| Newtonsoft.Json;JsonConvert;false;SerializeObject;(System.Object, Newtonsoft.Json.Formatting, Newtonsoft.Json.JsonSerializerSettings);;Argument[0];ReturnValue;taint |
84+
| Newtonsoft.Json;JsonConvert;false;SerializeObject;(System.Object, Newtonsoft.Json.JsonConverter[]);;Argument[0];ReturnValue;taint |
85+
| Newtonsoft.Json;JsonConvert;false;SerializeObject;(System.Object, Newtonsoft.Json.JsonSerializerSettings);;Argument[0];ReturnValue;taint |
86+
| Newtonsoft.Json;JsonConvert;false;SerializeObject;(System.Object, System.Type, Newtonsoft.Json.Formatting, Newtonsoft.Json.JsonSerializerSettings);;Argument[0];ReturnValue;taint |
87+
| Newtonsoft.Json;JsonConvert;false;SerializeObject;(System.Object, System.Type, Newtonsoft.Json.JsonSerializerSettings);;Argument[0];ReturnValue;taint |
88+
| Newtonsoft.Json;JsonConvert;false;SerializeXNode;(System.Xml.Linq.XObject);;Argument[0];ReturnValue;taint |
89+
| Newtonsoft.Json;JsonConvert;false;SerializeXNode;(System.Xml.Linq.XObject, Newtonsoft.Json.Formatting);;Argument[0];ReturnValue;taint |
90+
| Newtonsoft.Json;JsonConvert;false;SerializeXNode;(System.Xml.Linq.XObject, Newtonsoft.Json.Formatting, System.Boolean);;Argument[0];ReturnValue;taint |
91+
| Newtonsoft.Json;JsonConvert;false;SerializeXmlNode;(System.Xml.XmlNode);;Argument[0];ReturnValue;taint |
92+
| Newtonsoft.Json;JsonConvert;false;SerializeXmlNode;(System.Xml.XmlNode, Newtonsoft.Json.Formatting);;Argument[0];ReturnValue;taint |
93+
| Newtonsoft.Json;JsonConvert;false;SerializeXmlNode;(System.Xml.XmlNode, Newtonsoft.Json.Formatting, System.Boolean);;Argument[0];ReturnValue;taint |
94+
| Newtonsoft.Json;JsonConvert;false;ToString;(System.Boolean);;Argument[0];ReturnValue;taint |
95+
| Newtonsoft.Json;JsonConvert;false;ToString;(System.Byte);;Argument[0];ReturnValue;taint |
96+
| Newtonsoft.Json;JsonConvert;false;ToString;(System.Char);;Argument[0];ReturnValue;taint |
97+
| Newtonsoft.Json;JsonConvert;false;ToString;(System.DateTime);;Argument[0];ReturnValue;taint |
98+
| Newtonsoft.Json;JsonConvert;false;ToString;(System.DateTime, Newtonsoft.Json.DateFormatHandling, Newtonsoft.Json.DateTimeZoneHandling);;Argument[0];ReturnValue;taint |
99+
| Newtonsoft.Json;JsonConvert;false;ToString;(System.DateTimeOffset);;Argument[0];ReturnValue;taint |
100+
| Newtonsoft.Json;JsonConvert;false;ToString;(System.DateTimeOffset, Newtonsoft.Json.DateFormatHandling);;Argument[0];ReturnValue;taint |
101+
| Newtonsoft.Json;JsonConvert;false;ToString;(System.Decimal);;Argument[0];ReturnValue;taint |
102+
| Newtonsoft.Json;JsonConvert;false;ToString;(System.Double);;Argument[0];ReturnValue;taint |
103+
| Newtonsoft.Json;JsonConvert;false;ToString;(System.Enum);;Argument[0];ReturnValue;taint |
104+
| Newtonsoft.Json;JsonConvert;false;ToString;(System.Guid);;Argument[0];ReturnValue;taint |
105+
| Newtonsoft.Json;JsonConvert;false;ToString;(System.Int16);;Argument[0];ReturnValue;taint |
106+
| Newtonsoft.Json;JsonConvert;false;ToString;(System.Int32);;Argument[0];ReturnValue;taint |
107+
| Newtonsoft.Json;JsonConvert;false;ToString;(System.Int64);;Argument[0];ReturnValue;taint |
108+
| Newtonsoft.Json;JsonConvert;false;ToString;(System.Object);;Argument[0];ReturnValue;taint |
109+
| Newtonsoft.Json;JsonConvert;false;ToString;(System.SByte);;Argument[0];ReturnValue;taint |
110+
| Newtonsoft.Json;JsonConvert;false;ToString;(System.Single);;Argument[0];ReturnValue;taint |
111+
| Newtonsoft.Json;JsonConvert;false;ToString;(System.String);;Argument[0];ReturnValue;taint |
112+
| Newtonsoft.Json;JsonConvert;false;ToString;(System.String, System.Char);;Argument[0];ReturnValue;taint |
113+
| Newtonsoft.Json;JsonConvert;false;ToString;(System.String, System.Char, Newtonsoft.Json.StringEscapeHandling);;Argument[0];ReturnValue;taint |
114+
| Newtonsoft.Json;JsonConvert;false;ToString;(System.TimeSpan);;Argument[0];ReturnValue;taint |
115+
| Newtonsoft.Json;JsonConvert;false;ToString;(System.UInt16);;Argument[0];ReturnValue;taint |
116+
| Newtonsoft.Json;JsonConvert;false;ToString;(System.UInt32);;Argument[0];ReturnValue;taint |
117+
| Newtonsoft.Json;JsonConvert;false;ToString;(System.UInt64);;Argument[0];ReturnValue;taint |
118+
| Newtonsoft.Json;JsonConvert;false;ToString;(System.Uri);;Argument[0];ReturnValue;taint |
119+
| Newtonsoft.Json;JsonSerializer;false;Deserialize;(Newtonsoft.Json.JsonReader);;Argument[0];ReturnValue;taint |
120+
| Newtonsoft.Json;JsonSerializer;false;Deserialize;(Newtonsoft.Json.JsonReader, System.Type);;Argument[0];ReturnValue;taint |
121+
| Newtonsoft.Json;JsonSerializer;false;Deserialize;(System.IO.TextReader, System.Type);;Argument[0];ReturnValue;taint |
122+
| Newtonsoft.Json;JsonSerializer;false;Serialize;(Newtonsoft.Json.JsonWriter, System.Object);;Argument[1];Argument[0];taint |
123+
| Newtonsoft.Json;JsonSerializer;false;Serialize;(Newtonsoft.Json.JsonWriter, System.Object, System.Type);;Argument[1];Argument[0];taint |
124+
| Newtonsoft.Json;JsonSerializer;false;Serialize;(System.IO.TextWriter, System.Object);;Argument[1];Argument[0];taint |
125+
| Newtonsoft.Json;JsonSerializer;false;Serialize;(System.IO.TextWriter, System.Object, System.Type);;Argument[1];Argument[0];taint |
9126
| System.Collections.Concurrent;BlockingCollection<>;false;Add;(T);;Argument[0];Element of Argument[-1];value |
10127
| System.Collections.Concurrent;BlockingCollection<>;false;CopyTo;(System.Array, System.Int32);;Element of Argument[-1];Element of Argument[0];value |
11128
| System.Collections.Concurrent;BlockingCollection<>;false;CopyTo;(T[], System.Int32);;Element of Argument[-1];Element of Argument[0];value |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
semmle-extractor-options: /nostdlib /noconfig
2-
semmle-extractor-options: --load-sources-from-project:${testdir}/../../../resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj
2+
semmle-extractor-options: --load-sources-from-project:${testdir}/../../../resources/stubs/Newtonsoft.Json/13.0.1/Newtonsoft.Json.csproj
33
semmle-extractor-options: ${testdir}/../../../resources/stubs/System.Web.cs

0 commit comments

Comments
 (0)