Skip to content

Commit 3fa581c

Browse files
committed
feat: Update documentation with latest features
1 parent 5cf7c22 commit 3fa581c

File tree

9 files changed

+58
-6
lines changed

9 files changed

+58
-6
lines changed

docs/getting-started/cats_response_codes.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@ They are all in the `9XX` range. The current defined ones are as follows:
1616
- `957` - protocol communication exception; typically when the service might write some malformed data into the response; might indicate an issue with the service
1717
- `999` - when something unexpected happened which is not part of the above errors
1818

19-
If the entire communication is successful i.e. request was fully sent and response was fully consumed the HTTP response code will be used.
19+
If the entire communication is successful i.e. request was fully sent and response was fully consumed the HTTP response code will be used.
20+
21+
:::tip
22+
You can use `cats explain -t RESPONSE_CODE 953` to get more details about a specific response code.
23+
:::

docs/getting-started/filtering-reports.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ You can ignore specific response codes using the `--ignoreResponseCodes` argumen
3838
## Ignore Response Lines, Words, Size, Regex
3939
You can ignore specific response lines, words, size or regex using the `--ignoreResponseLines`, `--ignoreResponseWords`, `--ignoreResponseSize`, `--ignoreResponseRegex` arguments. This will make CATS report these cases as `success` instead of `warn`.
4040

41-
:::info All --ignoreXXX arguments have a corresponding --filterXXX argument
41+
:::info All above `--ignoreXXX` arguments have a corresponding --filterXXX argument
4242
All `--ignoreXXX` arguments above have a corresponding `--filterXXX` argument which is equivalent to the `--ignoreXXX` argument AND will also consider `--skipReportingForIgnore` as being true.
4343
:::
44+
45+
## Ignore Error Leaks Details Checks
46+
47+
By default, CATS will check if the error message contains sensitive information and will report an `error` if it does.
48+
You can make CATS ignore the error leaks details checks using the `--ignoreErrorLeaksCheck` argument.
49+
50+

docs/getting-started/interpreting-results.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,20 @@ Understanding the `Result Reason` values:
4545
- `Response content type not matching the contract` - reported as `warn` if the content type received in response does not match the one defined in the contract for the received http response code
4646
- `Error details leak` - reported as `error` if the response body contains sensitive information
4747
- `Not Implemented` - reported as `warn` if response code is `501`
48+
- `Mass Assignment vulnerability detected` - reported as `error` if the service allows mass assignment
49+
- `Server error with injection payload` - reported as `error` if the service returns is vulnerable to injection attacks
50+
- `SSRF payload reflected in response` - reported as `error` if the service is vulnerable to SSRF attacks
51+
- `Cloud metadata service accessed` - reported as `error` if the service leaks cloud metadata
52+
- `File content exposed via SSRF` - reported as `error` if the service leaks file content via SSRF
53+
- `Sensitive data leak` - reported as `error` if the service leaks sensitive data
54+
- `Network error reveals SSRF attempt` - reported as `error` if the service is vulnerable to SSRF attacks
55+
- `DNS resolution error reveals SSRF attempt` - reported as `error` if the service is vulnerable to SSRF attacks
56+
- `HTTP client error reveals SSRF attempt` - reported as `error` if the service is vulnerable to SSRF attacks
57+
- `Internal target reflected in response` - reported as `error` if the service is vulnerable to SSRF attacks
58+
- `Missing recommended security headers` - reported as `error` if the http response does not have the recommended security headers
59+
- `Missing response headers` - reported as `error` if the http response does not contain all the headers defined in the contract
60+
- `Potential IDOR vulnerability detected` - reported as `error` if the service is vulnerable to IDOR attacks
61+
- `Server error with IDOR payload` - reported as `error` if the service is vulnerable to IDOR attacks
4862

4963
This is what you get when you click on a specific test:
5064

docs/getting-started/openapi-formats.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,6 @@ This is explicitly mentioned in the mapping table.
4747

4848
:::info
4949
Whenever you see a `camelCase` naming, CATS also checks for `snake_case` and `kebab-case`. For example, for `countryCode` CATS will also match properties ending in `country-code` and `country_code`.
50-
:::
50+
:::
51+
52+
CATS generators are continuously evolving so this page might not have listed all. You can see all formats supported by CATS by running `cats list --formats`.

docs/getting-started/replaying-tests.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,15 @@ This is achieved using the `--server` argument.
3636
:::note
3737
Please note that you only need to provide the base URL of the service in the `--server` argument.
3838
:::
39+
40+
# Replaying Errors
41+
42+
You can replay failed tests using the `--errors` argument. This will replay all failed tests that were flagged as `error` from the last run.
43+
You can supply the path to the reporting folder using the `--reportFolder` argument.
44+
45+
# Replaying Warnings
46+
47+
You can replay tests that were flagged as `warn` using the `--warnings` argument. This will replay all tests that were flagged as `warn` from the last run.
48+
You can supply the path to the reporting folder using the `--reportFolder` argument.
49+
50+

docs/getting-started/running-cats.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ Blackbox mode means that CATS doesn't need any specific context. You just need t
1313
cats --contract=openapi.yaml --server=http://localhost:8080 --headers=headers.yml --blackbox
1414
```
1515

16+
Shorter version:
17+
18+
```bash
19+
cats -c openapi.yaml -s http://localhost:8080 -H header=value -b
20+
```
21+
1622
In blackbox mode CATS will only report `errors` if the received HTTP response code is a `5XX` (except `501`).
1723
Any other mismatch between what the Fuzzer expects vs what the service returns (for example service returns `400` and CATS expects `200`) will be reported as `success`.
1824

docs/getting-started/slicing-strategies.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ You can use various arguments like `--fuzzers=Fuzzer1,Fuzzer2` or `-skipFuzzers=
2828
For example, you can run all Fuzzers except for the `Boundary` Fuzzers like this: `--skipFuzzers=Boundary`. This will skip all Fuzzers containing `Boundary` in their name.
2929
After, you can create an additional run only with these Fuzzers using`--fuzzers=Boundary`.
3030

31+
## Slide by Tags
32+
You can use the `--tag=TAG` argument to run CATS sequentially for each tag. You can also supply a comma separated list of tags to run CATS for multiple tags like this: `--tags=tag1,tag2`.
33+
3134
These are just some recommendations. Depending on how complex your API is, you might go with a combination of the above or with even more granular splits.
3235

3336
:::note

docs/limitations/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The Fuzzers have the following support for media types and HTTP methods:
2222
- HTTP methods: `POST`, `PUT`, `PATCH`, `GET` and `DELETE`
2323

2424
## Additional Parameters
25-
If a response contains a free Map specified using the `additionalParameters` tag CATS will issue a `warn` log message as it won't be able to validate that the response matches the schema.
25+
If a response contains a free Map specified using the `additionalParameters` tag CATS will flag results as `warn` as it won't be able to validate that the response matches the schema.
2626

2727
## Regexes within 'pattern'
28-
CATS uses a mix of regex and data/format driven generators in order to generate Strings based on regexes. This has certain limitations mostly with complex patterns.
28+
CATS uses a mix of regex and data/format driven generators in order to generate Strings based on `patern` and `format`. This has certain limitations mostly with complex patterns.

docs/troubleshooting/index.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ These are some of the common reasons why CATS might appear to be stuck:
88
- **Server issues**: The server might be slow or unresponsive. Check the server logs and the server status.
99
- **Many fields inside the request(s)**: If the request has many fields, CATS might take longer to generate the tests, as many fuzzers are running for each field. You can limit the number of fields to be fuzzed using `--limitFuzzedFields` argument.
1010
- **Usage of anyOf/oneOf in request schemas**: If the request schema contains `anyOf` or `oneOf`, CATS will generate tests for all possible combinations. This can lead to a large number of tests being generated.
11-
You can limit the number of combinations by using the `--limitXxxCombinations` argument. For example, `--limitOneOfCombinations=10` will limit the number of combinations for all `oneOf/anyOf` to 10.
11+
You can limit the number of combinations by using the `--limitXxxCombinations` argument. For example, `--limitXxxOfCombinations=10` will limit the number of combinations for all `oneOf/anyOf` to 10.
1212
- **Self-reference in the request schema**: If the request schema contains self-references, when CATS generates the request sample it might enter an infinite loop. You can limit the depth of the schema by using the `--selfReferenceDepth` argument. For example, `--selfReferenceDepth=3` will limit the self-reference depth of the schema to 3.
1313

1414
When running in default mode, CATS will print progress as it processes paths and displays the current fuzzer that is being run. If you see that the same fuzzer is being run for a long time, it might be stuck. You can stop CATS by pressing `Ctrl+C` and run again with `--verbosity=DETAILED --debug` to see more details.
@@ -60,6 +60,10 @@ If you think some of the test cases generated are not valid in your scenario you
6060

6161
If you think there might be a bug in CATS, please open an issue on the [GitHub repository](https://github.com/Endava/cats/issues/new/choose).
6262

63+
## Change expected response code for specific fuzzers
64+
65+
You can check expected response codes for each fuzzer using [Customize the Default Response Code](https://endava.github.io/cats/docs/advanced-topics/fuzzers-config/).
66+
6367
## CATS generates requests that are not valid
6468

6569
In very rare cases CATS might generate requests that are not valid.

0 commit comments

Comments
 (0)