PR

prowler-sdk-check

Guides the creation and update of Prowler security checks using standardized SDK patterns.

Install

mkdir -p .claude/skills/prowler-sdk-check && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/6540" && unzip -o skill.zip -d .claude/skills/prowler-sdk-check && rm skill.zip

Installs to .claude/skills/prowler-sdk-check

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

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.).
215 chars · catalog description✓ has a “when” trigger
Intermediate

Key capabilities

  • →Generate check boilerplate code
  • →Create mandatory metadata JSON files
  • →Integrate service-level clients
  • →Implement report object models
  • →Structure provider-specific security checks

How it works

It follows a strict directory pattern to generate implementation and metadata files that satisfy the Prowler SDK check architecture.

Inputs & outputs

You give it
Provider, service, and check name
You get back
File structure (init, code, metadata)

When to use prowler-sdk-check

  • →Implement a new security check for AWS or Azure
  • →Generate metadata files for security scanning
  • →Integrate service-level methods for data collection
  • →Standardize check logic using SDK models

About this skill

Check Structure

prowler/providers/{provider}/services/{service}/{check_name}/
├── __init__.py
├── {check_name}.py               # class {check_name}(Check)
├── {check_name}.metadata.json
└── {check_name}_fixer.py         # optional, see Fixers

Naming: {service}_{resource}_{security_control} (e.g. s3_bucket_object_versioning). Tests go in tests/providers/{provider}/services/{service}/{check_name}/{check_name}_test.py (see prowler-test-sdk).

Hard Rules (enforced in code)

Check.__init__ and CheckMetadata (prowler/lib/check/models.py) reject the check at load time if any of these fail:

RuleEnforced by
CheckID == class name == file name (without .py)Check.__init__
CheckID has no -valid_check_id
ServiceName == CheckID.split("_")[0] and lowercase (so the AWS Lambda service is awslambda)validate_service_name
CheckTitle <= 150 chars and does not start with Ensurevalidate_check_title
Description and Risk <= 400 chars eachvalidate_description, validate_risk
CheckType is [] for every provider except AWS; AWS values must be paths in prowler/providers/aws/config/check_types.jsonvalidate_check_type
RelatedUrl is "" (deprecated, use AdditionalURLs)validate_related_url
Remediation.Recommendation.Url is empty or starts with https://hub.prowler.com/ (use https://hub.prowler.com/check/{check_id})validate_recommendation_url
Remediation.Code.CLI is not a URLvalid_cli_command
ResourceType non-emptyvalid_resource_type
ResourceGroup in VALID_RESOURCE_GROUPS (or "")validate_resource_group
Every Categories item in VALID_CATEGORIESvalid_category
AdditionalURLs has no empty or duplicate itemsvalidate_additional_urls
Severity in critical, high, medium, low, informationalSeverity enum

Tool-wrapper providers (iac, llm, image, or plug-ins with is_external_tool_provider = True) skip most of these.

Validate a metadata file without running a scan:

uv run python -c "import sys; from prowler.lib.check.models import CheckMetadata; CheckMetadata.parse_file(sys.argv[1]); print('OK')" prowler/providers/{provider}/services/{service}/{check_name}/{check_name}.metadata.json

Check Implementation

from prowler.lib.check.models import Check, Check_Report_AWS
from prowler.providers.aws.services.s3.s3_client import s3_client


class s3_bucket_object_versioning(Check):
    """S3 buckets have object versioning enabled."""

    def execute(self) -> list[Check_Report_AWS]:
        findings = []
        for bucket in s3_client.buckets.values():
            report = Check_Report_AWS(metadata=self.metadata(), resource=bucket)
            if not bucket.versioning_retrieved:
                report.status = "MANUAL"
                report.status_extended = f"Cannot evaluate versioning for S3 Bucket {bucket.name}: the versioning configuration could not be retrieved. Verify that the scanning credentials are allowed to call s3:GetBucketVersioning."
            elif bucket.versioning:
                report.status = "PASS"
                report.status_extended = f"S3 Bucket {bucket.name} has versioning enabled."
            else:
                report.status = "FAIL"
                report.status_extended = f"S3 Bucket {bucket.name} has versioning disabled."
            findings.append(report)
        return findings
  • Only use the service client ({service}_client); never call the provider SDK from a check. If data is missing, extend the service (see prowler-provider).
  • execute() returns a list (empty if there are no resources), one report per audited resource.
  • status_extended must end with a period and identify the resource.
  • resource= accepts a dict, a Pydantic model, a dataclass or an object with to_dict(); anything else becomes {} and logs an error.
  • Severity can be adjusted per finding with report.check_metadata.Severity = "..." when the risk depends on the scenario.
  • Secret-scanning checks use a dedicated batched structure: read docs/developer-guide/secret-scanning-checks.mdx first.

Report Class per Provider (prowler/lib/check/models.py)

ProviderClassFields set from resource
awsCheck_Report_AWSresource_id (id or name), resource_arn, region
azureCheck_Report_Azureresource_name, resource_id, location; set report.subscription yourself
gcpCheck_Report_GCPresource_id, resource_name, project_id, location; also accepts location=, resource_name=, resource_id=, project_id= kwargs
kubernetesCheck_Report_Kubernetesresource_id (uid), resource_name, namespace
oraclecloudCheck_Report_OCIresource_id, resource_name, compartment_id, region
all othersCheckReport<Name> (e.g. CheckReportGithub, CheckReportM365, CheckReportStackIT, CheckReportMongoDBAtlas, CheckReportAlibabaCloud)grep ^class CheckReport in models.py for the exact name and constructor kwargs

Statuses

StatusWhen
PASSResource is compliant
FAILAn insecure condition was actually detected
MANUALHuman verification needed, or the data could not be retrieved

Permission / availability errors are NOT findings

Never FAIL because an API call failed (missing permission or scope, API not enabled, feature not licensed). The service must expose the failure distinctly from an empty result (None instead of [], a *_retrieved / *_unavailable flag, an *_error attribute or a *_lookup_failed set). A 404/not-found usually means "not configured" and IS a legitimate FAIL; a definitively disabled API is a legitimate FAIL only when enabling that API is the audited control (e.g. GCP Access Approval).

When a whole dataset is missing, emit ONE account/tenant/project-level MANUAL finding naming the required permission, and leave Severity untouched:

if {service}_client.{data} is None:
    report = CheckReport{Provider}(metadata=self.metadata(), resource={})
    report.resource_name = "<Tenant-level resource>"
    report.resource_id = "<stable-id>"
    report.status = "MANUAL"
    report.status_extended = "Cannot evaluate <requirement>: <data> could not be retrieved. Verify that <permission> is granted to the scanning identity."
    return [report]

Metadata

Complete, validated examples live in assets/. Writing style: docs/developer-guide/check-metadata-guidelines.mdx.

FieldRule
CheckTitleDeclarative compliant state, starts with the resource, no "Check/Verify/Ensure". Singular when one report per resource ("S3 bucket has object versioning enabled")
CheckTypeAWS only, e.g. "Software and Configuration Checks/AWS Security Best Practices", "Effects/Data Exposure", "TTPs/Initial Access"; partial paths allowed. [] elsewhere
SubServiceName, ResourceIdTemplateBeing deprecated: ""
ResourceTypeAWS: Security Hub type (AwsS3Bucket) or Other. Azure: Resource Graph type. GCP: Cloud Asset type (storage.googleapis.com/Bucket). Kubernetes: KIND. Providers without a standard: NotDefined
ResourceGroupcompute, container, serverless, database, storage, network, IAM, messaging, security, monitoring, api_gateway, ai_ml, governance, collaboration, devops, analytics. Chosen by the audited resource, not the service (EC2 security group -> network)
DescriptionWhat the finding means, Markdown allowed, no risk talk, no "pass/fail" words
RiskConcrete CIA impact and attack paths, not generic "security issues"
Remediation.Code.CLIOne raw command that flips FAIL to PASS, or ""
Remediation.Code.NativeIaCAWS: CloudFormation YAML code block. Azure: Bicep. Minimal, comment the fixing line
Remediation.Code.TerraformMinimal HCL code block, comment the fixing line
Remediation.Code.OtherNumbered console steps
Remediation.Recommendation.TextPrinciple-based guidance (least privilege, defense in depth), <= 400 chars
CategoriesOnly values from VALID_CATEGORIES (e.g. encryption, internet-exposed, logging, secrets, resilience, threat-detection, trust-boundaries, vulnerabilities, identity-access, forensics-ready, privilege-escalation, gen-ai, ci-cd). A new category needs a validator change plus a docs update
DependsOn, RelatedToLists of CheckIDs, usually []

Configurable Checks

max_rules = ec2_client.audit_config.get("max_security_group_rules", 50)  # always pass a default

Adding a new variable requires ALL of:

  1. Default value under the provider key in prowler/config/config.yaml.
  2. Typed Optional[...] = None field in prowler/config/schema/{provider}.py (providers are registered in prowler/config/schema/registry.py). Values that fail validation are dropped with a warning; misspelled keys pass through silently.
  3. tests/config/fixtures/config.yaml if tests depend on it.
  4. Docs: docs/user-guide/cli/tutorials/configuration_file.mdx.

In tests pass the value with set_mocked_aws_provider(audit_config={...}) (or the provider fixture equivalent).

Fixers

  • File {check_name}_fixer.py next to the check with a module-level def fixer(...) -> bool (True on success; log and return False on error). Docstring lists the permissions needed.
  • run_fixer (prowler/lib/check/check.py) picks the arguments by parameter name: resource_id + region, region only, resource_arn, or resource_id.
  • Fixer settings come from prowler/config/fixer_config.yaml (override with --fixer-config) through {service}_client.fixer_config.
  • The --fixer flag is only registered for AWS (`prowler/provider

Content truncated.

When not to use it

  • →Non-security feature development
  • →UI component creation

Limitations

  • →Restricted to Prowler SDK pattern
  • →Requires manual implementation of service-level data collection
  • →Boilerplate code must be extended with business logic

How it compares

It standardizes the check implementation process, ensuring every new security check is automatically compatible with the existing Prowler framework.

Compared to similar skills

prowler-sdk-check side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
prowler-sdk-check (this skill)15moReviewIntermediate
cloud-penetration-testing39moReviewAdvanced
building-cloud-siem-with-sentinel05moReviewAdvanced
azure-cloud-security-review07moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry