Skip to content

Commit

Permalink
chore: add tests
Browse files Browse the repository at this point in the history
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
  • Loading branch information
fzipi committed May 29, 2024
1 parent 920c053 commit c8fdbf5
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
on: [push, pull_request] # yamllint disable-line rule:truthy
name: Integration tests

jobs:
integration-tests:
uses: coreruleset/crs-plugin-test-action/.github/workflows/integration.yaml@main # yamllint disable-line rule:line-length
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] # yamllint disable-line rule:truthy

jobs:
plugin-lint:
uses: coreruleset/crs-plugin-test-action/.github/workflows/lint.yaml@main
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# OWASP CRS - cPanel Rule Exclusions Plugin

[![Integration tests](https://github.com/coreruleset/cpanel-rule-exclusions-plugin/actions/workflows/integration.yml/badge.svg)](https://github.com/coreruleset/cpanel-rule-exclusions-plugin/actions/workflows/integration.yml)
[![.github/workflows/lint.yml](https://github.com/coreruleset/cpanel-rule-exclusions-plugin/actions/workflows/lint.yml/badge.svg)](https://github.com/coreruleset/cpanel-rule-exclusions-plugin/actions/workflows/lint.yml)

## Description

This plugin contains rule exclusions for [cPanel](https://cpanel.net/), a web hosting control panel. These rule exclusions are designed to resolve common false positives and allow for easier integration with the OWASP CRS (CRS).
Expand All @@ -14,6 +17,6 @@ After the plugin is enabled, cPanel should work without problems caused by CRS (

## License

Copyright (c) 2022 OWASP CRS project. All rights reserved.
Copyright (c) 2022-2024 OWASP CRS project. All rights reserved.

The OWASP CRS and its official plugins are distributed under Apache Software License (ASL) version 2. Please see the enclosed LICENSE file for full details.
6 changes: 6 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"local>coreruleset/renovate-config"
]
}
22 changes: 22 additions & 0 deletions tests/regression/cpanel-plugin/9510100.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
meta:
author: "Felipe Zipitria"
description: "CPanel Plugin"
enabled: true
name: 9510100.yaml
tests:
- test_title: 9510100-1
desc: Cpanel plugin
stages:
- stage:
input:
dest_addr: 127.0.0.1
headers:
Host: localhost
User-Agent: OWASP CRS
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: /whm-server-status
output:
no_log_contains: id "920280"

0 comments on commit c8fdbf5

Please sign in to comment.