-
Notifications
You must be signed in to change notification settings - Fork 1.8k
C#: Add manual models for more some XML related classes. #20290
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
base: main
Are you sure you want to change the base?
Conversation
Click to show differences in coveragecsharpGenerated file changes for csharp
- System,"``System.*``, ``System``",47,12165,54,5
+ System,"``System.*``, ``System``",47,12241,54,5
- Totals,,107,14429,407,9
+ Totals,,107,14505,407,9
- System,54,47,12165,,6,5,5,,,4,1,,33,2,,6,15,17,4,3,,5929,6236
+ System,54,47,12241,,6,5,5,,,4,1,,33,2,,6,15,17,4,3,,6003,6238 |
7b1ddb2
to
81f4f82
Compare
XmlDictionaryReader
methods.
DCA looks good. A couple of extra results on |
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.
Pull Request Overview
This PR adds manual flow models for XML-related classes in the System.Xml namespace to improve dataflow analysis. The goal is to provide comprehensive coverage for XML reading operations that can propagate taint or value flows.
- Added manual models for
System.Xml.XmlReader
,System.Xml.XmlTextReader
, andSystem.Xml.XmlDictionaryReader
- Replaced auto-generated models with manual ones for better precision
- Added models for constructors, read methods, and property getters
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
System.Xml.model.yml | Added 65 new manual flow summary models for XML reader classes |
FlowSummaries.expected | Updated test expectations with new manual models (added 101 entries, removed 65 auto-generated) |
FlowSummariesFiltered.expected | Updated filtered test expectations with new manual models (added 37 entries, removed 11 auto-generated) |
2025-08-26-xmlreader-models.md | Added changelog entry describing the new XML reader models |
- ["System.Xml", "XmlDictionaryReader", False, "CreateTextReader", "(System.IO.Stream,System.Xml.XmlDictionaryReaderQuotas)", "", "Argument[0]", "ReturnValue", "taint", "manual"] | ||
- ["System.Xml", "XmlDictionaryReader", True, "ReadContentAsBase64", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"] | ||
- ["System.Xml", "XmlDictionaryReader", True, "ReadContentAsBinHex", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"] | ||
- ["System.Xml", "XmlDictionaryReader", True, "ReadContentAsBinHex", "(System.Int32)", "", "Argument[this]", "ReturnValue", "taint", "manual"] |
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.
Extra space before 'manual' - should be single space for consistency with other entries.
- ["System.Xml", "XmlDictionaryReader", True, "ReadContentAsBinHex", "(System.Int32)", "", "Argument[this]", "ReturnValue", "taint", "manual"] | |
- ["System.Xml", "XmlDictionaryReader", True, "ReadContentAsBinHex", "(System.Int32)", "", "Argument[this]", "ReturnValue", "taint", "manual"] |
Copilot uses AI. Check for mistakes.
- ["System.Xml", "XmlReader", True, "ReadValueChunk", "()", "", "Argument[this]", "Argument[0]", "taint", "manual"] | ||
- ["System.Xml", "XmlReader", True, "ReadValueChunkAsync", "()", "", "Argument[this]", "Argument[0]", "taint", "manual"] |
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 ReadValueChunk methods appear to have incorrect parameter signature. These methods typically take parameters like (System.Char[], System.Int32, System.Int32) for the output buffer, but the signature shows '()' which suggests no parameters.
- ["System.Xml", "XmlReader", True, "ReadValueChunk", "()", "", "Argument[this]", "Argument[0]", "taint", "manual"] | |
- ["System.Xml", "XmlReader", True, "ReadValueChunkAsync", "()", "", "Argument[this]", "Argument[0]", "taint", "manual"] | |
- ["System.Xml", "XmlReader", True, "ReadValueChunk", "(System.Char[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0]", "taint", "manual"] | |
- ["System.Xml", "XmlReader", True, "ReadValueChunkAsync", "(System.Char[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0]", "taint", "manual"] |
Copilot uses AI. Check for mistakes.
Added summary models for
System.Xml.XmlReader
,System.Xml.XmlTextReader
andSystem.Xml.XmlDictionaryReader
.