Skip to content

Commit

Permalink
test: create 9520100 regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
EsadCetiner authored Dec 27, 2023
1 parent 6d46b65 commit a538dae
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/integration.yml
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
6 changes: 6 additions & 0 deletions .github/workflows/lint.yml
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
55 changes: 55 additions & 0 deletions tests/9520100.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
meta:
author: "Esad Cetiner"
description: "SOGo Rule Exclusions Plugin"
enabled: true
name: 9520100.yaml
tests:
- test_title: 9520100-1
desc: Disable 920272 for cookie header
stages:
- stage:
input:
dest_addr: 127.0.0.1
headers:
Host: localhost
User-Agent: SOGo 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: \%
port: 80
method: POST
uri: /post
output:
no_log_contains: id "920272"
- test_title: 9520100-2
desc: Disable 942450 for XSRF-TOKEN cookie
stages:
- stage:
input:
dest_addr: 127.0.0.1
headers:
Host: localhost
User-Agent: SOGo 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: XSRF-TOKEN=0x0806
port: 80
method: POST
uri: /post
output:
no_log_contains: id "942450"
- test_title: 9520100-3
desc: Disable 942450 for identviewsplitter cookie name
stages:
- stage:
input:
dest_addr: 127.0.0.1
headers:
Host: localhost
User-Agent: SOGo 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: 0xHIGHFLYxSOGo=0x0800
port: 80
method: POST
uri: /post
output:
no_log_contains: id "942450"

0 comments on commit a538dae

Please sign in to comment.