- Notifications
You must be signed in to change notification settings - Fork18
owasp-modsecurity/secrules-language-tests
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
STS was built to support the development of new implementations of SecRules, and also to avoid regression on the existing ones. The STS does not have any test script, containing only test cases.
This repository does not include all the operators supported by ModSecurity. This repository contains operators that are not supported by ModSecurity yet.
The tests in this repository came from ModSecurity unit tests (originally saved in the format of a Perl script). These tests were converted from Perl to JSON to make them easier to be opened (and parsed) in different platforms.
All the test cases are saved into text files in JSON format. Every file contains an array of hashes, as illustrated below:
{ "ret" : 0, "type" : "op", "name" : "gt", "param" : "0", "input" : "" },The hashes describe the operator to be used with a given parameter and input content to be tested. The outcome result is also part of the hash, allowing the verification if the target application is working as expected.
The directory "operators" contains unit tests for the SecRules operators. The file names are given after the operator name. Notice that the file name is just a matter of organization, and it does not interfere in the test. The operator name is also made explicit inside the test structure.
The hash that describes a unit test is disposed in the following structure:
- ret: Return code, can be 1 or 0 (True or False)
- type: Always "op"
- name: Operator name
- param: Operator parameter
- input: Input data
It is recommended to add this repository as a git submodule:
$ git submodule addhttps://github.com/SpiderLabs/secrules-language-tests
About
Set of test cases that can be used to test custom implementations of the SecRules language (ModSecurity rules format).
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.