-
-
Notifications
You must be signed in to change notification settings - Fork 402
Adds common and uniform http headers to tests #2362
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
Adds common and uniform http headers to tests #2362
Conversation
Hey @airween , thanks for the review. Was doing it now, it was taking a bit because I'm rebasing on old commits. |
I second the CRS tests user agent change, but also, will it depend on major version? E.g. when CRS 4.x is out, are we changing that? |
Hmmm... good question. A crazy idea, but can we detach the test set from the rule set? I mean now you've started to add/modify the headers for the better consistency, so we can say this is a new version of our test set. May be we can use some new format, like:
And if we release the 4.0, the we replace the version at the end. |
d9e86dc
to
7b385bc
Compare
All tests passing now. |
Let me check this PR in next few days. |
I'd hate to do separate versioning for the tests. This is making things so complicated. In fact I do not think we need any version in the test UA. Tests are always run in a controlled environment so when something needs debugging you can easily find out the test that triggered. Having the test-ID submitted as part of the test would be more interested (unless we have that already :) What I would suggest, though, would be to add the CRS test suite user agent string to any existing attacking test string we have already. Thus |
I've reviewed the modified tests, and most of them are done. There you have all the converted tests and no new tests. These issues are what I've found:
|
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
7b385bc
to
78fdff8
Compare
Thanks @airween for the thorough review! Included all your comments. This should be ready now.... unless you want to change all user agents to |
great, thanks!
I don't know, what would be the best solution - I wrote my suggestions above based on @dune73 's comment: What I would suggest, though, would be to add the CRS test suite user agent string to any existing attacking test string we have already. Thus libwww-perl; OWASP ModSecurity Core Rule Set Test. More thoughts about tests: I think it would be good to extend the list of skeleton tests, eg. add skeleton for (I can add these after the merge, if you want to apply this patch.) Ideas? |
To be honest, I think this is massive and don't want to hold it too much. Drift is happening on every merge, and I was careful to create commits separated, so it is a pain to update. @dune73 @airween I would do this:
|
LGTM! |
This is a heavy to review patch. Fixes #2344