Skip to content

Commit

Permalink
Implement api sec endpoints and enable tests (with working versions)
Browse files Browse the repository at this point in the history
  • Loading branch information
e-n-0 committed Jan 31, 2025
1 parent 8519bfb commit 77f7e6b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
8 changes: 4 additions & 4 deletions manifests/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ tests/:
Test_API_Security_RC_ASM_DD_scanners: v2.50.0
Test_API_Security_RC_ASM_processor_overrides_and_custom_scanner: irrelevant (waf does not support it yet)
test_apisec_sampling.py:
Test_API_Security_Sampling_Different_Endpoints: missing_feature
Test_API_Security_Sampling_Different_Paths: missing_feature
Test_API_Security_Sampling_Different_Status: missing_feature
Test_API_Security_Sampling_Different_Endpoints: v2.46.0
Test_API_Security_Sampling_Different_Paths: v2.46.0
Test_API_Security_Sampling_Different_Status: v2.46.0
Test_API_Security_Sampling_Rate: v2.46.0
Test_API_Security_Sampling_With_Delay: missing_feature
Test_API_Security_Sampling_With_Delay: v2.50.0
test_schemas.py:
Test_Scanners: v2.46.0
Test_Schema_Request_Cookies: v2.46.0
Expand Down
22 changes: 22 additions & 0 deletions utils/build/docker/dotnet/weblog/Controllers/ApiSecController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using Microsoft.AspNetCore.Mvc;

namespace weblog;

[ApiController]
public class ApiSecController : Controller
{
[HttpGet]
[Route("api_security/sampling/{status:int}")]
public IActionResult ApiSecuritySamplingStatus(int status)
{
HttpContext.Response.StatusCode = status;
return Content("Hello!");
}

[HttpGet]
[Route("api_security_sampling/{i:int}")]
public IActionResult ApiSecuritySampling(int i)
{
return Content("Ok");
}
}

0 comments on commit 77f7e6b

Please sign in to comment.