Skip to content

Commit e0034e5

Browse files
committed
csharp update MaD for HttpRequestMessage and UriBuilder
1 parent 7619f1d commit e0034e5

File tree

4 files changed

+87
-12
lines changed

4 files changed

+87
-12
lines changed

csharp/ql/lib/ext/System.Net.Http.model.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ extensions:
1010
data:
1111
- ["System.Net.Http", "HttpRequestMessage", False, "HttpRequestMessage", "(System.Net.Http.HttpMethod,System.String)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
1212
- ["System.Net.Http", "HttpRequestMessage", False, "HttpRequestMessage", "(System.Net.Http.HttpMethod,System.String)", "", "Argument[1]", "Argument[this]", "taint", "manual"]
13+
- ["System.Net.Http", "HttpRequestMessage", False, "HttpRequestMessage", "(System.Net.Http.HttpMethod,System.Uri)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
14+
- ["System.Net.Http", "HttpRequestMessage", False, "HttpRequestMessage", "(System.Net.Http.HttpMethod,System.Uri)", "", "Argument[1]", "Argument[this]", "taint", "manual"]
1315
- ["System.Net.Http", "HttpRequestOptions", False, "Add", "(System.Collections.Generic.KeyValuePair<System.String,System.Object>)", "", "Argument[0].Property[System.Collections.Generic.KeyValuePair`2.Key]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair`2.Key]", "value", "manual"]
1416
- ["System.Net.Http", "HttpRequestOptions", False, "Add", "(System.Collections.Generic.KeyValuePair<System.String,System.Object>)", "", "Argument[0].Property[System.Collections.Generic.KeyValuePair`2.Value]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair`2.Value]", "value", "manual"]
1517
- ["System.Net.Http", "MultipartContent", False, "Add", "(System.Net.Http.HttpContent)", "", "Argument[0]", "Argument[this].Element", "value", "manual"]

csharp/ql/lib/ext/System.model.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,33 @@ extensions:
784784
- ["System", "Uri", False, "get_OriginalString", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
785785
- ["System", "Uri", False, "get_PathAndQuery", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
786786
- ["System", "Uri", False, "get_Query", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
787+
- ["System", "UriBuilder", False, "ToString", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
788+
- ["System", "UriBuilder", False, "UriBuilder", "(System.String,System.String)", "", "Argument[0]", "Argument[this].SyntheticField[System.UriBuilder._uri]", "taint", "manual"]
789+
- ["System", "UriBuilder", False, "UriBuilder", "(System.String,System.String)", "", "Argument[1]", "Argument[this].SyntheticField[System.UriBuilder._uri]", "taint", "manual"]
790+
- ["System", "UriBuilder", False, "UriBuilder", "(System.String,System.String,System.Int32)", "", "Argument[0]", "Argument[this].SyntheticField[System.UriBuilder._uri]", "taint", "manual"]
791+
- ["System", "UriBuilder", False, "UriBuilder", "(System.String,System.String,System.Int32)", "", "Argument[1]", "Argument[this].SyntheticField[System.UriBuilder._uri]", "taint", "manual"]
792+
- ["System", "UriBuilder", False, "UriBuilder", "(System.String,System.String,System.Int32)", "", "Argument[2]", "Argument[this].SyntheticField[System.UriBuilder._uri]", "taint", "manual"]
793+
- ["System", "UriBuilder", False, "UriBuilder", "(System.String,System.String,System.Int32,System.String)", "", "Argument[0]", "Argument[this].SyntheticField[System.UriBuilder._uri]", "taint", "manual"]
794+
- ["System", "UriBuilder", False, "UriBuilder", "(System.String,System.String,System.Int32,System.String)", "", "Argument[1]", "Argument[this].SyntheticField[System.UriBuilder._uri]", "taint", "manual"]
795+
- ["System", "UriBuilder", False, "UriBuilder", "(System.String,System.String,System.Int32,System.String)", "", "Argument[2]", "Argument[this].SyntheticField[System.UriBuilder._uri]", "taint", "manual"]
796+
- ["System", "UriBuilder", False, "UriBuilder", "(System.String,System.String,System.Int32,System.String)", "", "Argument[3]", "Argument[this].SyntheticField[System.UriBuilder._uri]", "taint", "manual"]
797+
- ["System", "UriBuilder", False, "UriBuilder", "(System.String,System.String,System.Int32,System.String,System.String)", "", "Argument[0]", "Argument[this].SyntheticField[System.UriBuilder._uri]", "taint", "manual"]
798+
- ["System", "UriBuilder", False, "UriBuilder", "(System.String,System.String,System.Int32,System.String,System.String)", "", "Argument[1]", "Argument[this].SyntheticField[System.UriBuilder._uri]", "taint", "manual"]
799+
- ["System", "UriBuilder", False, "UriBuilder", "(System.String,System.String,System.Int32,System.String,System.String)", "", "Argument[2]", "Argument[this].SyntheticField[System.UriBuilder._uri]", "taint", "manual"]
800+
- ["System", "UriBuilder", False, "UriBuilder", "(System.String,System.String,System.Int32,System.String,System.String)", "", "Argument[3]", "Argument[this].SyntheticField[System.UriBuilder._uri]", "taint", "manual"]
801+
- ["System", "UriBuilder", False, "UriBuilder", "(System.String,System.String,System.Int32,System.String,System.String)", "", "Argument[4]", "Argument[this].SyntheticField[System.UriBuilder._uri]", "taint", "manual"]
802+
- ["System", "UriBuilder", False, "get_Fragment", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
803+
- ["System", "UriBuilder", False, "get_Host", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
804+
- ["System", "UriBuilder", False, "get_Path", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
805+
- ["System", "UriBuilder", False, "get_Port", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
806+
- ["System", "UriBuilder", False, "get_Query", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
807+
- ["System", "UriBuilder", False, "get_Scheme", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
808+
- ["System", "UriBuilder", False, "set_Fragment", "(System.String)", "", "Argument[0]", "Argument[this].SyntheticField[System.UriBuilder._uri]", "taint", "manual"]
809+
- ["System", "UriBuilder", False, "set_Host", "(System.String)", "", "Argument[0]", "Argument[this].SyntheticField[System.UriBuilder._uri]", "taint", "manual"]
810+
- ["System", "UriBuilder", False, "set_Path", "(System.String)", "", "Argument[0]", "Argument[this].SyntheticField[System.UriBuilder._uri]", "taint", "manual"]
811+
- ["System", "UriBuilder", False, "set_Port", "(System.Int32)", "", "Argument[0]", "Argument[this].SyntheticField[System.UriBuilder._uri]", "taint", "manual"]
812+
- ["System", "UriBuilder", False, "set_Query", "(System.String)", "", "Argument[0]", "Argument[this].SyntheticField[System.UriBuilder._uri]", "taint", "manual"]
813+
- ["System", "UriBuilder", False, "set_Scheme", "(System.String)", "", "Argument[0]", "Argument[this].SyntheticField[System.UriBuilder._uri]", "taint", "manual"]
787814
- ["System", "ValueTuple", False, "Create<T1,T2,T3,T4,T5,T6,T7,T8>", "(T1,T2,T3,T4,T5,T6,T7,T8)", "", "Argument[0]", "ReturnValue.Field[System.ValueTuple`8.Item1]", "value", "manual"]
788815
- ["System", "ValueTuple", False, "Create<T1,T2,T3,T4,T5,T6,T7,T8>", "(T1,T2,T3,T4,T5,T6,T7,T8)", "", "Argument[1]", "ReturnValue.Field[System.ValueTuple`8.Item2]", "value", "manual"]
789816
- ["System", "ValueTuple", False, "Create<T1,T2,T3,T4,T5,T6,T7,T8>", "(T1,T2,T3,T4,T5,T6,T7,T8)", "", "Argument[2]", "ReturnValue.Field[System.ValueTuple`8.Item3]", "value", "manual"]

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

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13779,8 +13779,8 @@ summary
1377913779
| System.Net.Http;HttpMethod;get_Method;();Argument[this].SyntheticField[System.Net.Http.HttpMethod._method];ReturnValue;value;dfc-generated |
1378013780
| System.Net.Http;HttpRequestMessage;HttpRequestMessage;(System.Net.Http.HttpMethod,System.String);Argument[0];Argument[this];taint;manual |
1378113781
| System.Net.Http;HttpRequestMessage;HttpRequestMessage;(System.Net.Http.HttpMethod,System.String);Argument[1];Argument[this];taint;manual |
13782-
| System.Net.Http;HttpRequestMessage;HttpRequestMessage;(System.Net.Http.HttpMethod,System.Uri);Argument[0];Argument[this].SyntheticField[System.Net.Http.HttpRequestMessage._method];value;dfc-generated |
13783-
| System.Net.Http;HttpRequestMessage;HttpRequestMessage;(System.Net.Http.HttpMethod,System.Uri);Argument[1];Argument[this].SyntheticField[System.Net.Http.HttpRequestMessage._requestUri];value;dfc-generated |
13782+
| System.Net.Http;HttpRequestMessage;HttpRequestMessage;(System.Net.Http.HttpMethod,System.Uri);Argument[0];Argument[this];taint;manual |
13783+
| System.Net.Http;HttpRequestMessage;HttpRequestMessage;(System.Net.Http.HttpMethod,System.Uri);Argument[1];Argument[this];taint;manual |
1378413784
| System.Net.Http;HttpRequestMessage;ToString;();Argument[this].SyntheticField[System.Net.Http.HttpRequestMessage._method];ReturnValue;taint;dfc-generated |
1378513785
| System.Net.Http;HttpRequestMessage;ToString;();Argument[this].SyntheticField[System.Net.Http.HttpRequestMessage._requestUri];ReturnValue;taint;dfc-generated |
1378613786
| System.Net.Http;HttpRequestMessage;get_Properties;();Argument[this].Property[System.Net.Http.HttpRequestMessage.Options];ReturnValue;value;dfc-generated |
@@ -22234,13 +22234,36 @@ summary
2223422234
| System;Uri;get_Query;();Argument[this];ReturnValue;taint;manual |
2223522235
| System;Uri;get_Scheme;();Argument[this];ReturnValue;taint;df-generated |
2223622236
| System;Uri;get_UserInfo;();Argument[this];ReturnValue;taint;df-generated |
22237+
| System;UriBuilder;ToString;();Argument[this];ReturnValue;taint;manual |
2223722238
| System;UriBuilder;UriBuilder;(System.String);Argument[0];Argument[this].SyntheticField[System.UriBuilder._uri];taint;dfc-generated |
22238-
| System;UriBuilder;UriBuilder;(System.String,System.String);Argument[0];Argument[this];taint;df-generated |
22239-
| System;UriBuilder;UriBuilder;(System.String,System.String);Argument[1];Argument[this];taint;df-generated |
22240-
| System;UriBuilder;UriBuilder;(System.String,System.String,System.Int32,System.String);Argument[3];Argument[this];taint;df-generated |
22241-
| System;UriBuilder;UriBuilder;(System.String,System.String,System.Int32,System.String,System.String);Argument[4];Argument[this];taint;df-generated |
22239+
| System;UriBuilder;UriBuilder;(System.String,System.String);Argument[0];Argument[this].SyntheticField[System.UriBuilder._uri];taint;manual |
22240+
| System;UriBuilder;UriBuilder;(System.String,System.String);Argument[1];Argument[this].SyntheticField[System.UriBuilder._uri];taint;manual |
22241+
| System;UriBuilder;UriBuilder;(System.String,System.String,System.Int32);Argument[0];Argument[this].SyntheticField[System.UriBuilder._uri];taint;manual |
22242+
| System;UriBuilder;UriBuilder;(System.String,System.String,System.Int32);Argument[1];Argument[this].SyntheticField[System.UriBuilder._uri];taint;manual |
22243+
| System;UriBuilder;UriBuilder;(System.String,System.String,System.Int32);Argument[2];Argument[this].SyntheticField[System.UriBuilder._uri];taint;manual |
22244+
| System;UriBuilder;UriBuilder;(System.String,System.String,System.Int32,System.String);Argument[0];Argument[this].SyntheticField[System.UriBuilder._uri];taint;manual |
22245+
| System;UriBuilder;UriBuilder;(System.String,System.String,System.Int32,System.String);Argument[1];Argument[this].SyntheticField[System.UriBuilder._uri];taint;manual |
22246+
| System;UriBuilder;UriBuilder;(System.String,System.String,System.Int32,System.String);Argument[2];Argument[this].SyntheticField[System.UriBuilder._uri];taint;manual |
22247+
| System;UriBuilder;UriBuilder;(System.String,System.String,System.Int32,System.String);Argument[3];Argument[this].SyntheticField[System.UriBuilder._uri];taint;manual |
22248+
| System;UriBuilder;UriBuilder;(System.String,System.String,System.Int32,System.String,System.String);Argument[0];Argument[this].SyntheticField[System.UriBuilder._uri];taint;manual |
22249+
| System;UriBuilder;UriBuilder;(System.String,System.String,System.Int32,System.String,System.String);Argument[1];Argument[this].SyntheticField[System.UriBuilder._uri];taint;manual |
22250+
| System;UriBuilder;UriBuilder;(System.String,System.String,System.Int32,System.String,System.String);Argument[2];Argument[this].SyntheticField[System.UriBuilder._uri];taint;manual |
22251+
| System;UriBuilder;UriBuilder;(System.String,System.String,System.Int32,System.String,System.String);Argument[3];Argument[this].SyntheticField[System.UriBuilder._uri];taint;manual |
22252+
| System;UriBuilder;UriBuilder;(System.String,System.String,System.Int32,System.String,System.String);Argument[4];Argument[this].SyntheticField[System.UriBuilder._uri];taint;manual |
2224222253
| System;UriBuilder;UriBuilder;(System.Uri);Argument[0];Argument[this].SyntheticField[System.UriBuilder._uri];value;dfc-generated |
22254+
| System;UriBuilder;get_Fragment;();Argument[this];ReturnValue;taint;manual |
22255+
| System;UriBuilder;get_Host;();Argument[this];ReturnValue;taint;manual |
22256+
| System;UriBuilder;get_Path;();Argument[this];ReturnValue;taint;manual |
22257+
| System;UriBuilder;get_Port;();Argument[this];ReturnValue;taint;manual |
22258+
| System;UriBuilder;get_Query;();Argument[this];ReturnValue;taint;manual |
22259+
| System;UriBuilder;get_Scheme;();Argument[this];ReturnValue;taint;manual |
2224322260
| System;UriBuilder;get_Uri;();Argument[this].SyntheticField[System.UriBuilder._uri];ReturnValue;value;dfc-generated |
22261+
| System;UriBuilder;set_Fragment;(System.String);Argument[0];Argument[this].SyntheticField[System.UriBuilder._uri];taint;manual |
22262+
| System;UriBuilder;set_Host;(System.String);Argument[0];Argument[this].SyntheticField[System.UriBuilder._uri];taint;manual |
22263+
| System;UriBuilder;set_Path;(System.String);Argument[0];Argument[this].SyntheticField[System.UriBuilder._uri];taint;manual |
22264+
| System;UriBuilder;set_Port;(System.Int32);Argument[0];Argument[this].SyntheticField[System.UriBuilder._uri];taint;manual |
22265+
| System;UriBuilder;set_Query;(System.String);Argument[0];Argument[this].SyntheticField[System.UriBuilder._uri];taint;manual |
22266+
| System;UriBuilder;set_Scheme;(System.String);Argument[0];Argument[this].SyntheticField[System.UriBuilder._uri];taint;manual |
2224422267
| System;UriFormatException;GetObjectData;(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext);Argument[this];Argument[0];taint;df-generated |
2224522268
| System;UriParser;GetComponents;(System.Uri,System.UriComponents,System.UriFormat);Argument[0];ReturnValue;taint;df-generated |
2224622269
| System;UriParser;OnNewUri;();Argument[this];ReturnValue;value;dfc-generated |

0 commit comments

Comments
 (0)