Module D03: Anatomy of a Check
Track: D2 · Checks · Effort: 2 h · Prowler: 5.48
Scenario
Cloudsmiths' incident responders lost an hour last week finding out which team owned an exposed S3 bucket. The company policy (CS-TAG-01) says every bucket carries a non-empty Owner tag, but nothing enforces it. Prowler 5.48 already collects every bucket's tags, but no check evaluates this internal rule. In this module you read how real checks are built, then write s3_bucket_owner_tag_present and run it from your fork. Because the rule is specific to Cloudsmiths, it will later ship as a plug-in (Module D12) rather than upstream. You build it in the fork first because that is where the tooling and tests live.
Learning objectives
- Name, place and lay out a new check folder following Prowler's conventions.
- Explain how the
Checkbase class loads metadata, enforces name consistency and callsexecute(). - Build findings with the right
Check_Report_*/CheckReport*class and populatestatus,status_extendedand the resource fields correctly for AWS and Azure. - Use service client singletons, regional resources and the "errors are not findings" rule (
MANUAL, notFAIL). - Trace how Prowler discovers a check on disk and runs it with
--checkand--list-checks. - Write a new AWS check against an existing service and run it from source and from a unit test.
Regístrate para leer el módulo completo
El temario y el resumen de cada módulo son públicos. Crea una cuenta gratuita para desbloquear las lecciones completas, los laboratorios, las comprobaciones de conocimientos y el examen final, y para seguir tu progreso.