From 32ea8420a96610e12a57e84db34b1ae899333c68 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Thu, 23 Mar 2023 19:00:19 +0100 Subject: [PATCH] C#: Move the existing tests into separate folders to emulate separate projects and add some more tests. --- .../Security Features/CWE-011/ASPNetDebug.expected | 3 ++- .../Security Features/CWE-011/{bad => bad1}/Web.config | 0 .../Security Features/CWE-011/bad2/Web.Debug.config | 6 ++++++ .../Security Features/CWE-011/bad2/Web.config | 9 +++++++++ .../Security Features/CWE-011/{ => good1}/Web.config | 0 .../Security Features/CWE-011/good2/Web.Release.config | 6 ++++++ .../Security Features/CWE-011/good2/Web.config | 9 +++++++++ 7 files changed, 32 insertions(+), 1 deletion(-) rename csharp/ql/test/query-tests/Security Features/CWE-011/{bad => bad1}/Web.config (100%) create mode 100644 csharp/ql/test/query-tests/Security Features/CWE-011/bad2/Web.Debug.config create mode 100644 csharp/ql/test/query-tests/Security Features/CWE-011/bad2/Web.config rename csharp/ql/test/query-tests/Security Features/CWE-011/{ => good1}/Web.config (100%) create mode 100644 csharp/ql/test/query-tests/Security Features/CWE-011/good2/Web.Release.config create mode 100644 csharp/ql/test/query-tests/Security Features/CWE-011/good2/Web.config diff --git a/csharp/ql/test/query-tests/Security Features/CWE-011/ASPNetDebug.expected b/csharp/ql/test/query-tests/Security Features/CWE-011/ASPNetDebug.expected index de43111afa6..8025e4990fd 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-011/ASPNetDebug.expected +++ b/csharp/ql/test/query-tests/Security Features/CWE-011/ASPNetDebug.expected @@ -1 +1,2 @@ -| bad/Web.config:4:5:7:7 | debug=true | The 'debug' flag is set for an ASP.NET configuration file. | +| bad1/Web.config:4:5:7:7 | debug=true | The 'debug' flag is set for an ASP.NET configuration file. | +| bad2/Web.config:4:5:7:7 | debug=true | The 'debug' flag is set for an ASP.NET configuration file. | diff --git a/csharp/ql/test/query-tests/Security Features/CWE-011/bad/Web.config b/csharp/ql/test/query-tests/Security Features/CWE-011/bad1/Web.config similarity index 100% rename from csharp/ql/test/query-tests/Security Features/CWE-011/bad/Web.config rename to csharp/ql/test/query-tests/Security Features/CWE-011/bad1/Web.config diff --git a/csharp/ql/test/query-tests/Security Features/CWE-011/bad2/Web.Debug.config b/csharp/ql/test/query-tests/Security Features/CWE-011/bad2/Web.Debug.config new file mode 100644 index 00000000000..d12250bc040 --- /dev/null +++ b/csharp/ql/test/query-tests/Security Features/CWE-011/bad2/Web.Debug.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/csharp/ql/test/query-tests/Security Features/CWE-011/bad2/Web.config b/csharp/ql/test/query-tests/Security Features/CWE-011/bad2/Web.config new file mode 100644 index 00000000000..ffc04c240fa --- /dev/null +++ b/csharp/ql/test/query-tests/Security Features/CWE-011/bad2/Web.config @@ -0,0 +1,9 @@ + + + + + + diff --git a/csharp/ql/test/query-tests/Security Features/CWE-011/Web.config b/csharp/ql/test/query-tests/Security Features/CWE-011/good1/Web.config similarity index 100% rename from csharp/ql/test/query-tests/Security Features/CWE-011/Web.config rename to csharp/ql/test/query-tests/Security Features/CWE-011/good1/Web.config diff --git a/csharp/ql/test/query-tests/Security Features/CWE-011/good2/Web.Release.config b/csharp/ql/test/query-tests/Security Features/CWE-011/good2/Web.Release.config new file mode 100644 index 00000000000..d12250bc040 --- /dev/null +++ b/csharp/ql/test/query-tests/Security Features/CWE-011/good2/Web.Release.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/csharp/ql/test/query-tests/Security Features/CWE-011/good2/Web.config b/csharp/ql/test/query-tests/Security Features/CWE-011/good2/Web.config new file mode 100644 index 00000000000..ffc04c240fa --- /dev/null +++ b/csharp/ql/test/query-tests/Security Features/CWE-011/good2/Web.config @@ -0,0 +1,9 @@ + + + + + +