Skip to content

Commit 3430a98

Browse files
committed
update expected output
1 parent ec08055 commit 3430a98

File tree

40 files changed

+299
-299
lines changed

40 files changed

+299
-299
lines changed

csharp/ql/test/experimental/CWE-918/RequestForgery.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ nodes
55
| RequestForgery.cs:16:66:16:68 | access to parameter url | semmle.label | access to parameter url |
66
subpaths
77
#select
8-
| RequestForgery.cs:16:66:16:68 | access to parameter url | RequestForgery.cs:14:52:14:54 | url : String | RequestForgery.cs:16:66:16:68 | access to parameter url | $@ flows to here and is used in a server side web request. | RequestForgery.cs:14:52:14:54 | url | User-provided value |
8+
| RequestForgery.cs:16:66:16:68 | access to parameter url | RequestForgery.cs:14:52:14:54 | url : String | RequestForgery.cs:16:66:16:68 | access to parameter url | The URL of this request depends on a $@. | RequestForgery.cs:14:52:14:54 | url | user-provided value |

csharp/ql/test/experimental/Security Features/backdoor/PotentialTimeBomb.expected

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ edges
1010
| test.cs:70:36:70:70 | call to method AddHours : DateTime | test.cs:70:13:70:71 | call to method CompareTo |
1111
| test.cs:70:36:70:70 | call to method AddHours : DateTime | test.cs:70:13:70:71 | call to method CompareTo : Int32 |
1212
#select
13-
| test.cs:70:9:73:9 | if (...) ... | test.cs:68:34:68:76 | call to method GetLastWriteTime : DateTime | test.cs:70:13:70:71 | call to method CompareTo | Possible TimeBomb logic triggered by $@ that takes into account $@ from the $@ as part of the potential trigger. | test.cs:70:13:70:71 | call to method CompareTo | call to method CompareTo | test.cs:70:36:70:70 | call to method AddHours | an offset | test.cs:68:34:68:76 | call to method GetLastWriteTime | last modification time of a file |
14-
| test.cs:70:9:73:9 | if (...) ... | test.cs:68:34:68:76 | call to method GetLastWriteTime : DateTime | test.cs:70:13:70:71 | call to method CompareTo : Int32 | Possible TimeBomb logic triggered by $@ that takes into account $@ from the $@ as part of the potential trigger. | test.cs:70:13:70:71 | call to method CompareTo | call to method CompareTo | test.cs:70:36:70:70 | call to method AddHours | an offset | test.cs:68:34:68:76 | call to method GetLastWriteTime | last modification time of a file |
15-
| test.cs:70:9:73:9 | if (...) ... | test.cs:68:34:68:76 | call to method GetLastWriteTime : DateTime | test.cs:70:13:70:76 | ... >= ... | Possible TimeBomb logic triggered by $@ that takes into account $@ from the $@ as part of the potential trigger. | test.cs:70:13:70:71 | call to method CompareTo | call to method CompareTo | test.cs:70:36:70:70 | call to method AddHours | an offset | test.cs:68:34:68:76 | call to method GetLastWriteTime | last modification time of a file |
16-
| test.cs:70:9:73:9 | if (...) ... | test.cs:68:34:68:76 | call to method GetLastWriteTime : DateTime | test.cs:70:13:70:76 | ... >= ... : Boolean | Possible TimeBomb logic triggered by $@ that takes into account $@ from the $@ as part of the potential trigger. | test.cs:70:13:70:71 | call to method CompareTo | call to method CompareTo | test.cs:70:36:70:70 | call to method AddHours | an offset | test.cs:68:34:68:76 | call to method GetLastWriteTime | last modification time of a file |
13+
| test.cs:70:9:73:9 | if (...) ... | test.cs:68:34:68:76 | call to method GetLastWriteTime : DateTime | test.cs:70:13:70:71 | call to method CompareTo | Possible TimeBomb logic triggered by an $@ that takes into account $@ from the $@ as part of the potential trigger. | test.cs:70:13:70:71 | call to method CompareTo | call to method CompareTo | test.cs:70:36:70:70 | call to method AddHours | offset | test.cs:68:34:68:76 | call to method GetLastWriteTime | last modification time of a file |
14+
| test.cs:70:9:73:9 | if (...) ... | test.cs:68:34:68:76 | call to method GetLastWriteTime : DateTime | test.cs:70:13:70:71 | call to method CompareTo : Int32 | Possible TimeBomb logic triggered by an $@ that takes into account $@ from the $@ as part of the potential trigger. | test.cs:70:13:70:71 | call to method CompareTo | call to method CompareTo | test.cs:70:36:70:70 | call to method AddHours | offset | test.cs:68:34:68:76 | call to method GetLastWriteTime | last modification time of a file |
15+
| test.cs:70:9:73:9 | if (...) ... | test.cs:68:34:68:76 | call to method GetLastWriteTime : DateTime | test.cs:70:13:70:76 | ... >= ... | Possible TimeBomb logic triggered by an $@ that takes into account $@ from the $@ as part of the potential trigger. | test.cs:70:13:70:71 | call to method CompareTo | call to method CompareTo | test.cs:70:36:70:70 | call to method AddHours | offset | test.cs:68:34:68:76 | call to method GetLastWriteTime | last modification time of a file |
16+
| test.cs:70:9:73:9 | if (...) ... | test.cs:68:34:68:76 | call to method GetLastWriteTime : DateTime | test.cs:70:13:70:76 | ... >= ... : Boolean | Possible TimeBomb logic triggered by an $@ that takes into account $@ from the $@ as part of the potential trigger. | test.cs:70:13:70:71 | call to method CompareTo | call to method CompareTo | test.cs:70:36:70:70 | call to method AddHours | offset | test.cs:68:34:68:76 | call to method GetLastWriteTime | last modification time of a file |
1717
nodes
1818
| test.cs:68:34:68:76 | call to method GetLastWriteTime : DateTime | semmle.label | call to method GetLastWriteTime : DateTime |
1919
| test.cs:70:13:70:71 | call to method CompareTo | semmle.label | call to method CompareTo |
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
| ClassDoesNotImplementEquals.cs:4:7:4:15 | Incorrect | Class 'Incorrect' does not implement Equals(object), but it implements $@. | ClassDoesNotImplementEquals.cs:6:33:6:34 | == | operator == |
2+
| ClassDoesNotImplementEquals.cs:24:7:24:24 | IncorrectOverrides | Class 'IncorrectOverrides' does not implement Equals(object), but $@. | ClassDoesNotImplementEquals.cs:42:17:42:53 | call to method Equals | it is called here |
23
| ClassDoesNotImplementEquals.cs:24:7:24:24 | IncorrectOverrides | Class 'IncorrectOverrides' does not implement Equals(object), but it implements $@. | ClassDoesNotImplementEquals.cs:26:33:26:34 | == | operator == |
3-
| ClassDoesNotImplementEquals.cs:24:7:24:24 | IncorrectOverrides | Class 'IncorrectOverrides' does not implement Equals(object), but it is called $@. | ClassDoesNotImplementEquals.cs:42:17:42:53 | call to method Equals | here |
44
| ClassDoesNotImplementEquals.cs:50:7:50:17 | MyEquatable | Class 'MyEquatable' does not implement Equals(object), but it implements $@. | ClassDoesNotImplementEquals.cs:52:17:52:22 | Equals | IEquatable<MyEquatable>.Equals |
5-
| ClassDoesNotImplementEqualsBad.cs:24:11:24:21 | GasolineCar | Class 'GasolineCar' does not implement Equals(object), but it is called $@. | ClassDoesNotImplementEqualsBad.cs:38:38:38:54 | call to method Equals | here |
5+
| ClassDoesNotImplementEqualsBad.cs:24:11:24:21 | GasolineCar | Class 'GasolineCar' does not implement Equals(object), but $@. | ClassDoesNotImplementEqualsBad.cs:38:38:38:54 | call to method Equals | it is called here |
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
| NoDisposeCallOnLocalIDisposable.cs:50:19:50:38 | object creation of type Timer | Disposable 'Timer' is created here but is not disposed. |
2-
| NoDisposeCallOnLocalIDisposable.cs:51:18:51:73 | object creation of type FileStream | Disposable 'FileStream' is created here but is not disposed. |
3-
| NoDisposeCallOnLocalIDisposable.cs:52:9:52:64 | object creation of type FileStream | Disposable 'FileStream' is created here but is not disposed. |
4-
| NoDisposeCallOnLocalIDisposable.cs:74:25:74:71 | call to method Create | Disposable 'XmlReader' is created here but is not disposed. |
5-
| NoDisposeCallOnLocalIDisposableBad.cs:8:22:8:56 | object creation of type FileStream | Disposable 'FileStream' is created here but is not disposed. |
1+
| NoDisposeCallOnLocalIDisposable.cs:50:19:50:38 | object creation of type Timer | Disposable 'Timer' is created but not disposed. |
2+
| NoDisposeCallOnLocalIDisposable.cs:51:18:51:73 | object creation of type FileStream | Disposable 'FileStream' is created but not disposed. |
3+
| NoDisposeCallOnLocalIDisposable.cs:52:9:52:64 | object creation of type FileStream | Disposable 'FileStream' is created but not disposed. |
4+
| NoDisposeCallOnLocalIDisposable.cs:74:25:74:71 | call to method Create | Disposable 'XmlReader' is created but not disposed. |
5+
| NoDisposeCallOnLocalIDisposableBad.cs:8:22:8:56 | object creation of type FileStream | Disposable 'FileStream' is created but not disposed. |
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
| SynchSetUnsynchGet.cs:9:9:9:20 | BadProperty1 | Field '$@' is guarded by a lock in the setter but not in the getter. | SynchSetUnsynchGet.cs:5:9:5:17 | property1 | property1 |
2-
| SynchSetUnsynchGet.cs:23:9:23:20 | BadProperty2 | Field '$@' is guarded by a lock in the setter but not in the getter. | SynchSetUnsynchGet.cs:5:9:5:17 | property1 | property1 |
1+
| SynchSetUnsynchGet.cs:9:9:9:20 | BadProperty1 | Field $@ is guarded by a lock in the setter but not in the getter. | SynchSetUnsynchGet.cs:5:9:5:17 | property1 | property1 |
2+
| SynchSetUnsynchGet.cs:23:9:23:20 | BadProperty2 | Field $@ is guarded by a lock in the setter but not in the getter. | SynchSetUnsynchGet.cs:5:9:5:17 | property1 | property1 |
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
| NonAssignedFields.cs:87:9:87:22 | BadNonAssigned | The field 'BadNonAssigned' is never explicitly assigned a value, yet it is read $@. | NonAssignedFields.cs:109:20:109:33 | access to field BadNonAssigned | here |
2-
| NonAssignedFields.cs:88:12:88:26 | BadAssignedNull | The field 'BadAssignedNull' is never explicitly assigned a value, yet it is read $@. | NonAssignedFields.cs:113:13:113:27 | access to field BadAssignedNull | here |
1+
| NonAssignedFields.cs:87:9:87:22 | BadNonAssigned | The field 'BadNonAssigned' is never explicitly assigned a value, yet $@. | NonAssignedFields.cs:109:20:109:33 | access to field BadNonAssigned | the field is read |
2+
| NonAssignedFields.cs:88:12:88:26 | BadAssignedNull | The field 'BadAssignedNull' is never explicitly assigned a value, yet $@. | NonAssignedFields.cs:113:13:113:27 | access to field BadAssignedNull | the field is read |
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
| deadcode.cs:85:7:85:11 | Field | Unused field (or field used from dead method only) |
2-
| regression.cs:7:20:7:23 | dead | Unused field (or field used from dead method only) |
3-
| regression.cs:113:9:113:17 | deadField | Unused field (or field used from dead method only) |
4-
| regression.cs:116:9:116:24 | deadWrittenField | Unused field (or field used from dead method only) |
5-
| regression.cs:129:9:129:17 | deadField | Unused field (or field used from dead method only) |
1+
| deadcode.cs:85:7:85:11 | Field | Unused field (or field used from dead method only). |
2+
| regression.cs:7:20:7:23 | dead | Unused field (or field used from dead method only). |
3+
| regression.cs:113:9:113:17 | deadField | Unused field (or field used from dead method only). |
4+
| regression.cs:116:9:116:24 | deadWrittenField | Unused field (or field used from dead method only). |
5+
| regression.cs:129:9:129:17 | deadField | Unused field (or field used from dead method only). |
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
| regression.cs:51:18:51:33 | ActualDeadMethod | Unused method (or method called from dead method only) |
2-
| regression.cs:60:18:60:37 | NotDynamicallyCalled | Unused method (or method called from dead method only) |
3-
| regression.cs:77:10:77:19 | DeadCaller | Unused method (or method called from dead method only) |
4-
| regression.cs:84:10:84:23 | DeadGeneric<> | Unused method (or method called from dead method only) |
5-
| regression.cs:105:10:105:21 | DeadGeneric1 | Unused method (or method called from dead method only) |
6-
| regression.cs:110:10:110:24 | DeadGeneric2<> | Unused method (or method called from dead method only) |
1+
| regression.cs:51:18:51:33 | ActualDeadMethod | Unused method (or method called from dead method only). |
2+
| regression.cs:60:18:60:37 | NotDynamicallyCalled | Unused method (or method called from dead method only). |
3+
| regression.cs:77:10:77:19 | DeadCaller | Unused method (or method called from dead method only). |
4+
| regression.cs:84:10:84:23 | DeadGeneric<> | Unused method (or method called from dead method only). |
5+
| regression.cs:105:10:105:21 | DeadGeneric1 | Unused method (or method called from dead method only). |
6+
| regression.cs:110:10:110:24 | DeadGeneric2<> | Unused method (or method called from dead method only). |
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
| ForeachCapture.cs:14:23:14:31 | (...) => ... | Function which may be stored in $@ captures variable $@ | ForeachCapture.cs:7:22:7:27 | event1 | event1 | ForeachCapture.cs:11:22:11:24 | arg | arg |
2-
| ForeachCapture.cs:24:30:24:38 | (...) => ... | Function which may be stored in $@ captures variable $@ | ForeachCapture.cs:41:22:41:28 | actions | actions | ForeachCapture.cs:11:22:11:24 | arg | arg |
1+
| ForeachCapture.cs:14:23:14:31 | (...) => ... | Function which may be stored in $@ captures variable $@. | ForeachCapture.cs:7:22:7:27 | event1 | event1 | ForeachCapture.cs:11:22:11:24 | arg | arg |
2+
| ForeachCapture.cs:24:30:24:38 | (...) => ... | Function which may be stored in $@ captures variable $@. | ForeachCapture.cs:41:22:41:28 | actions | actions | ForeachCapture.cs:11:22:11:24 | arg | arg |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| UselessIsBeforeAs.cs:8:21:8:31 | ... as ... | This 'as' expression performs a type test - it should be directly compared against null, rendering the 'is' $@ potentially redundant. | UselessIsBeforeAs.cs:5:13:5:23 | ... is ... | here |
1+
| UselessIsBeforeAs.cs:8:21:8:31 | ... as ... | This 'as' expression performs a type test - it should be directly compared against null, rendering the $@ potentially redundant. | UselessIsBeforeAs.cs:5:13:5:23 | ... is ... | is |

0 commit comments

Comments
 (0)