New to Claude Skills? Learn how to install them →

mukul975 on GitHub

Cloud Vulnerability Posture Management

Free

Enhance your cloud security with multi-cloud CSPM.

Get this skill

Free · Opens the source repo

What Cloud Vulnerability Posture Management does

Implementing Cloud Vulnerability Posture Management (CSPM) focuses on identifying and mitigating cloud-native misconfigurations and vulnerabilities across multiple cloud providers. This skill leverages AWS Security Hub, Azure Defender for Cloud, and open-source tools such as Prowler and ScoutSuite to provide a comprehensive security posture assessment. It is designed for organizations that operate in multi-cloud environments and need to ensure compliance and security across various platforms.

The skill enables users to detect common vulnerabilities like IAM over-permissions, exposed storage, unencrypted data, and missing network controls. By using established standards and best practices from AWS and Azure, users can effectively monitor their cloud infrastructure for compliance violations and security risks. The integration of open-source scanning tools allows for detailed assessments and reports, making it easier to identify and remediate issues.

This skill is particularly beneficial for security professionals, cloud architects, and DevOps teams who are responsible for maintaining the security posture of their cloud environments. It provides the necessary tools to conduct thorough security assessments and build consolidated reports that reflect the security status across different cloud platforms. Users can streamline their security processes and ensure that their cloud configurations adhere to industry standards and compliance requirements.

Overall, this skill serves as a vital resource for organizations looking to enhance their cloud security measures and proactively manage vulnerabilities in their cloud infrastructure.

When to use it

Use this skill when auditing cloud environments for misconfigurations or when establishing security controls aligned with compliance requirements.

When not to use it

This skill may not be suitable for single-cloud environments or for users who do not require multi-cloud vulnerability management.

What you can build with it

Auditing Multi-Cloud Environments

Use this skill to perform security audits across multiple cloud providers to identify misconfigurations and vulnerabilities.

Establishing Compliance Controls

Implement this skill when setting up security controls to ensure compliance with industry standards and regulations.

Generating Security Posture Reports

Leverage this skill to aggregate findings from various cloud scans and generate comprehensive security posture reports.

How to install Cloud Vulnerability Posture Management

View source

1. Install with the skills CLI

npx skills add mukul975/anthropic-cybersecurity-skills/implementing-cloud-vulnerability-posture-management --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 mukul975

Implementing Cloud Vulnerability Posture Management

Overview

Cloud Security Posture Management (CSPM) continuously monitors cloud infrastructure for misconfigurations, compliance violations, and security risks. Unlike traditional vulnerability scanning, CSPM focuses on cloud-native risks: IAM over-permissions, exposed storage buckets, unencrypted data, missing network controls, and service misconfigurations. This skill covers multi-cloud CSPM using AWS Security Hub, Azure Defender for Cloud, and open-source tools like Prowler and ScoutSuite.

When to Use

  • When deploying or configuring implementing cloud vulnerability posture management capabilities in your environment
  • When establishing security controls aligned to compliance requirements
  • When building or improving security architecture for this domain
  • When conducting security assessments that require this implementation

Prerequisites

AWS Security Hub

Enable Security Hub

# Enable AWS Security Hub with default standards
aws securityhub enable-security-hub \
  --enable-default-standards \
  --region us-east-1

# Enable specific standards
aws securityhub batch-enable-standards \
  --standards-subscription-requests \
    '{"StandardsArn":"arn:aws:securityhub:us-east-1::standards/aws-foundational-security-best-practices/v/1.0.0"}' \
    '{"StandardsArn":"arn:aws:securityhub:us-east-1::standards/cis-aws-foundations-benchmark/v/1.4.0"}'

# Get findings summary
aws securityhub get-findings \
  --filters '{"SeverityLabel":[{"Value":"CRITICAL","Comparison":"EQUALS"}],"RecordState":[{"Value":"ACTIVE","Comparison":"EQUALS"}]}' \
  --max-items 10

Security Hub Standards

StandardDescription
AWS Foundational Security Best PracticesAWS-recommended baseline controls
CIS AWS Foundations Benchmark 1.4CIS hardening requirements
PCI DSS v3.2.1Payment card industry controls
NIST SP 800-53 Rev 5Federal security controls

Azure Defender for Cloud

Enable Defender CSPM

# Enable Defender for Cloud free tier
az security pricing create \
  --name CloudPosture \
  --tier standard

# Check secure score
az security secure-score list \
  --query "[].{Name:displayName,Score:current,Max:max}" \
  --output table

# Get security recommendations
az security assessment list \
  --query "[?status.code=='Unhealthy'].{Name:displayName,Severity:metadata.severity,Resource:resourceDetails.id}" \
  --output table

# Get alerts
az security alert list \
  --query "[?status=='Active'].{Name:alertDisplayName,Severity:severity,Time:timeGeneratedUtc}" \
  --output table

Open-Source: Prowler

Installation and Execution

# Install Prowler
pip install prowler

# Run full AWS scan
prowler aws --output-formats json-ocsf,csv,html

# Run specific checks
prowler aws --checks s3_bucket_public_access iam_root_mfa_enabled ec2_sg_open_to_internet

# Run against specific AWS profile and region
prowler aws --profile production --region us-east-1 --output-formats json-ocsf

# Run CIS Benchmark compliance check
prowler aws --compliance cis_1.5_aws

# Run PCI DSS compliance
prowler aws --compliance pci_3.2.1_aws

# Scan Azure environment
prowler azure --subscription-ids "sub-id-here"

# Scan GCP environment
prowler gcp --project-ids "project-id-here"

Prowler Check Categories

CategoryExamples
IAMRoot MFA, password policy, access key rotation
S3Public access, encryption, versioning
EC2Security groups, EBS encryption, metadata service
RDSPublic access, encryption, backup retention
CloudTrailEnabled, encrypted, log validation
VPCFlow logs, default SG restrictions
LambdaPublic access, runtime versions
EKSPublic endpoint, secrets encryption

Open-Source: ScoutSuite

# Install ScoutSuite
pip install scoutsuite

# Run AWS assessment
scout aws --profile production

# Run Azure assessment
scout azure --cli

# Run GCP assessment
scout gcp --project-id my-project

# Results available as interactive HTML report
# Open scout-report/report.html in browser

Multi-Cloud Aggregation

import json
import subprocess
from datetime import datetime, timezone

def run_prowler_scan(provider, output_dir, compliance=None):
    """Run Prowler scan for a cloud provider."""
    cmd = ["prowler", provider, "--output-formats", "json-ocsf",
           "--output-directory", output_dir]
    if compliance:
        cmd.extend(["--compliance", compliance])
    result = subprocess.run(cmd, capture_output=True, text=True, timeout=3600)
    return result.returncode == 0

def aggregate_findings(prowler_dirs):
    """Aggregate findings from multiple Prowler scans."""
    all_findings = []
    for scan_dir in prowler_dirs:
        json_files = list(Path(scan_dir).glob("*.json"))
        for jf in json_files:
            with open(jf, "r") as f:
                for line in f:
                    try:
                        finding = json.loads(line.strip())
                        all_findings.append(finding)
                    except json.JSONDecodeError:
                        continue
    # Sort by severity
    severity_order = {"critical": 0, "high": 1, "medium": 2, "low": 3, "informational": 4}
    all_findings.sort(key=lambda f: severity_order.get(
        f.get("severity", "informational").lower(), 5
    ))
    return all_findings

def generate_posture_report(findings, output_path):
    """Generate cloud security posture report."""
    report = {
        "generated_at": datetime.now(timezone.utc).isoformat(),
        "total_findings": len(findings),
        "by_severity": {},
        "by_provider": {},
        "by_service": {},
    }
    for f in findings:
        sev = f.get("severity", "unknown")
        provider = f.get("cloud_provider", "unknown")
        service = f.get("service_name", "unknown")
        report["by_severity"][sev] = report["by_severity"].get(sev, 0) + 1
        report["by_provider"][provider] = report["by_provider"].get(provider, 0) + 1
        report["by_service"][service] = report["by_service"].get(service, 0) + 1

    with open(output_path, "w") as f:
        json.dump(report, f, indent=2)
    return report

References

Frequently asked questions about Cloud Vulnerability Posture Management

Similar skills