mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Add additional test case for httponly cookies set to true
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
query: Security Features/CWE-1004/CookieWithoutHttpOnly.ql
|
||||
postprocess: utils/test/InlineExpectationsTestQuery.ql
|
||||
@@ -0,0 +1,7 @@
|
||||
class Program
|
||||
{
|
||||
void CookieDefault()
|
||||
{
|
||||
var cookie = new System.Web.HttpCookie("auth"); // GOOD: httpOnlyCookies is set to true in config
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<system.web>
|
||||
<httpCookies httpOnlyCookies="true"/>
|
||||
</system.web>
|
||||
</configuration>
|
||||
@@ -1,3 +1,3 @@
|
||||
semmle-extractor-options: /nostdlib /noconfig
|
||||
semmle-extractor-options: --load-sources-from-project:${testdir}/../../../../../resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj
|
||||
semmle-extractor-options: ${testdir}/../../../../../resources/stubs/System.Web.cs
|
||||
semmle-extractor-options: --load-sources-from-project:${testdir}/../../../../../../resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj
|
||||
semmle-extractor-options: ${testdir}/../../../../../../resources/stubs/System.Web.cs
|
||||
|
||||
Reference in New Issue
Block a user