Skip to content

Commit d7f5ce2

Browse files
committed
C#: Update log forging expected test output.
1 parent cf75493 commit d7f5ce2

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

csharp/ql/test/query-tests/Security Features/CWE-117/LogForging.expected

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
| LogForging.cs:31:50:31:72 | ... + ... | LogForging.cs:18:27:18:49 | access to property QueryString : NameValueCollection | LogForging.cs:31:50:31:72 | ... + ... | This log entry depends on a $@. | LogForging.cs:18:27:18:49 | access to property QueryString | user-provided value |
44
| LogForging.cs:35:26:35:33 | access to local variable username | LogForging.cs:18:27:18:49 | access to property QueryString : NameValueCollection | LogForging.cs:35:26:35:33 | access to local variable username | This log entry depends on a $@. | LogForging.cs:18:27:18:49 | access to property QueryString | user-provided value |
55
| LogForgingAsp.cs:17:21:17:43 | ... + ... | LogForgingAsp.cs:13:32:13:39 | username : String | LogForgingAsp.cs:17:21:17:43 | ... + ... | This log entry depends on a $@. | LogForgingAsp.cs:13:32:13:39 | username | user-provided value |
6-
| LogForgingAsp.cs:86:21:86:50 | $"..." | LogForgingAsp.cs:82:37:82:37 | e : TestEnum | LogForgingAsp.cs:86:21:86:50 | $"..." | This log entry depends on a $@. | LogForgingAsp.cs:82:37:82:37 | e | user-provided value |
7-
| LogForgingAsp.cs:93:21:93:61 | $"..." | LogForgingAsp.cs:89:47:89:48 | dt : DateTimeOffset | LogForgingAsp.cs:93:21:93:61 | $"..." | This log entry depends on a $@. | LogForgingAsp.cs:89:47:89:48 | dt | user-provided value |
86
edges
97
| LogForging.cs:18:16:18:23 | access to local variable username : String | LogForging.cs:21:21:21:43 | ... + ... | provenance | |
108
| LogForging.cs:18:16:18:23 | access to local variable username : String | LogForging.cs:31:50:31:72 | ... + ... | provenance | |
@@ -13,8 +11,6 @@ edges
1311
| LogForging.cs:18:27:18:49 | access to property QueryString : NameValueCollection | LogForging.cs:18:27:18:61 | access to indexer : String | provenance | MaD:1 |
1412
| LogForging.cs:18:27:18:61 | access to indexer : String | LogForging.cs:18:16:18:23 | access to local variable username : String | provenance | |
1513
| LogForgingAsp.cs:13:32:13:39 | username : String | LogForgingAsp.cs:17:21:17:43 | ... + ... | provenance | |
16-
| LogForgingAsp.cs:82:37:82:37 | e : TestEnum | LogForgingAsp.cs:86:21:86:50 | $"..." | provenance | |
17-
| LogForgingAsp.cs:89:47:89:48 | dt : DateTimeOffset | LogForgingAsp.cs:93:21:93:61 | $"..." | provenance | |
1814
models
1915
| 1 | Summary: System.Collections.Specialized; NameValueCollection; false; get_Item; (System.String); ; Argument[this]; ReturnValue; taint; df-generated |
2016
nodes
@@ -26,13 +22,4 @@ nodes
2622
| LogForging.cs:35:26:35:33 | access to local variable username | semmle.label | access to local variable username |
2723
| LogForgingAsp.cs:13:32:13:39 | username : String | semmle.label | username : String |
2824
| LogForgingAsp.cs:17:21:17:43 | ... + ... | semmle.label | ... + ... |
29-
| LogForgingAsp.cs:82:37:82:37 | e : TestEnum | semmle.label | e : TestEnum |
30-
| LogForgingAsp.cs:86:21:86:50 | $"..." | semmle.label | $"..." |
31-
| LogForgingAsp.cs:89:47:89:48 | dt : DateTimeOffset | semmle.label | dt : DateTimeOffset |
32-
| LogForgingAsp.cs:93:21:93:61 | $"..." | semmle.label | $"..." |
3325
subpaths
34-
testFailures
35-
| LogForgingAsp.cs:82:37:82:37 | e : TestEnum | Unexpected result: Source |
36-
| LogForgingAsp.cs:86:21:86:50 | $"..." | Unexpected result: Alert |
37-
| LogForgingAsp.cs:89:47:89:48 | dt : DateTimeOffset | Unexpected result: Source |
38-
| LogForgingAsp.cs:93:21:93:61 | $"..." | Unexpected result: Alert |

csharp/ql/test/query-tests/Security Features/CWE-117/LogForgingAsp.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,14 @@ public void ActionDecimal(decimal d)
8282
public void ActionEnum(TestEnum e)
8383
{
8484
var logger = new ILogger();
85-
// GOOD: Enum is a sanitizer. [FALSE POSITIVE]
85+
// GOOD: Enum is a sanitizer.
8686
logger.Warn($"Warning about the enum: {e}");
8787
}
8888

8989
public void ActionDateTime(DateTimeOffset dt)
9090
{
9191
var logger = new ILogger();
92-
// GOOD: DateTimeOffset is a sanitizer. [FALSE POSITIVE]
92+
// GOOD: DateTimeOffset is a sanitizer.
9393
logger.Warn($"Warning about the DateTimeOffset: {dt}");
9494
}
9595
}

0 commit comments

Comments
 (0)