-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: report triggered rules for every test
Adds list of triggered rules by stage to the JSON output. Fixes #429
- Loading branch information
Showing
8 changed files
with
136 additions
and
34 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
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
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
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
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
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: "tester" | ||
description: "Example Test" | ||
rule_id: 123456 | ||
tests: | ||
- test_id: 1 | ||
description: "tests for verifying recording of triggered rules" | ||
stages: | ||
- input: | ||
dest_addr: "{{ .TestAddr }}" | ||
port: {{ .TestPort }} | ||
headers: | ||
User-Agent: "ModSecurity CRS 3 Tests" | ||
Accept: "*/*" | ||
Host: "none.host" | ||
output: | ||
status: 413 | ||
- test_id: 2 | ||
description: "access real external site" | ||
stages: | ||
- input: | ||
dest_addr: "{{ .TestAddr }}" | ||
port: {{ .TestPort }} | ||
headers: | ||
User-Agent: "ModSecurity CRS 3 Tests" | ||
Accept: "*/*" | ||
Host: "{{ .TestAddr }}" | ||
output: | ||
expect_error: False | ||
- input: | ||
dest_addr: "{{ .TestAddr }}" | ||
port: {{ .TestPort }} | ||
headers: | ||
User-Agent: "ModSecurity CRS 3 Tests" | ||
Accept: "*/*" | ||
Host: "{{ .TestAddr }}" | ||
output: | ||
expect_error: False |
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
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