Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Blocking Evaluation phase #128

Open
M4tteoP opened this issue Jan 10, 2023 · 2 comments
Open

Test Blocking Evaluation phase #128

M4tteoP opened this issue Jan 10, 2023 · 2 comments

Comments

@M4tteoP
Copy link
Member

M4tteoP commented Jan 10, 2023

Hello,
currently, ftw is looking for the IDs of the triggered rules after sending a request. What we are facing running Coraza on Envoy is that the phase when the rule is triggered may differ from the phase when the disruptive action is executed. While it may be intended (enabling or disabling the CRS early blocking feature), it could still be useful to check that an interruption caused by a rule has been raised before a certain phase (therefore avoiding WAF bypasses).
For more context: corazawaf/coraza-proxy-wasm#129 (phase 1 rule with enough anomaly score triggered, but interruption raised only during phase 3. In this case the expected interruption phase would be phase 1 if early blocking, otherwise phase 2).

I'm aware that it is more a check of the expected behaviour of the proxy/server, but what do you think in terms of both usefulness and feasibility? Could there be a way to test when a triggered rule takes action?
I see it as a kind of a Cloud mode test, but checking inside the logs if the interruption has happened during the expected phase.

Just an idea, thanks for any feedback and advice!

@fzipi
Copy link
Member

fzipi commented Jan 10, 2023

It is an interesting idea. I don't think we can do too much now with the current ftw test spec.

I started working on a new spec to include additional information that could be useful for tests, this might make it there if we think it has value.

@dune73
Copy link
Member

dune73 commented Jan 11, 2023

How would you determine the phase of the action taken?

Keeping a data file that maps rules to phases?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants