question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add blocking mode for CRS Sandbox

See original GitHub issue

Motivation

Currently, the sandbox never blocks: https://coreruleset.org/docs/development/sandbox/#example

The sandbox will return a 200 response code, no matter if an attack was detected or not.

This can be confusing for tools that benchmark or compare WAF configurations:

  • How does my configuration compare to vanilla CRS?
  • How does WAF X compare to CRS?

Proposed solution

It would be great if this behaviour could be dynamically changed per request by adding headers. Similar options to control the behaviour of the sandbox are already configurable using headers: https://coreruleset.org/docs/development/sandbox/#changing-options.

Useful options could be:

  • Blocking/Detection
  • Anomaly Threshold

Alternatives

Additional context

One tool that could be interesting with respect to the sandbox is GoTestWAF. This tool provides an option that might help circumvent the problem but I have not got it to wor yet:

--blockRegex string      Regex to detect a blocking page with the same HTTP response status code as a not blocked request

FYI: @roguelabs

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:25 (25 by maintainers)

github_iconTop GitHub Comments

1reaction
fzipicommented, Jul 19, 2022

Oh, well, that’s the default, of course. If you set the header x-crs-mode: blocking, that’s what you get.

1reaction
dune73commented, Jul 19, 2022

I think that’s the way to go.

And then we ought to think about whether we want to have 5 as default as with CRS.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using the CRS Sandbox - OWASP ModSecurity Core Rule Set
We have set up a public CRS Sandbox which you can use to send ... This only makes sense if blocking mode is...
Read more >
Halo 3 MCC: Is there still a way to block the Sandbox ...
Go to gmember182's file share, he has a map set up with the all the towers fully blocked.
Read more >
Digital Sandbox Experiment Guide - SparkFun Learn
What happens if you add a second Blink block to the drawing? Regardless of where you put it, can you discern which of...
Read more >
Create NFT Assets in VoxEdit - The Sandbox Saturday Stream
Watch @KamiSawZe and @TheVisionEx VoxEdit workflow live tutorial for people who want to make assets for their game jam entry.
Read more >
Playing Your Games with The Sandbox Game Maker - YouTube
Watch Alex Florez (@KamiSawZe) play YOUR games submitted to The Sandbox GameMaker each Saturday at 21:00 GMT. Also news, updates and NFT and ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found