docs(dev-guide): Fix a list and include some details to use the report (#2710)

This commit is contained in:
Pepe Fagoaga
2023-08-11 11:01:58 +02:00
committed by GitHub
parent 6b24b46f3d
commit 3fafac75ef
2 changed files with 16 additions and 1 deletions

View File

@@ -95,7 +95,19 @@ class ec2_ami_public(Check):
return findings
```
All checks must fill the `report.resource_id` and `report.resource_arn` with the following criteria:
### Check Status
All the checks MUST fill the `report.status` and `report.status_extended` with the following criteria:
- Status -- `report.status`
- `PASS` --> If the check is passing against the configured value.
- `FAIL` --> If the check is passing against the configured value.
- `INFO` --> This value cannot be used unless a manual operation is required in order to determine if the `report.status` is whether `PASS` or `FAIL`.
- Status Extended -- `report.status_extended`
- MUST end in a dot `.`
- MUST include the service audited with the resource and a brief explanation of the result generated, e.g.: `EC2 AMI ami-0123456789 is not public.`
### Resource ID, Name and ARN
All the hecks must fill the `report.resource_id` and `report.resource_arn` with the following criteria:
- AWS
- Resource ID -- `report.resource_id`

View File

@@ -59,10 +59,13 @@ To run the Prowler test suite you need to install the testing dependencies alrea
Then in the project's root path execute `pytest -n auto -vvv -s -x` or use the `Makefile` with `make test`.
Other commands to run tests:
- Run tests for a provider: `pytest -n auto -vvv -s -x tests/providers/<provider>/services`
- Run tests for a provider service: `pytest -n auto -vvv -s -x tests/providers/<provider>/services/<service>`
- Run tests for a provider check: `pytest -n auto -vvv -s -x tests/providers/<provider>/services/<service>/<check>`
> Refer to the [pytest documentation](https://docs.pytest.org/en/7.1.x/getting-started.html) documentation for more information.
## AWS
For the AWS provider we have ways to test a Prowler check based on the following criteria: