Skip to content

Commit 03e671a

Browse files
committed
C#: Add a false negative.
1 parent b40a437 commit 03e671a

File tree

1 file changed

+3
-0
lines changed
  • csharp/ql/test/query-tests/Security Features/CWE-022/TaintedPath

1 file changed

+3
-0
lines changed

csharp/ql/test/query-tests/Security Features/CWE-022/TaintedPath/TaintedPath.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ public void ProcessRequest(HttpContext ctx)
6161
{
6262
File.ReadAllText(fullPath); // GOOD
6363
}
64+
65+
// This test ensures that we can flow through `Path.GetFullPath` and still get a result.
66+
ctx.Response.Write(File.ReadAllText(path)); // BAD [MISSING]
6467
}
6568

6669
public bool IsReusable

0 commit comments

Comments
 (0)