Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: small fixed on README #94

Merged
merged 1 commit into from
Oct 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,6 @@ mode: "default" or "cloud" (only change it if you need "cloud")

By default, _ftw_ would search for a file in `$PWD` with the name `.ftw.yaml`. You can pass the `--config <config file name>` to point it to a different file.

### Logfile

Running in default mode implies you have access to a logfile for checking the WAF behavior against test results. Example configurations for `apache` and `nginx` can be found below:

```yaml
---
logfile: '../coreruleset/tests/logs/modsec2-apache/apache2/error.log'
```

```yaml
---
logfile: '../coreruleset/tests/logs/modsec3-nginx/nginx/error.log'
```

### WAF Server

I normally perform my testing using the [Core Rule Set](https://github.com/coreruleset/coreruleset/).
Expand All @@ -74,9 +60,24 @@ You can start the containers from that repo using `docker compose`:

```bash
git clone https://github.com/coreruleset/coreruleset.git
cd coreruleset
docker compose -f tests/docker-compose.yml up -d modsec2-apache
```

### Logfile

Running in default mode implies you have access to a logfile for checking the WAF behavior against test results. For this example, assuming you are in the base directory of the coreruleset repository, these are the configurations for `apache` and `nginx`:

```yaml
---
logfile: 'tests/logs/modsec2-apache/error.log'
```

```yaml
---
logfile: 'tests/logs/modsec3-nginx/error.log'
```

## Running

This is the help for the `run` command:
Expand Down Expand Up @@ -185,7 +186,7 @@ Tests can be altered using four lists:
- `forcefail` is for tests you want to fail unconditionally. You should add a comment on why you force to fail the test

Each list is populated by regular expressions (see https://pkg.go.dev/regexp), which match against test IDs.
The following is an example using all the lists mentioned above:
The following is an example using all the lists mentioned above:

```yaml
...
Expand Down