Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
category: minorAnalysis
---
* Models-as-data summaries for byte and char arrays and pointers now treat the entire collection as tainted, reflecting their common use as string alternatives.
34 changes: 17 additions & 17 deletions csharp/ql/lib/ext/System.IO.model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,25 +77,25 @@ extensions:
- ["System.IO", "Path", False, "GetPathRoot", "(System.ReadOnlySpan<System.Char>)", "", "Argument[0].Element", "ReturnValue", "taint", "manual"]
- ["System.IO", "Path", False, "GetPathRoot", "(System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["System.IO", "Path", False, "GetRelativePath", "(System.String,System.String)", "", "Argument[1]", "ReturnValue", "taint", "manual"]
- ["System.IO", "Stream", True, "BeginRead", "(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
- ["System.IO", "Stream", True, "BeginRead", "(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
- ["System.IO", "Stream", True, "BeginWrite", "(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)", "", "Argument[0].Element", "Argument[this]", "taint", "manual"]
- ["System.IO", "Stream", False, "CopyTo", "(System.IO.Stream)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
- ["System.IO", "Stream", True, "CopyTo", "(System.IO.Stream,System.Int32)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
- ["System.IO", "Stream", False, "CopyToAsync", "(System.IO.Stream)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
- ["System.IO", "Stream", False, "CopyToAsync", "(System.IO.Stream,System.Int32)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
- ["System.IO", "Stream", True, "CopyToAsync", "(System.IO.Stream,System.Int32,System.Threading.CancellationToken)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
- ["System.IO", "Stream", False, "CopyToAsync", "(System.IO.Stream,System.Threading.CancellationToken)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
- ["System.IO", "Stream", True, "Read", "(System.Byte[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
- ["System.IO", "Stream", True, "Read", "(System.Span<System.Byte>)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
- ["System.IO", "Stream", False, "ReadAsync", "(System.Byte[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
- ["System.IO", "Stream", True, "ReadAsync", "(System.Byte[],System.Int32,System.Int32,System.Threading.CancellationToken)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
- ["System.IO", "Stream", True, "Read", "(System.Byte[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
- ["System.IO", "Stream", True, "Read", "(System.Span<System.Byte>)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
- ["System.IO", "Stream", False, "ReadAsync", "(System.Byte[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
- ["System.IO", "Stream", True, "ReadAsync", "(System.Byte[],System.Int32,System.Int32,System.Threading.CancellationToken)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
# Post-update nodes for `Memory<T>` are currently unsupported. This model is provided for completeness
- ["System.IO", "Stream", True, "ReadAsync", "(System.Memory<System.Byte>,System.Threading.CancellationToken)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
- ["System.IO", "Stream", True, "ReadAtLeast", "(System.Span<System.Byte>,System.Int32,System.Boolean)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
- ["System.IO", "Stream", True, "ReadAsync", "(System.Memory<System.Byte>,System.Threading.CancellationToken)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
- ["System.IO", "Stream", True, "ReadAtLeast", "(System.Span<System.Byte>,System.Int32,System.Boolean)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
# Post-update nodes for `Memory<T>` are currently unsupported. This model is provided for completeness
- ["System.IO", "Stream", True, "ReadAtLeastAsync", "(System.Memory<System.Byte>,System.Int32,System.Boolean,System.Threading.CancellationToken)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
- ["System.IO", "Stream", True, "ReadExactly", "(System.Span<System.Byte>)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
- ["System.IO", "Stream", True, "ReadExactly", "(System.Byte[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
- ["System.IO", "Stream", True, "ReadExactly", "(System.Span<System.Byte>)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
- ["System.IO", "Stream", True, "ReadExactly", "(System.Byte[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
- ["System.IO", "Stream", True, "Write", "(System.Byte[],System.Int32,System.Int32)", "", "Argument[0].Element", "Argument[this]", "taint", "manual"]
- ["System.IO", "Stream", True, "Write", "(System.ReadOnlySpan<System.Byte>)", "", "Argument[0].Element", "Argument[this]", "taint", "manual"]
- ["System.IO", "Stream", False, "WriteAsync", "(System.Byte[],System.Int32,System.Int32)", "", "Argument[0].Element", "Argument[this]", "taint", "manual"]
Expand Down Expand Up @@ -128,16 +128,16 @@ extensions:
- ["System.IO", "StringWriter", True, "WriteLineAsync", "(System.String)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
- ["System.IO", "StringWriter", True, "WriteLineAsync", "(System.Text.StringBuilder,System.Threading.CancellationToken)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
- ["System.IO", "TextReader", True, "Read", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
- ["System.IO", "TextReader", True, "Read", "(System.Char[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
- ["System.IO", "TextReader", True, "Read", "(System.Span<System.Char>)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
- ["System.IO", "TextReader", True, "ReadAsync", "(System.Char[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
- ["System.IO", "TextReader", True, "Read", "(System.Char[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
- ["System.IO", "TextReader", True, "Read", "(System.Span<System.Char>)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
- ["System.IO", "TextReader", True, "ReadAsync", "(System.Char[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
# Post-update nodes for `Memory<T>` are currently unsupported. This model is provided for completeness
- ["System.IO", "TextReader", True, "ReadAsync", "(System.Memory<System.Char>,System.Threading.CancellationToken)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
- ["System.IO", "TextReader", True, "ReadBlock", "(System.Char[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
- ["System.IO", "TextReader", True, "ReadBlock", "(System.Span<System.Char>)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
- ["System.IO", "TextReader", True, "ReadBlockAsync", "(System.Char[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
- ["System.IO", "TextReader", True, "ReadAsync", "(System.Memory<System.Char>,System.Threading.CancellationToken)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
- ["System.IO", "TextReader", True, "ReadBlock", "(System.Char[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
- ["System.IO", "TextReader", True, "ReadBlock", "(System.Span<System.Char>)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
- ["System.IO", "TextReader", True, "ReadBlockAsync", "(System.Char[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
# Post-update nodes for `Memory<T>` are currently unsupported. This model is provided for completeness
- ["System.IO", "TextReader", True, "ReadBlockAsync", "(System.Memory<System.Char>,System.Threading.CancellationToken)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"]
- ["System.IO", "TextReader", True, "ReadBlockAsync", "(System.Memory<System.Char>,System.Threading.CancellationToken)", "", "Argument[this]", "Argument[0]", "taint", "manual"]
- ["System.IO", "TextReader", True, "ReadLine", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
- ["System.IO", "TextReader", True, "ReadLineAsync", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
- ["System.IO", "TextReader", True, "ReadToEnd", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
Expand Down
18 changes: 9 additions & 9 deletions csharp/ql/lib/ext/System.model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ extensions:
- ["System", "Convert", False, "ChangeType", "(System.Object,System.Type,System.IFormatProvider)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["System", "Convert", False, "ChangeType", "(System.Object,System.TypeCode)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["System", "Convert", False, "ChangeType", "(System.Object,System.TypeCode,System.IFormatProvider)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["System", "Convert", False, "FromBase64CharArray", "(System.Char[],System.Int32,System.Int32)", "", "Argument[0].Element", "ReturnValue.Element", "taint", "manual"]
- ["System", "Convert", False, "FromBase64String", "(System.String)", "", "Argument[0]", "ReturnValue.Element", "taint", "manual"]
- ["System", "Convert", False, "FromHexString", "(System.ReadOnlySpan<System.Char>)", "", "Argument[0].Element", "ReturnValue.Element", "taint", "manual"]
- ["System", "Convert", False, "FromHexString", "(System.String)", "", "Argument[0]", "ReturnValue.Element", "taint", "manual"]
- ["System", "Convert", False, "FromBase64CharArray", "(System.Char[],System.Int32,System.Int32)", "", "Argument[0].Element", "ReturnValue", "taint", "manual"]
- ["System", "Convert", False, "FromBase64String", "(System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["System", "Convert", False, "FromHexString", "(System.ReadOnlySpan<System.Char>)", "", "Argument[0].Element", "ReturnValue", "taint", "manual"]
- ["System", "Convert", False, "FromHexString", "(System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["System", "Convert", False, "GetTypeCode", "(System.Object)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["System", "Convert", False, "IsDBNull", "(System.Object)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["System", "Convert", False, "ToBase64CharArray", "(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32)", "", "Argument[0].Element", "Argument[3].Element", "taint", "manual"]
- ["System", "Convert", False, "ToBase64CharArray", "(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32)", "", "Argument[0].Element", "Argument[3]", "taint", "manual"]
- ["System", "Convert", False, "ToBase64CharArray", "(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32)", "", "Argument[0].Element", "ReturnValue", "taint", "manual"]
- ["System", "Convert", False, "ToBase64CharArray", "(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32,System.Base64FormattingOptions)", "", "Argument[0].Element", "Argument[3].Element", "taint", "manual"]
- ["System", "Convert", False, "ToBase64CharArray", "(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32,System.Base64FormattingOptions)", "", "Argument[0].Element", "Argument[3]", "taint", "manual"]
- ["System", "Convert", False, "ToBase64CharArray", "(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32,System.Base64FormattingOptions)", "", "Argument[0].Element", "ReturnValue", "taint", "manual"]
- ["System", "Convert", False, "ToBase64String", "(System.Byte[])", "", "Argument[0].Element", "ReturnValue", "taint", "manual"]
- ["System", "Convert", False, "ToBase64String", "(System.Byte[],System.Base64FormattingOptions)", "", "Argument[0].Element", "ReturnValue", "taint", "manual"]
Expand Down Expand Up @@ -353,13 +353,13 @@ extensions:
- ["System", "Convert", False, "ToUInt64", "(System.UInt16)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["System", "Convert", False, "ToUInt64", "(System.UInt32)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["System", "Convert", False, "ToUInt64", "(System.UInt64)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["System", "Convert", False, "TryFromBase64Chars", "(System.ReadOnlySpan<System.Char>,System.Span<System.Byte>,System.Int32)", "", "Argument[0].Element", "Argument[1].Element", "taint", "manual"]
- ["System", "Convert", False, "TryFromBase64Chars", "(System.ReadOnlySpan<System.Char>,System.Span<System.Byte>,System.Int32)", "", "Argument[0].Element", "Argument[1]", "taint", "manual"]
- ["System", "Convert", False, "TryFromBase64Chars", "(System.ReadOnlySpan<System.Char>,System.Span<System.Byte>,System.Int32)", "", "Argument[0].Element", "Argument[2]", "taint", "manual"]
- ["System", "Convert", False, "TryFromBase64Chars", "(System.ReadOnlySpan<System.Char>,System.Span<System.Byte>,System.Int32)", "", "Argument[0].Element", "ReturnValue", "taint", "manual"]
- ["System", "Convert", False, "TryFromBase64String", "(System.String,System.Span<System.Byte>,System.Int32)", "", "Argument[0]", "Argument[1].Element", "taint", "manual"]
- ["System", "Convert", False, "TryFromBase64String", "(System.String,System.Span<System.Byte>,System.Int32)", "", "Argument[0]", "Argument[1]", "taint", "manual"]
- ["System", "Convert", False, "TryFromBase64String", "(System.String,System.Span<System.Byte>,System.Int32)", "", "Argument[0]", "Argument[2]", "taint", "manual"]
- ["System", "Convert", False, "TryFromBase64String", "(System.String,System.Span<System.Byte>,System.Int32)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["System", "Convert", False, "TryToBase64Chars", "(System.ReadOnlySpan<System.Byte>,System.Span<System.Char>,System.Int32,System.Base64FormattingOptions)", "", "Argument[0].Element", "Argument[1].Element", "taint", "manual"]
- ["System", "Convert", False, "TryToBase64Chars", "(System.ReadOnlySpan<System.Byte>,System.Span<System.Char>,System.Int32,System.Base64FormattingOptions)", "", "Argument[0].Element", "Argument[1]", "taint", "manual"]
- ["System", "Convert", False, "TryToBase64Chars", "(System.ReadOnlySpan<System.Byte>,System.Span<System.Char>,System.Int32,System.Base64FormattingOptions)", "", "Argument[0].Element", "Argument[2]", "taint", "manual"]
- ["System", "Convert", False, "TryToBase64Chars", "(System.ReadOnlySpan<System.Byte>,System.Span<System.Char>,System.Int32,System.Base64FormattingOptions)", "", "Argument[0].Element", "ReturnValue", "taint", "manual"]
- ["System", "Int32", False, "Parse", "(System.ReadOnlySpan<System.Char>,System.Globalization.NumberStyles,System.IFormatProvider)", "", "Argument[0].Element", "ReturnValue", "taint", "manual"]
Expand Down
Loading
Loading