-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: create regression tests for all rules (#14)
* Create integration.yml * Create lint.yml * test: create regression test for 9519100 * test: create 9519101, 9519102, 9519103 and 9519104 regression tests * test: fix newline * test: fix failing tests * test: fix failing tests * test: fix failing tests * test: create 9519101, 9519102, 9519103 and 9519104 regression tests * test: fix newline * test: fix failing tests * test: fix 9519102-2 failing test * test: fix failing tests * test: create 9519111 and 9519112 regression tests * test: fix lint * test: fix newline character * test: create 9519113, 9519114 and 9519115 regression tests * test: fix lint and create 9519116 regression test * test: fix too many blank lines * test: create 9519130, 9519150, 9519151 and 9519152 regression tests * test: create 9519153, 9519154, 9519155 and 9519156 regression tests
- Loading branch information
1 parent
efef407
commit ca69b87
Showing
21 changed files
with
967 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
integration-tests: | ||
uses: coreruleset/crs-plugin-test-action/.github/workflows/integration.yaml@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
plugin-lint: | ||
uses: coreruleset/crs-plugin-test-action/.github/workflows/lint.yaml@main |
87 changes: 87 additions & 0 deletions
87
tests/regression/roundcube-rule-exclusions-plugin/9519100.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
--- | ||
meta: | ||
author: "Esad Cetiner" | ||
description: "Roundcube Rule Exclusions Plugin" | ||
enabled: true | ||
name: 9519100.yaml | ||
tests: | ||
- test_title: 9519100-1 | ||
desc: Disable 932236 for roundcube_sessid cookie | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: Roundcube rule exclusions plugin | ||
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 | ||
cookie: roundcube_sessid=dfjsdia80f | ||
port: 80 | ||
method: POST | ||
uri: /post | ||
output: | ||
no_log_contains: id "932236" | ||
- test_title: 9519100-2 | ||
desc: Disable 932236 for roundcube_sessauth cookie | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: Roundcube rule exclusions plugin | ||
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 | ||
cookie: roundcube_sessauth=dfjsdia80f | ||
port: 80 | ||
method: POST | ||
uri: /post | ||
output: | ||
no_log_contains: id "932236" | ||
- test_title: 9519100-3 | ||
desc: Disable 932236 for identviewsplitter cookie name | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: Roundcube rule exclusions plugin | ||
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 | ||
cookie: identviewsplitter=foo | ||
port: 80 | ||
method: POST | ||
uri: /post | ||
output: | ||
no_log_contains: id "932236" | ||
- test_title: 9519100-4 | ||
desc: Disable 942450 for roundcube_sessid cookie | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: Roundcube rule exclusions plugin | ||
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 | ||
cookie: roundcube_sessid=0x0800 | ||
port: 80 | ||
method: POST | ||
uri: /post | ||
output: | ||
no_log_contains: id "942450" | ||
- test_title: 9519100-5 | ||
desc: Disable 942450 for roundcube_sessauth cookie | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: Roundcube rule exclusions plugin | ||
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 | ||
cookie: roundcube_sessauth=0x0800 | ||
port: 80 | ||
method: POST | ||
uri: /post | ||
output: | ||
no_log_contains: id "942450" |
67 changes: 67 additions & 0 deletions
67
tests/regression/roundcube-rule-exclusions-plugin/9519101.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
--- | ||
meta: | ||
author: "Esad Cetiner" | ||
description: "Roundcube Rule Exclusions Plugin" | ||
enabled: true | ||
name: 9519101.yaml | ||
tests: | ||
- test_title: 9519101-1 | ||
desc: Disable CRS for password login | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: Roundcube rule exclusions plugin | ||
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 | ||
port: 80 | ||
method: POST | ||
uri: /post?_task=login&_pass=<script> | ||
output: | ||
no_log_contains: id "941110" | ||
- test_title: 9519101-2 | ||
desc: Disable 921180 for ARGS_NAMES:_task when logging in | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: Roundcube rule exclusions plugin | ||
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 | ||
port: 80 | ||
method: POST | ||
uri: /post?_task=login&_task=login | ||
output: | ||
no_log_contains: id "921180" | ||
- test_title: 9519101-3 | ||
desc: Disable 921180 for ARGS_NAMES:_framed when logging in | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: Roundcube rule exclusions plugin | ||
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 | ||
port: 80 | ||
method: POST | ||
uri: /post?_task=login&_framed=1&_framed=1 | ||
output: | ||
no_log_contains: id "921180" | ||
- test_title: 9519101-4 | ||
desc: Disable 921180 for ARGS_NAMES:_action when logging in | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: Roundcube rule exclusions plugin | ||
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 | ||
port: 80 | ||
method: POST | ||
uri: /post?_task=login&_action=1&_action=1 | ||
output: | ||
no_log_contains: id "921180" |
23 changes: 23 additions & 0 deletions
23
tests/regression/roundcube-rule-exclusions-plugin/9519102.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
meta: | ||
author: "Esad Cetiner" | ||
description: "Roundcube Rule Exclusions Plugin" | ||
enabled: true | ||
name: 9519102.yaml | ||
tests: | ||
- test_title: 9519102-1 | ||
desc: Disable 932237 and 932239 for referrers if the referrer is valid | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: Roundcube rule exclusions plugin | ||
referer: https://example.com/?_task=settings | ||
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 | ||
port: 80 | ||
method: POST | ||
uri: /post | ||
output: | ||
no_log_contains: id "932237" |
37 changes: 37 additions & 0 deletions
37
tests/regression/roundcube-rule-exclusions-plugin/9519103.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
meta: | ||
author: "Esad Cetiner" | ||
description: "Roundcube Rule Exclusions Plugin" | ||
enabled: true | ||
name: 9519103.yaml | ||
tests: | ||
- test_title: 9519103-1 | ||
desc: Disable 932236 for _task when set to mail" | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: Roundcube rule exclusions plugin | ||
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 | ||
port: 80 | ||
method: POST | ||
uri: /post?_task=mail | ||
output: | ||
no_log_contains: id "932236" | ||
- test_title: 9519103-2 | ||
desc: Disable 932236 for _task when set to settings" | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: Roundcube rule exclusions plugin | ||
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 | ||
port: 80 | ||
method: POST | ||
uri: /post?_task=settings | ||
output: | ||
no_log_contains: id "932236" |
37 changes: 37 additions & 0 deletions
37
tests/regression/roundcube-rule-exclusions-plugin/9519104.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
meta: | ||
author: "Esad Cetiner" | ||
description: "Roundcube Rule Exclusions Plugin" | ||
enabled: true | ||
name: 9519104.yaml | ||
tests: | ||
- test_title: 9519104-1 | ||
desc: Disable 932236 for _token parameter, but only within a certain character range | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: Roundcube rule exclusions plugin | ||
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 | ||
port: 80 | ||
method: POST | ||
uri: /post?_token=dfdf | ||
output: | ||
no_log_contains: id "932236" | ||
- test_title: 9519104-2 | ||
desc: Disable 942450 for _token parameter, but only within a certain character range | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: Roundcube rule exclusions plugin | ||
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 | ||
port: 80 | ||
method: POST | ||
uri: /post?_token=0x800 | ||
output: | ||
no_log_contains: id "942450" |
23 changes: 23 additions & 0 deletions
23
tests/regression/roundcube-rule-exclusions-plugin/9519111.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
meta: | ||
author: "Esad Cetiner" | ||
description: "Roundcube Rule Exclusions Plugin" | ||
enabled: true | ||
name: 9519111.yaml | ||
tests: | ||
- test_title: 9519111-1 | ||
desc: Disable 953101 for response body | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: Roundcube rule exclusions plugin | ||
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 | ||
port: 80 | ||
method: POST | ||
uri: /post | ||
data: "maximum allowed file size is 10MB" | ||
output: | ||
no_log_contains: id "953101" |
39 changes: 39 additions & 0 deletions
39
tests/regression/roundcube-rule-exclusions-plugin/9519112.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
meta: | ||
author: "Esad Cetiner" | ||
description: "Roundcube Rule Exclusions Plugin" | ||
enabled: true | ||
name: 9519112.yaml | ||
tests: | ||
- test_title: 9519112-1 | ||
desc: Disable 951220 for response body when viewing an email | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: Roundcube rule exclusions plugin | ||
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 | ||
port: 80 | ||
method: GET | ||
uri: /get?_task=mail | ||
data: "SqlException" | ||
output: | ||
no_log_contains: id "951220" | ||
- test_title: 9519112-2 | ||
desc: Disable 951230 for response body when viewing an email | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: Roundcube rule exclusions plugin | ||
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 | ||
port: 80 | ||
method: GET | ||
uri: /get?_task=mail | ||
data: "MySqlClient." | ||
output: | ||
no_log_contains: id "951230" |
22 changes: 22 additions & 0 deletions
22
tests/regression/roundcube-rule-exclusions-plugin/9519113.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
meta: | ||
author: "Esad Cetiner" | ||
description: "Roundcube Rule Exclusions Plugin" | ||
enabled: true | ||
name: 9519113.yaml | ||
tests: | ||
- test_title: 9519113-1 | ||
desc: Disable 921180 for ARGS_NAMES:_framed when viewing an email | ||
stages: | ||
- stage: | ||
input: | ||
dest_addr: 127.0.0.1 | ||
headers: | ||
Host: localhost | ||
User-Agent: Roundcube rule exclusions plugin | ||
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 | ||
port: 80 | ||
method: POST | ||
uri: /post?_task=mail&_framed=1&_framed=1 | ||
output: | ||
no_log_contains: id "921180" |
Oops, something went wrong.