mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Regression tests: audit log compare support and test cases
This commit is contained in:
committed by
Felipe Zimmerle
parent
7a48245aed
commit
a1547eaa32
45
test/test-cases/regression/issue-2000.json
Normal file
45
test/test-cases/regression/issue-2000.json
Normal file
@@ -0,0 +1,45 @@
|
||||
[
|
||||
{
|
||||
"enabled":1,
|
||||
"version_min":300000,
|
||||
"title":"Testing audit log part H should output when deny - issue-2000",
|
||||
"expected":{
|
||||
"http_code":200
|
||||
},
|
||||
"client":{
|
||||
"ip":"127.0.0.1",
|
||||
"port":123
|
||||
},
|
||||
"request":{
|
||||
"headers":{
|
||||
"Host":"localhost",
|
||||
"User-Agent":"curl/7.38.0",
|
||||
"Accept":"*/*"
|
||||
},
|
||||
"uri":"index.php?foo=bar&a=xxx",
|
||||
"method":"GET",
|
||||
"body": ""
|
||||
},
|
||||
"expected": {
|
||||
"http_code": 403,
|
||||
"audit_log": "id \"1234"
|
||||
},
|
||||
|
||||
"server":{
|
||||
"ip":"127.0.0.1",
|
||||
"port":80
|
||||
},
|
||||
"rules":[
|
||||
"SecRuleEngine On",
|
||||
"SecAuditLogParts ABIJDEFHZ",
|
||||
"SecAuditEngine RelevantOnly",
|
||||
"SecAuditLogParts ABCFHZ",
|
||||
"SecAuditLog /tmp/test/modsec_audit.log",
|
||||
"SecAuditLogDirMode 0766",
|
||||
"SecAuditLogFileMode 0666",
|
||||
"SecAuditLogType Serial",
|
||||
"SecAuditLogRelevantStatus \"^(?:5|4(?!04))\"",
|
||||
"SecRule ARGS:foo \"@rx ^bar$\" \"id:1234,phase:1,deny,status:403\""
|
||||
]
|
||||
}
|
||||
]
|
Reference in New Issue
Block a user