New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C#: Introduce flow summaries for StringValues. #7465
base: main
Are you sure you want to change the base?
Conversation
Click to show differences in coveragecsharpGenerated file changes for csharp
- Others,"``Dapper``, ``Microsoft.ApplicationBlocks.Data``, ``Microsoft.VisualBasic``, ``MySql.Data.MySqlClient``, ``Newtonsoft.Json``",,95,131,
+ Others,"``Dapper``, ``Microsoft.ApplicationBlocks.Data``, ``Microsoft.Extensions.Primitives``, ``Microsoft.VisualBasic``, ``MySql.Data.MySqlClient``, ``Newtonsoft.Json``",,149,131,
- Totals,,3,2438,353,5
+ Totals,,3,2492,353,5
+ Microsoft.Extensions.Primitives,,,54,,,,,,,54, |
Click to show differences in coveragecsharpGenerated file changes for csharp
- Others,"``Dapper``, ``Microsoft.ApplicationBlocks.Data``, ``Microsoft.VisualBasic``, ``MySql.Data.MySqlClient``, ``Newtonsoft.Json``",,95,131,
+ Others,"``Dapper``, ``Microsoft.ApplicationBlocks.Data``, ``Microsoft.Extensions.Primitives``, ``Microsoft.VisualBasic``, ``MySql.Data.MySqlClient``, ``Newtonsoft.Json``",,149,131,
- Totals,,3,2438,353,5
+ Totals,,3,2492,353,5
+ Microsoft.Extensions.Primitives,,,54,,,,,,,54, |
| @@ -4,15 +4,12 @@ edges | |||
| | UrlRedirect.cs:37:44:37:66 | access to property QueryString : NameValueCollection | UrlRedirect.cs:37:44:37:74 | access to indexer | | |||
| | UrlRedirect.cs:38:47:38:69 | access to property QueryString : NameValueCollection | UrlRedirect.cs:38:47:38:77 | access to indexer | | |||
| | UrlRedirectCore.cs:13:44:13:48 | value : String | UrlRedirectCore.cs:16:22:16:26 | access to parameter value | | |||
| | UrlRedirectCore.cs:13:44:13:48 | value : String | UrlRedirectCore.cs:19:44:19:48 | access to parameter value : String | | |||
| | UrlRedirectCore.cs:13:44:13:48 | value : String | UrlRedirectCore.cs:25:46:25:50 | access to parameter value : String | | |||
| | UrlRedirectCore.cs:13:44:13:48 | value : String | UrlRedirectCore.cs:19:44:19:48 | call to operator implicit conversion | | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hvitved : This looks like some kind of edge contraction (where the access and the implicit operator call now have been turned into a single edge), but that the equivalent flows have been identified. Do you know more about this?
| private import semmle.code.csharp.dataflow.ExternalFlow | ||
|
|
||
| /** Data flow for `Microsoft.Extensions.Primitives.StringValues`. */ | ||
| private class MicrosoftVisualBasicCollectionFlowModelCsv extends SummaryModelCsv { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy-paste typo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Will fix.
| @@ -1,3 +1,66 @@ | |||
| | Microsoft.Extensions.Primitives;StringTokenizer;false;GetEnumerator;();;Element of Argument[-1];Property[System.Collections.Generic.IEnumerator<>.Current] of ReturnValue;value | | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why were these not in the output before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The struct StringTokenizer stub has just been included as a part of Microsoft.Extensions.Primitives (note that these are derived summaries).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why has FlowSummariesFiltered.expected then changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Microsoft.Extensions.Primitives was included because it contains the StringValues struct. Before the FlowSummaries test didn't know about this struct and couldn't generate any test output for it.
Click to show differences in coveragecsharpGenerated file changes for csharp
- Others,"``Dapper``, ``Microsoft.ApplicationBlocks.Data``, ``Microsoft.VisualBasic``, ``MySql.Data.MySqlClient``, ``Newtonsoft.Json``",,95,131,
+ Others,"``Dapper``, ``Microsoft.ApplicationBlocks.Data``, ``Microsoft.Extensions.Primitives``, ``Microsoft.VisualBasic``, ``MySql.Data.MySqlClient``, ``Newtonsoft.Json``",,149,131,
- Totals,,3,2438,353,5
+ Totals,,3,2492,353,5
+ Microsoft.Extensions.Primitives,,,54,,,,,,,54, |
Click to show differences in coveragecsharpGenerated file changes for csharp
- Others,"``Dapper``, ``Microsoft.ApplicationBlocks.Data``, ``Microsoft.VisualBasic``, ``MySql.Data.MySqlClient``, ``Newtonsoft.Json``",,95,131,
+ Others,"``Dapper``, ``Microsoft.ApplicationBlocks.Data``, ``Microsoft.Extensions.Primitives``, ``Microsoft.VisualBasic``, ``MySql.Data.MySqlClient``, ``Newtonsoft.Json``",,149,131,
- Totals,,3,2438,353,5
+ Totals,,3,2492,353,5
+ Microsoft.Extensions.Primitives,,,54,,,,,,,54, |
…tives.StringValues.
…mport csharp (test module).
…t.Extensions.Primitives.
…rt csharp test module.
Click to show differences in coveragecsharpGenerated file changes for csharp
- Others,"``Dapper``, ``Microsoft.ApplicationBlocks.Data``, ``Microsoft.VisualBasic``, ``MySql.Data.MySqlClient``, ``Newtonsoft.Json``",,95,131,
+ Others,"``Dapper``, ``Microsoft.ApplicationBlocks.Data``, ``Microsoft.Extensions.Primitives``, ``Microsoft.VisualBasic``, ``MySql.Data.MySqlClient``, ``Newtonsoft.Json``",,149,131,
- Totals,,3,2438,353,5
+ Totals,,3,2492,353,5
+ Microsoft.Extensions.Primitives,,,54,,,,,,,54, |
The purpose of this PR is to introduce flow summarries for the StringValues struct.
Currently, the FlowSummaries test cases do not include a stub for the StringValues struct.
That is, in this PR we
@hvitved : Added some description of the purpose of this PR.
The text was updated successfully, but these errors were encountered: