New to Claude Skills? Learn how to install them →

prowler-cloud on GitHub

Prowler SDK Check

Free

Streamline security checks for cloud providers with Prowler.

Get this skill

Free · Opens the source repo

What Prowler SDK Check does

Prowler SDK Check is designed for developers and security engineers who need to implement security checks for various cloud providers, including AWS, Azure, and GCP. This skill provides a structured approach to creating security checks that adhere to the SDK architecture patterns used by Prowler. By following a step-by-step process, users can ensure that checks are implemented correctly, and that all necessary metadata is included for effective compliance reporting.

The skill guides users through the prerequisites of creating a check, such as verifying that the check does not already exist and ensuring that the relevant provider and service are available. Users will create the necessary files and implement the check logic using Python, which includes defining the execution method that generates compliance reports based on the resources checked. The metadata file is crucial as it provides detailed information about the check, including its severity, description, and remediation steps.

With the Prowler SDK Check, users can quickly verify the detection of their checks and run them locally to assess compliance status. This skill is particularly useful for teams managing cloud infrastructure who need to maintain security best practices and compliance with industry standards. By automating the creation of checks, it reduces the manual overhead and potential for errors in security assessments.

Overall, Prowler SDK Check is an essential tool for anyone involved in cloud security who wants to streamline the process of implementing and managing security checks across multiple cloud providers. It not only enhances productivity but also helps ensure that security measures are consistently applied and documented.

When to use it

Use this skill when you need to implement security checks for cloud services in a structured and efficient manner.

When not to use it

This skill may not be suitable for users who are not working with Prowler or those who do not require security checks for cloud providers.

What you can build with it

Implementing AWS Security Checks

Use the Prowler SDK Check to create security checks for AWS services, ensuring compliance with best practices.

Creating Azure Compliance Checks

Leverage this skill to implement checks for Azure services, helping maintain security standards.

Managing GCP Security Assessments

Utilize the Prowler SDK Check for creating security checks in GCP, streamlining compliance management.

How to install Prowler SDK Check

View source

1. Install with the skills CLI

npx skills add prowler-cloud/prowler/prowler-sdk-check --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by prowler-cloud

Check Structure

prowler/providers/{provider}/services/{service}/{check_name}/
├── __init__.py
├── {check_name}.py
└── {check_name}.metadata.json

Step-by-Step Creation Process

1. Prerequisites

  • Verify check doesn't exist: Search prowler/providers/{provider}/services/{service}/
  • Ensure provider and service exist - create them first if not
  • Confirm service has required methods - may need to add/modify service methods to get data

2. Create Check Files

mkdir -p prowler/providers/{provider}/services/{service}/{check_name}
touch prowler/providers/{provider}/services/{service}/{check_name}/__init__.py
touch prowler/providers/{provider}/services/{service}/{check_name}/{check_name}.py
touch prowler/providers/{provider}/services/{service}/{check_name}/{check_name}.metadata.json

3. Implement Check Logic

from prowler.lib.check.models import Check, Check_Report_{Provider}
from prowler.providers.{provider}.services.{service}.{service}_client import {service}_client

class {check_name}(Check):
    """Ensure that {resource} meets {security_requirement}."""
    def execute(self) -> list[Check_Report_{Provider}]:
        """Execute the check logic.

        Returns:
            A list of reports containing the result of the check.
        """
        findings = []
        for resource in {service}_client.{resources}:
            report = Check_Report_{Provider}(metadata=self.metadata(), resource=resource)
            report.status = "PASS" if resource.is_compliant else "FAIL"
            report.status_extended = f"Resource {resource.name} compliance status."
            findings.append(report)
        return findings

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

uv run python prowler-cli.py {provider} --list-checks | grep {check_name}

6. Run Check Locally

uv 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": ""
}

Required Fields

FieldDescription
ProviderProvider name: aws, azure, gcp, kubernetes, github, m365
CheckIDMust match class name and folder name
CheckTitleHuman-readable title
Severitylow, medium, high, critical
ServiceNameService being checked
DescriptionWhat the check evaluates
RiskSecurity impact of non-compliance
Remediation.Code.CLICLI fix command
Remediation.Recommendation.TextHow to fix

Severity Guidelines

SeverityWhen to Use
criticalDirect data exposure, RCE, privilege escalation
highSignificant security risk, compliance violation
mediumDefense-in-depth, best practice
lowInformational, minor hardening

Check Report Statuses

StatusWhen to Use
PASSResource is compliant
FAILResource is non-compliant
MANUALRequires human verification

Common Patterns

AWS Check with Regional Resources

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

class s3_bucket_encryption_enabled(Check):
    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 bucket.encryption:
                report.status = "PASS"
                report.status_extended = f"S3 bucket {bucket.name} has encryption enabled."
            else:
                report.status = "FAIL"
                report.status_extended = f"S3 bucket {bucket.name} does not have encryption enabled."
            findings.append(report)
        return findings

Check with Multiple Conditions

from prowler.lib.check.models import Check, Check_Report_AWS
from prowler.providers.aws.services.ec2.ec2_client import ec2_client

class ec2_instance_hardened(Check):
    def execute(self) -> list[Check_Report_AWS]:
        findings = []
        for instance in ec2_client.instances:
            report = Check_Report_AWS(metadata=self.metadata(), resource=instance)

            issues = []
            if instance.public_ip:
                issues.append("has public IP")
            if not instance.metadata_options.http_tokens == "required":
                issues.append("IMDSv2 not enforced")

            if issues:
                report.status = "FAIL"
                report.status_extended = f"Instance {instance.id} {', '.join(issues)}."
            else:
                report.status = "PASS"
                report.status_extended = f"Instance {instance.id} is properly hardened."

            findings.append(report)
        return findings

Commands

# Verify detection
uv run python prowler-cli.py {provider} --list-checks | grep {check_name}

# Run check
uv run python prowler-cli.py {provider} --log-level ERROR --verbose --check {check_name}

# Run with specific profile/credentials
uv run python prowler-cli.py aws --profile myprofile --check {check_name}

# Run multiple checks
uv run python prowler-cli.py {provider} --check {check1} {check2} {check3}

Resources

  • Templates: See assets/ for complete check and metadata templates (AWS, Azure, GCP)
  • Documentation: See references/metadata-docs.md for official Prowler Developer Guide links

Frequently asked questions about Prowler SDK Check

Similar skills