You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creates Prowler security checks following SDK architecture patterns. Trigger: When creating or updating a Prowler SDK security check (implementation + metadata) for any provider (AWS, Azure, GCP, K8s, GitHub, etc.).
fromprowler.lib.check.modelsimportCheck, Check_Report_{Provider}
fromprowler.providers.{provider}.services.{service}.{service}_clientimport {service}_clientclass {check_name}(Check):
"""Ensure that {resource} meets {security_requirement}."""defexecute(self) ->list[Check_Report_{Provider}]:
"""Execute the check logic. Returns: A list of reports containing the result of the check. """findings= []
forresourcein {service}_client.{resources}:
report=Check_Report_{Provider}(metadata=self.metadata(), resource=resource)
report.status="PASS"ifresource.is_compliantelse"FAIL"report.status_extended=f"Resource {resource.name} compliance status."findings.append(report)
returnfindings
4. Create Metadata File
See complete schema below and assets/ folder for complete templates.
For detailed field documentation, see references/metadata-docs.md.
5. Verify Check Detection
poetry run python prowler-cli.py {provider} --list-checks | grep {check_name}
6. Run Check Locally
poetry run python prowler-cli.py {provider} --log-level ERROR --verbose --check {check_name}
7. Create Tests
See prowler-test-sdk skill for test patterns (PASS, FAIL, no resources, error handling).
Check Naming Convention
{service}_{resource}_{security_control}
Examples:
ec2_instance_public_ip_disabled
s3_bucket_encryption_enabled
iam_user_mfa_enabled
Metadata Schema (COMPLETE)
{
"Provider": "aws",
"CheckID": "{check_name}",
"CheckTitle": "Human-readable title",
"CheckType": [
"Software and Configuration Checks/AWS Security Best Practices",
"Software and Configuration Checks/Industry and Regulatory Standards/AWS Foundational Security Best Practices"
],
"ServiceName": "{service}",
"SubServiceName": "",
"ResourceIdTemplate": "",
"Severity": "low|medium|high|critical",
"ResourceType": "AwsEc2Instance|Other",
"ResourceGroup": "security|compute|storage|network",
"Description": "**Bold resource name**. Detailed explanation of what this check evaluates and why it matters.",
"Risk": "What happens if non-compliant. Explain attack vectors, data exposure risks, compliance impact.",
"RelatedUrl": "",
"AdditionalURLs": [
"https://docs.aws.amazon.com/..."
],
"Remediation": {
"Code": {
"CLI": "aws {service} {command} --option value",
"NativeIaC": "```yaml\nResources:\n Resource:\n Type: AWS::{Service}::{Resource}\n Properties:\n Key: value # This line fixes the issue\n```",
"Other": "1. Console steps\n2. Step by step",
"Terraform": "```hcl\nresource \"aws_{service}_{resource}\"\"example\" {\n key = \"value\" # This line fixes the issue\n}\n```"
},
"Recommendation": {
"Text": "Detailed recommendation for remediation.",
"Url": "https://hub.prowler.com/check/{check_name}"
}
},
"Categories": [
"identity-access",
"encryption",
"logging",
"forensics-ready",
"internet-exposed",
"trust-boundaries"
],
"DependsOn": [],
"RelatedTo": [],
"Notes": ""
}