Skip to content

Commit e70a49a

Browse files
committed
C#: Add some manual models for ProcessStartInfo.
1 parent db48461 commit e70a49a

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ extensions:
99
- ["System.Diagnostics", "ActivityTagsCollection", 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"]
1010
- ["System.Diagnostics", "ActivityTagsCollection", False, "GetEnumerator", "()", "", "Argument[this].Element", "ReturnValue.Property[System.Diagnostics.ActivityTagsCollection+Enumerator.Current]", "value", "manual"]
1111
- ["System.Diagnostics", "ProcessModuleCollection", False, "CopyTo", "(System.Diagnostics.ProcessModule[],System.Int32)", "", "Argument[this].Element", "Argument[0].Element", "value", "manual"]
12+
- ["System.Diagnostics", "ProcessStartInfo", False, "ProcessStartInfo", "(System.String)", "", "Argument[0]", "Argument[this].Property[System.Diagnostics.ProcessStartInfo.FileName]", "value", "manual"]
13+
- ["System.Diagnostics", "ProcessStartInfo", False, "ProcessStartInfo", "(System.String,System.String)", "", "Argument[0]", "Argument[this].Property[System.Diagnostics.ProcessStartInfo.FileName]", "value", "manual"]
14+
- ["System.Diagnostics", "ProcessStartInfo", False, "ProcessStartInfo", "(System.String,System.String)", "", "Argument[1]", "Argument[this].Property[System.Diagnostics.ProcessStartInfo.Arguments]", "value", "manual"]
1215
- ["System.Diagnostics", "ProcessThreadCollection", False, "Add", "(System.Diagnostics.ProcessThread)", "", "Argument[0]", "Argument[this].Element", "value", "manual"]
1316
- ["System.Diagnostics", "ProcessThreadCollection", False, "CopyTo", "(System.Diagnostics.ProcessThread[],System.Int32)", "", "Argument[this].Element", "Argument[0].Element", "value", "manual"]
1417
- ["System.Diagnostics", "TraceListenerCollection", False, "Add", "(System.Diagnostics.TraceListener)", "", "Argument[0]", "Argument[this].Element", "value", "manual"]

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8735,10 +8735,10 @@ summary
87358735
| System.Diagnostics;ProcessModule;false;get_FileName;();;Argument[this];ReturnValue;taint;df-generated |
87368736
| System.Diagnostics;ProcessModule;false;get_ModuleName;();;Argument[this];ReturnValue;taint;df-generated |
87378737
| System.Diagnostics;ProcessModuleCollection;false;CopyTo;(System.Diagnostics.ProcessModule[],System.Int32);;Argument[this].Element;Argument[0].Element;value;manual |
8738-
| System.Diagnostics;ProcessStartInfo;false;ProcessStartInfo;(System.String);;Argument[0];Argument[this];taint;df-generated |
8738+
| System.Diagnostics;ProcessStartInfo;false;ProcessStartInfo;(System.String);;Argument[0];Argument[this].Property[System.Diagnostics.ProcessStartInfo.FileName];value;manual |
87398739
| System.Diagnostics;ProcessStartInfo;false;ProcessStartInfo;(System.String,System.Collections.Generic.IEnumerable<System.String>);;Argument[0];Argument[this];taint;df-generated |
8740-
| System.Diagnostics;ProcessStartInfo;false;ProcessStartInfo;(System.String,System.String);;Argument[0];Argument[this];taint;df-generated |
8741-
| System.Diagnostics;ProcessStartInfo;false;ProcessStartInfo;(System.String,System.String);;Argument[1];Argument[this];taint;df-generated |
8740+
| System.Diagnostics;ProcessStartInfo;false;ProcessStartInfo;(System.String,System.String);;Argument[0];Argument[this].Property[System.Diagnostics.ProcessStartInfo.FileName];value;manual |
8741+
| System.Diagnostics;ProcessStartInfo;false;ProcessStartInfo;(System.String,System.String);;Argument[1];Argument[this].Property[System.Diagnostics.ProcessStartInfo.Arguments];value;manual |
87428742
| System.Diagnostics;ProcessStartInfo;false;get_Environment;();;Argument[this];ReturnValue;taint;df-generated |
87438743
| System.Diagnostics;ProcessStartInfo;false;get_EnvironmentVariables;();;Argument[this];ReturnValue;taint;df-generated |
87448744
| System.Diagnostics;ProcessThreadCollection;false;Add;(System.Diagnostics.ProcessThread);;Argument[0];Argument[this].Element;value;manual |

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6706,10 +6706,10 @@
67066706
| System.Diagnostics;ProcessModule;false;get_FileName;();;Argument[this];ReturnValue;taint;df-generated |
67076707
| System.Diagnostics;ProcessModule;false;get_ModuleName;();;Argument[this];ReturnValue;taint;df-generated |
67086708
| System.Diagnostics;ProcessModuleCollection;false;CopyTo;(System.Diagnostics.ProcessModule[],System.Int32);;Argument[this].Element;Argument[0].Element;value;manual |
6709-
| System.Diagnostics;ProcessStartInfo;false;ProcessStartInfo;(System.String);;Argument[0];Argument[this];taint;df-generated |
6709+
| System.Diagnostics;ProcessStartInfo;false;ProcessStartInfo;(System.String);;Argument[0];Argument[this].Property[System.Diagnostics.ProcessStartInfo.FileName];value;manual |
67106710
| System.Diagnostics;ProcessStartInfo;false;ProcessStartInfo;(System.String,System.Collections.Generic.IEnumerable<System.String>);;Argument[0];Argument[this];taint;df-generated |
6711-
| System.Diagnostics;ProcessStartInfo;false;ProcessStartInfo;(System.String,System.String);;Argument[0];Argument[this];taint;df-generated |
6712-
| System.Diagnostics;ProcessStartInfo;false;ProcessStartInfo;(System.String,System.String);;Argument[1];Argument[this];taint;df-generated |
6711+
| System.Diagnostics;ProcessStartInfo;false;ProcessStartInfo;(System.String,System.String);;Argument[0];Argument[this].Property[System.Diagnostics.ProcessStartInfo.FileName];value;manual |
6712+
| System.Diagnostics;ProcessStartInfo;false;ProcessStartInfo;(System.String,System.String);;Argument[1];Argument[this].Property[System.Diagnostics.ProcessStartInfo.Arguments];value;manual |
67136713
| System.Diagnostics;ProcessStartInfo;false;get_Environment;();;Argument[this];ReturnValue;taint;df-generated |
67146714
| System.Diagnostics;ProcessStartInfo;false;get_EnvironmentVariables;();;Argument[this];ReturnValue;taint;df-generated |
67156715
| System.Diagnostics;ProcessThreadCollection;false;Add;(System.Diagnostics.ProcessThread);;Argument[0];Argument[this].Element;value;manual |

0 commit comments

Comments
 (0)